在我的Web.config中,我获得了表单类型身份验证 . 从VS 2013开始,我没有问题登录我的网站 . 此站点使用集成管道模式创建为独立应用程序池 . 当我发布这个网站时,我不能再登录了 . 我收到错误“登录系统时发生未知异常 . 在身份验证的IIS中,我禁用了匿名身份验证,启用了表单身份验证,启用了Windows身份验证,禁用了ASP.NET . 如果我禁用了Windows身份验证,我将无法进行授权 . 即使启用匿名身份验证我仍然无法登录 . 请查看下面的web.config代码 . 任何想法?谢谢

<?xml version="1.0" encoding="UTF-8"?><configuration>   
<configSections>    
<sectionGroup name="system.web.extensions"   
type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting"type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
</sectionGroup>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web"/>
<section name="typeAliases" type="Spring.Context.Support.TypeAliasesSectionHandler, Spring.Core"/>
</sectionGroup>
<sectionGroup name="common">
        <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging"/>
    </sectionGroup>
    <section name="dataContext" type="DotWebDev.Common.Data.DataContextConfiguration, DotWebDev.Common"/>
    <section name="framePage" type="DotWebDev.UI.DynamicPages.Configurations.FramePageConfigurationSection, DotWebDev.UI"/></configSections>
<appSettings>
<add key="autoFormsAuthentication" value="false" />
<add key="enableSimpleMembership" value="false"/>
<add key="PreserveLoginUrl" value="true" />
</appSettings>
<dataContext enabledMSDTC="false" commandTimeout="30">
<settings>
<setting name="MembershipDataContext"connectionType="System.Data.SqlClient.SqlConnection" connectionStringName="Global"/>
<setting name="ExtensionModelDataContext" connectionType="System.Data.SqlClient.SqlConnection" connectionStringName="Global"/>
<setting name="ProductManagementDataContext" connectionType="System.Data.SqlClient.SqlConnection" connectionStringName="Global"/>
</settings>
</dataContext> 
<connectionStrings>
<add name="Global" providerName="System.Data.SqlClient" connectionString="Data Source=.\sqlexpress;Initial Catalog=UadminMgr;Integrated Security=SSPI;persist security info=False; Trusted_Connection=Yes; Max Pool Size=4096; Min Pool Size=10"/>
</connectionStrings>
<system.web>
<compilation debug="true">
        <assemblies>
            <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
    </compilation>
    <authentication mode="Forms">
        <forms name=".Global" defaultUrl="FramePage.svc" loginUrl="LogOn.aspx" slidingExpiration="true" timeout="60"/>
    </authentication>
    <httpRuntime maxRequestLength="4096"/>
    <pages configSource="Config\pages.config"/>
    <globalization culture="auto" uiCulture="auto"/>
    <httpHandlers>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add path="*.aspx" verb="*" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>
        <add path="DynamicPage.svc" verb="*" type="DotWebDev.UI.Services.DynamicPageHandler, DotWebDev.UI"/>
        <add path="DynamicPageDataService.svc" verb="GET, POST" type="DotWebDev.UI.Services.DynamicPageDataServiceHandler, DotWebDev.UI"/>
        <add path="DynamicPageDownloadExcel.svc" verb="*" type="DotWebDev.UI.Services.DynamicPageDataToExcelHandler, DotWebDev.UI"/>
        <add path="DynamicPageHtmlPrinter.svc" verb="*" type="DotWebDev.UI.Services.DynamicPageDataToHtmlHandler, DotWebDev.UI"/>
        <add path="DetailPanel.svc" verb="*" type="DotWebDev.UI.Services.DetailPanelPageHandler, DotWebDev.UI"/>
        <add path="AggregatePanel.svc" verb="*" type="DotWebDev.UI.Services.AggregatePanelPageHandler, DotWebDev.UI"/>
        <add path="FramePage.svc" verb="*" type="DotWebDev.UI.Services.FramePageHandler, DotWebDev.UI"/>
        <add path="ContextMonitor.ashx" verb="*" type="Spring.Web.Support.ContextMonitor, Spring.Web"/>
        <add path="*_AppService.axd" verb="*" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
    </httpHandlers>
    <httpModules>
        <add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="PlatformModule" type="DotWebDev.Platform.PlatformModule, DotWebDev.Platform"/>
    </httpModules>
    <machineKey configSource="Config\machineKey.config"/>
    <membership configSource="Config\membership.config"/>
    <roleManager configSource="Config\roleManager.config"/>
    <sessionState mode="InProc" stateNetworkTimeout="30" timeout="14400"/>
    <customErrors configSource="Config\customErrors.config"/>
