Receive Security Exception after deploy a solution using ps for a FBA custom login form RRS feed

  • 问题

  • Dear all,

    i have a question.

    i am using both FBA and Windows Authentication for a web application.

    i have developed a login form instead of the default sharepoint web page. and if using VS2010, i can deploy it very well.

    then comes to the production environment, i use ps file to deploy that to the whole farm, using Install-SPSolution:

    Add-SPSolution -literalpath C:\CustomLoginPageEx.wsp
    Install-SPSolution -Identity CustomLoginPageEx.wsp -AllWebApplications -GACDeployment -Force

    the solution is well deployed, but when i go to the web application that using FBA and Windows authentication, i will receive a security exception error as below:


    Security Exception
    Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

    Exception Details: System.Security.SecurityException: Request failed.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:

    [SecurityException: Request failed.]
       System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0
       System.Web.UI.Util.GetTypeFromAssemblies(ICollection assemblies, String typeName, Boolean ignoreCase) +201
       System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError) +323
       System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) +10891548
       System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) +365


    while after i have modified the web applicaton web.config trust level to Full, the login page can be used.

    but since Full is not so good, is there another to solve this?

    besides, i have set the VS project Assembly property to webapplication instead of GAC....., will that matter?

    thank you so much if you can help me solve this!!!!!!!


    2013年1月5日 15:59