简体   繁体   English

应用程序在VS iis Express中运行,但不在IIS 8中运行

[英]App runs in VS iis express but not in IIS 8

I am having an interesting issue with IIS 8. I can run the app just find. 我在IIS 8中遇到了一个有趣的问题。我可以找到该应用程序。 However after triggering a sql query I get the dreaded "Login failed for user 'NT AUTHORITY\\ANONYMOUS LOGON'". 但是,触发SQL查询后,我得到了可怕的提示:“用户'NT AUTHORITY \\ ANONYMOUS LOGON'登录失败。”

The real kicker to all of this is that when I run in IIS Express with Visual Studio 2013 it works fine. 所有这些的真正起因是,当我在带有Visual Studio 2013的IIS Express中运行时,它运行良好。

IIS Authentication Settings IIS身份验证设置

Web.Config: Web.Config:

<system.web>
    <authentication mode="Windows" />
    <identity impersonate="true" />
    <authorization>
      <deny users="?" />
    </authorization>
</system.web>

Any/All help is appreciated! 任何/所有帮助表示赞赏!

Make sure the account that is running the app pool in IIS has access to SQL server. 确保在IIS中运行应用程序池的帐户有权访问SQL Server。 If that doesn't work then try changing the account that the app pool is running under to like NetworkService or LocalService and see if that has any effect. 如果这不起作用,请尝试将运行应用程序池的帐户更改为类似于NetworkService或LocalService,然后查看是否有效果。

Also try changing some of the other app pool settings in the "Advanced Settings..." dialog such as the managed pipeline mode and enable 32-bit applications. 另外,请尝试在“高级设置...”对话框中更改某些其他应用程序池设置,例如托管管道模式,并启用32位应用程序。

Thanks everyone for the help. 谢谢大家的帮助。

What ended up happening is that we just used a local sql account. 最终发生的事情是,我们只使用了本地sql帐户。

We are going to use AD to control who has access to the page. 我们将使用AD来控制谁有权访问该页面。

Using the <deny roles="DOMAIN\\Domain Users"/> 使用<deny roles="DOMAIN\\Domain Users"/>

option in web config file. Web配置文件中的选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM