如何解决这个问题呢? Windows身份验证在本地正常工作,但在服务器Windows身份验证无法正常工作时生成错误。 [英] How to solve this problem? Windows authentication working properly locally but in server windows authentication not working it's an error generate.

查看:146
本文介绍了如何解决这个问题呢? Windows身份验证在本地正常工作,但在服务器Windows身份验证无法正常工作时生成错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何解决此问题Windows身份验证正常工作但在服务器Windows身份验证无法正常工作时生成错误?



401 - 未经授权:由于凭据无效,访问被拒绝。





在Web.config中

______________



How to solve this problem Windows authentication working properly but in Server Windows Authentication not working it's an error generate?

401 - Unauthorized: Access is denied due to invalid credentials.


In Web.config
______________

<system.web>
   <authentication mode="Windows"></authentication>
   <!--<authorization>
     <deny users="?" />
   </authorization>-->

   <trust level="Full" />
   <httpRuntime targetFramework="4.5" />
   <compilation targetFramework="4.5" />
   <pages>
     <namespaces>
       <add namespace="System.Web.Helpers" />
       <add namespace="System.Web.Mvc" />
       <add namespace="System.Web.Mvc.Ajax" />
       <add namespace="System.Web.Mvc.Html" />
       <add namespace="System.Web.Routing" />
       <add namespace="System.Web.Optimization" />
     </namespaces>
   </pages>
   <customErrors mode="Off"></customErrors>
 </system.web>





我的尝试:



在Web.config中

______________





What I have tried:

In Web.config
______________

<system.web>
   <authentication mode="Windows"></authentication>
   <!--<authorization>
     <deny users="?" />
   </authorization>-->

   <trust level="Full" />
   <httpRuntime targetFramework="4.5" />
   <compilation targetFramework="4.5" />
   <pages>
     <namespaces>
       <add namespace="System.Web.Helpers" />
       <add namespace="System.Web.Mvc" />
       <add namespace="System.Web.Mvc.Ajax" />
       <add namespace="System.Web.Mvc.Html" />
       <add namespace="System.Web.Routing" />
       <add namespace="System.Web.Optimization" />
     </namespaces>
   </pages>
   <customErrors mode="Off"></customErrors>
 </system.web>

推荐答案

您只需要在IIS中正确设置网站即可。我们显然不能为你这样做,所以你必须这样做。但是,我首先会看一下在IIS中运行应用程序池的身份。重置该帐户,因为这很可能是您的错误发生的地方。
You just need to setup the site in IIS properly. We can't do that for you obviously, so you will have to do it. However, I would first look at the identity used to run the Application Pool in IIS. Reset that account because that is most likely where your error is coming from.


这篇关于如何解决这个问题呢? Windows身份验证在本地正常工作,但在服务器Windows身份验证无法正常工作时生成错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