用户'NT AUTHORITY \ ANONYMOUS LOGON登录失败 [英] Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON

查看:670
本文介绍了用户'NT AUTHORITY \ ANONYMOUS LOGON登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个非常简单的网站。

当我从VS2012运行网站时,网站很容易从SQLSERVER获取数据,这些数据是在单独的服务器上运行的(我的意思是SQLSERVER在一台服务器上,我主机我的电脑上的网站作为服务器)。

但是当我在我的电脑IIS上发布网站时,从IIS管理器浏览网站导致以下错误:



用户登录失败'NT AUTHORITY \ANONYMOUS LOGON

I create a very simple website.
when I run website from VS2012 ,website easily can get data from SQLSERVER which run on server which is seperate (I mean SQLSERVER is on one server and I host website on my pc as server).
but when I publish website on my PC IIS,browsing the website from IIS manager cause below error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON

推荐答案

您可能只需要在您的connectionstring中提供用户名和密码并设置Integrated Security = false
You probably just need to provide a user name and password in your connectionstring and set Integrated Security=false


在Windows 2008 Web服务器上的IIS7中...



请转到应用程序池。



选择您的网站。



点击操作面板中的高级设置。



在处理模型下选择身份。



在弹出窗口中,选择自定义帐户单选按钮。 />


设置帐户和密码到您的SQL Server 2008数据库上使用的dbo帐户名和密码。



保存。



在网站下,访问您的网站。在功能视图面板中,选择IIS下的身份验证。在ASP.Net模拟下,确保它已被禁用。



-KR
In IIS7 on your Windows 2008 Web Server...

Please go to Application Pools.

Select your web site.

Click "Advanced Settings" in the "Actions" panel.

Under "Process Model" select "Identity."

In the popup, select the "Custom account" radio button.

"Set" the account and password to your dbo account name and password that are used on your SQL Server 2008 database.

Save that.

Under sites, go to your website. In the Features View panel, select "Authentication" under IIS. Under ASP.Net Impersonation, make sure it's Disabled.

-KR


如果您使用sql server,请使用
对于网站,需要SQL Server身份验证,不要使用Windows身份验证。尝试提供用户名,密码和providerName =System.Data.SqlClient。



尝试纠正web.config文件中connectionString中的datasource
Hi if u use sql server for website,need to SQL Server Authentication,dont use Windows Authentication.Try to give username ,password and providerName="System.Data.SqlClient".

Try to correct datasource in connectionString in web.config file


这篇关于用户'NT AUTHORITY \ ANONYMOUS LOGON登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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