</system.web>
<system.codedom>
    <compilers>
        <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
            <providerOption name="CompilerVersion" value="v3.5"/>
            <providerOption name="WarnAsError" value="false"/>
        </compiler>
        <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
            <providerOption name="CompilerVersion" value="v3.5"/>
            <providerOption name="OptionInfer" value="true"/>
            <providerOption name="WarnAsError" value="false"/>
        </compiler>
    </compilers>
</system.codedom>
<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>

    <modules>
        <remove name="ScriptModule"/>
        <add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
        <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="PlatformModule" type="DotWebDev.Platform.PlatformModule, DotWebDev.Platform"/>
    </modules>
    <handlers>
        <remove name="WebServiceHandlerFactory-Integrated"/>
        <remove name="ScriptHandlerFactory"/>
        <remove name="ScriptHandlerFactoryAppServices"/>
        <remove name="ScriptResource"/>
        <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
        <add name="DynamicPage" path="DynamicPage.svc" preCondition="managedHandler" verb="*" type="DotWebDev.UI.Services.DynamicPageHandler, DotWebDev.UI"/>

        <add name="DynamicPageDataService" path="DynamicPageDataService.svc" preCondition="managedHandler" verb="GET, POST" type="DotWebDev.UI.Services.DynamicPageDataServiceHandler, DotWebDev.UI"/>
        <add name="DynamicPageDownloadExcel" path="DynamicPageDownloadExcel.svc" preCondition="managedHandler" verb="GET, POST" type="DotWebDev.UI.Services.DynamicPageDataToExcelHandler, DotWebDev.UI"/>
        <add name="DynamicPageHtmlPrinter" path="DynamicPageHtmlPrinter.svc" preCondition="managedHandler" verb="*" type="DotWebDev.UI.Services.DynamicPageDataToHtmlHandler, DotWebDev.UI"/>
        <add name="DetailPanel" path="DetailPanel.svc" preCondition="managedHandler" verb="*" type="DotWebDev.UI.Services.DetailPanelPageHandler, DotWebDev.UI"/>
        <add name="AggregatePanel" path="AggregatePanel.svc" preCondition="managedHandler" verb="*" type="DotWebDev.UI.Services.AggregatePanelPageHandler, DotWebDev.UI"/>
        <add name="FramePage" path="FramePage.svc" preCondition="managedHandler" verb="*" type="DotWebDev.UI.Services.FramePageHandler, DotWebDev.UI"/>
    </handlers>
    <defaultDocument>
        <files>
            <clear/>
            <add value="LogOn.aspx"/>
        </files>
    </defaultDocument>
</system.webServer>
<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
    <behaviors>
        <serviceBehaviors>
            <behavior name="AuthenticationBehavior">
                <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false"/>
                <serviceDebug includeExceptionDetailInFaults="true"/>
            </behavior>
        </serviceBehaviors>
        <endpointBehaviors>
            <behavior name="RestfulEndpointBehavior">
                <dataContractSerializer maxItemsInObjectGraph="2147483646"/>
                <webHttp/>
            </behavior>
        </endpointBehaviors>
    </behaviors>
    <bindings>
        <webHttpBinding>
            <binding name="HttpStreaming">
                <security mode="None">
                    <transport clientCredentialType="None"/>
                </security>
            </binding>
        </webHttpBinding>
        <mexHttpBinding>
            <binding name="HttpStreaming" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="01:00:00" sendTimeout="01:00:00"/>
        </mexHttpBinding>
    </bindings>
    <services>
        <service name="DotWebDev.Platform.Services.OrganizationService" behaviorConfiguration="AuthenticationBehavior">
            <clear/>
            <endpoint address="http://localhost:51702/Services/OrganizationService.svc" behaviorConfiguration="RestfulEndpointBehavior" binding="webHttpBinding" bindingConfiguration="HttpStreaming" contract="DotWebDev.Platform.Services.IOrganizationService" listenUriMode="Explicit"/>
            <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="HttpStreaming" contract="IMetadataExchange"/>
        </service>
        <service name="DotWebDev.Platform.Services.RoleService" behaviorConfiguration="AuthenticationBehavior">
            <clear/>
            <endpoint address="http://localhost:51702/Services/RoleService.svc" behaviorConfiguration="RestfulEndpointBehavior" binding="webHttpBinding" bindingConfiguration="HttpStreaming" contract="DotWebDev.Platform.Services.IRoleService" listenUriMode="Explicit"/>
            <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="HttpStreaming" contract="IMetadataExchange"/>
        </service>
        <service name="DotWebDev.Platform.Services.HierarchyService" behaviorConfiguration="AuthenticationBehavior">
            <clear/>
            <endpoint address="http://localhost:51702/Services/HierarchyService.svc" behaviorConfiguration="RestfulEndpointBehavior" binding="webHttpBinding" bindingConfiguration="HttpStreaming" contract="DotWebDev.Platform.Services.IHierarchyService" listenUriMode="Explicit"/>
            <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="HttpStreaming" contract="IMetadataExchange"/>
        </service>
        <service name="DotWebDev.Platform.Services.ConcreteDataService" behaviorConfiguration="AuthenticationBehavior">
            <clear/>
            <endpoint address="http://localhost:51702/Services/ConcreteDataService.svc" behaviorConfiguration="RestfulEndpointBehavior" binding="webHttpBinding" bindingConfiguration="HttpStreaming" contract="DotWebDev.Platform.Services.IConcreteDataService" listenUriMode="Explicit"/>
            <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="HttpStreaming" contract="IMetadataExchange"/>
        </service>
    </services>
