错误信息:401.2未经授权:登录失败,服务器配置。当应用程序部署 [英] Error message 401.2.: Unauthorized: Logon failed due to server configuration. When application deployed
问题描述
我有一个asp.net 4.0应用程序,根据卡西尼工作正常运行,但是当我部署到IIS我得到上述错误。它是一些其他的应用程序使用默认的应用程序池和做工精细下运行。这里是我的web配置的一个副本,可以是源:
<! -
有关如何配置ASP.NET应用程序的更多信息,请访问:
http://go.microsoft.com/fwlink/?LinkId=169433
- ><结构>
<&是connectionStrings GT;
<添加名称=FMLconnect的connectionString =服务器= 192.168.20.125;港口=;数据库= FML; UID = ******; PWD = *****;池=假;的providerName =MySql.Data.MySqlClient/>
< /&是connectionStrings GT; <&的System.Web GT;
<&HttpHandlers的GT;
<添加路径=ChartImg.axd动词=GET,HEAD,POSTTYPE =System.Web.UI.DataVisualization.Charting.ChartHttpHandler,System.Web.DataVisualization,版本= 4.0.0.0,文化=中立,公钥= 31bf3856ad364e35验证=FALSE/>
<添加路径=ChartImage.axdTYPE =Telerik.Web.UI.ChartHttpHandler动词=*确认=FALSE/>
<添加路径=Telerik.Web.UI.SpellCheckHandler.axdTYPE =Telerik.Web.UI.SpellCheckHandler动词=*确认=FALSE/>
<添加路径=Telerik.Web.UI.DialogHandler.aspxTYPE =Telerik.Web.UI.DialogHandler动词=*确认=FALSE/>
<添加路径=Telerik.RadUploadProgressHandler.ashxTYPE =Telerik.Web.UI.RadUploadProgressHandler动词=*确认=FALSE/>
<添加路径=Telerik.Web.UI.WebResource.axdTYPE =Telerik.Web.UI.WebResource动词=*确认=FALSE/>
<添加路径=Reserved.ReportViewerWebControl.axd动词=*TYPE =Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,版本= 10.0.0.0,文化=中性公钥= b03f5f7f11d50a3a验证= 假/>
<加上TYPE =Telerik.ReportViewer.WebForms.HttpHandler,Telerik.ReportViewer.WebForms,版本= 5.1.11.928,文化=中性公钥= a9d7983dfcc261be路径=Telerik.ReportViewer.axd动词=*确认= 真/>
< / HttpHandlers的>
<编译调试=真targetFramework =4.0>
<&集会GT;
<添加组件=Microsoft.Build.Framework,版本= 4.0.0.0,文化=中性公钥= B03F5F7F11D50A3A/>
<! - <添加组件=Microsoft.ReportViewer.Common,版本= 10.0.0.0,文化=中性公钥= B03F5F7F11D50A3A/>
<添加组件=Microsoft.ReportViewer.WebForms,版本= 10.0.0.0,文化=中性公钥= B03F5F7F11D50A3A/> - >
<添加组件=System.Data.Linq程序,版本= 4.0.0.0,文化=中性公钥= B77A5C561934E089/>
<添加组件=System.Design,版本= 4.0.0.0,文化=中性公钥= B03F5F7F11D50A3A/>
<添加组件=System.Management,版本= 4.0.0.0,文化=中性公钥= B03F5F7F11D50A3A/>
<添加组件=System.Web.DataVisualization,版本= 4.0.0.0,文化=中性公钥= 31BF3856AD364E35/>
< /组件>
< /编译>
< /system.web> < system.webServer>
<验证validateIntegratedModeConfiguration =FALSE/>
<模块runAllManagedModulesForAllRequests =真/>
< /system.webServer>
< /结构>
通过IIS,这真的只是听起来像你需要检查身份验证设置在IIS管理您的应用程序。尝试此链接: http://support.microsoft.com/kb/253667
这是IIS6,你没有提到你是否在使用IIS 6或7。对于IIS 7,试试这个: HTTP ://support.microsoft.com/kb/942043
I have an asp.net 4.0 application that works fine running under cassini but when i deploy to IIS i get the above error. It is running under the Default App pool which a number of other apps use and work fine. Here is a copy of my web config which may be the source:
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="FMLconnect" connectionString="Server=192.168.20.125;Port=;Database=FML;Uid=******;Pwd=*****;pooling=false;" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
<system.web>
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/>
<add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>
<add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>
<add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/>
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
<add type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=5.1.11.928, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" validate="true"/>
</httpHandlers>
<compilation debug="true" targetFramework="4.0" >
<assemblies>
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<!--<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>-->
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
</configuration>
With IIS, this really just sounds like you need to check the authentication settings for your app in IIS Admin. Try this link: http://support.microsoft.com/kb/253667
This is for IIS6, you didn't mention whether you were using IIS 6 or 7. For IIS 7, try this: http://support.microsoft.com/kb/942043
这篇关于错误信息:401.2未经授权:登录失败,服务器配置。当应用程序部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!