System.Data.SqlClient.SqlException:从sharepoint站点连接到数据库时,用户'NT AUTHORITY \ ANONYMOUS LOGON'登录失败 [英] System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' error when connect to a database from sharepoint site

查看:91
本文介绍了System.Data.SqlClient.SqlException:从sharepoint站点连接到数据库时,用户'NT AUTHORITY \ ANONYMOUS LOGON'登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个sharepoint web应用程序并使用下面的connectin字符串来连接数据库它在单独的数据库服务器中,当我浏览shaepoint网站我得到以下错误



i给予web应用程序池帐户数据库的db_onwer权限



描述:执行期间发生了未处理的异常o f当前的Web请求。请查看堆栈跟踪以获取有关错误及其源自代码的更多信息。



异常详情: System.Data.SqlClient.SqlException:用户'NT AUTHORITY \ANONYMOUS LOGON'登录失败



  < add name =" xxConnectionString" connectionString =" Data Source = SQL_xx; Initial Catalog = xxPOLL; Integrated Security = True"的providerName = QUOT; System.Data.SqlClient的" />




adil

解决方案

嗨adilahmed,


请在连接字符串中指定用户名和密码,而不是Integrated Security = True,因为设置Integrated Security = True将使用当前的Windows帐户凭据:

< add name =" MyConnectionString"的connectionString = QUOT;服务器= SQL;数据库=雇员; UID = TESTUSER;密码= Access1" /> 

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


谢谢


最好的问候


HI i have a sharepoint web application and using below connectin string to connect a database it is in seperate database server, when i browse shaepoint site i get below error

i given db_onwer permission on database for application pool account of web application

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

 <add name="xxConnectionString" connectionString="Data Source=SQL_xx;Initial Catalog=xxPOLL;Integrated Security=True" providerName="System.Data.SqlClient" />


adil

解决方案

Hi adilahmed,

Please specify the Username and Password in the Connection String instead of Integrated Security=True, As setting Integrated Security=True will use current windows account credential:

<add name="MyConnectionString" connectionString="Server=SQL;Database=Employee;UID=testuser;Password=Access1" />

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON

Thanks

Best Regards


这篇关于System.Data.SqlClient.SqlException:从sharepoint站点连接到数据库时,用户'NT AUTHORITY \ ANONYMOUS LOGON'登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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