</system.serviceModel>
<spring>
    <typeAliases>
        <alias name="WebResource" type="DotWebDev.UI.WebResources.WebResource, DotWebDev.UI"/>
        <alias name="WebResourceGroup" type="DotWebDev.UI.WebResources.WebResourceGroup, DotWebDev.UI"/>
    </typeAliases>
    <context>
        <resource uri="~/Spring/all.config"/>
    </context>
</spring>
<common>
    <logging>
        <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net">
            <!-- Possible values are ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF -->
            <arg key="Level" value="ERROR"/>
            <arg key="configType" value="FILE"/>
            <arg key="configFile" value="~/Config/log4net.config"/>
        </factoryAdapter>
    </logging>
</common>
<framePage NavigationBarTitle="$Resources.Common.NavigationBarTitle, DotWebDev.Web$" FramePageTitle="$Resources.Common.FramePageTitle, DotWebDev.Web$" HeaderTemplate="~/Templates/Header.ascx" DefaultPageUrl="Default.aspx" DefaultTabTitle="$Resources.Common.DefaultTabTitle, DotWebDev.Web$" EnableMultipleTabs="true" MaximumTabs="10"/>

Stack trace:

à DotWebDev.Platform.HttpAuthenticationContext.Login(String username, String password)
   à DotWebDev.Web.LogOn.ButtonLogin_Click(Object sender, EventArgs e)

2015-07-27 13:13:11,536  ERROR  DotWebDev.Platform.Linq.MembershipDbProvider  [(null)]  -  System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
   à DotWebDev.Platform.Linq.MembershipDbProvider.EncodePassword(String password, String passwordSalt, Int32 passwordFormat)
   à DotWebDev.Platform.Linq.MembershipDbProvider.Login(String username, String password)

2015-07-27 13:13:11,565  ERROR  ASP.logon_aspx  [(null)]  -  System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
   à DotWebDev.Platform.Linq.MembershipDbProvider.EncodePassword(String password, String passwordSalt, Int32 passwordFormat)
   à DotWebDev.Platform.Linq.MembershipDbProvider.Login(String username, String password)
   à DotWebDev.Platform.HttpAuthenticationContext.Login(String username, String password)
   à DotWebDev.Web.LogOn.ButtonLogin_Click(Object sender, EventArgs e)

2015-07-27 13:14:07,611  ERROR  DotWebDev.Platform.Linq.MembershipDbProvider  [(null)]  -  System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
   à DotWebDev.Platform.Linq.MembershipDbProvider.EncodePassword(String password, String passwordSalt, Int32 passwordFormat)
   à DotWebDev.Platform.Linq.MembershipDbProvider.Login(String username, String password)

2015-07-27 13:14:07,611  ERROR  ASP.logon_aspx  [(null)]  -  System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
   à DotWebDev.Platform.Linq.MembershipDbProvider.EncodePassword(String password, String passwordSalt, Int32 passwordFormat)
   à DotWebDev.Platform.Linq.MembershipDbProvider.Login(String username, String password)
   à DotWebDev.Platform.HttpAuthenticationContext.Login(String username, String password)
   à DotWebDev.Web.LogOn.ButtonLogin_Click(Object sender, EventArgs e)

2015-07-27 13:14:26,127  ERROR  DotWebDev.Platform.Linq.MembershipDbProvider  [(null)]  -  System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
   à DotWebDev.Platform.Linq.MembershipDbProvider.EncodePassword(String password, String passwordSalt, Int32 passwordFormat)
   à DotWebDev.Platform.Linq.MembershipDbProvider.Login(String username, String password)

2015-07-27 13:14:26,127  ERROR  ASP.logon_aspx  [(null)]  -  System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
   à DotWebDev.Platform.Linq.MembershipDbProvider.EncodePassword(String password, String passwordSalt, Int32 passwordFormat)
   à DotWebDev.Platform.Linq.MembershipDbProvider.Login(String username, String password)
   à DotWebDev.Platform.HttpAuthenticationContext.Login(String username, String password)
   à DotWebDev.Web.LogOn.ButtonLogin_Click(Object sender, EventArgs e)