四 错误处理篇 How to Fix Login Failed For User NT AUTHORITY IUSRS in SharePoint 2013 ...

转载 2015年07月08日 18:52:33

If you have created an external content type and are trying to access it in a list and get "AccessDenied" then that is because you have not given permissions to the logged in user to use that external content type. You can easily give permissions to that user or to all users in your site by going to the Central Administration site and configuring the business connectivity service. For the exact procedure of how to do it read the following.

SharePoint 2013 Business Connectivity Service Access DeniedError: http://mosshosting.asphostportal.com/?p=2650

Some users get another very interesting error message after they have assigned permissions on the external content type. The error message is:

Message from ExternalSystem: "Login failed for user 'NT AUTHORITY\IUSR'.".

Profiles-In-SharePoint.jpg

This error occurs because the database does recognize the credentials passed from SharePoint. Which database? The database that you are connecting to in your external content type! It depends on whether you have setup an application pool identity in SharePoint. If you are not using a managed service account for your services then you are most likely to get this error. This is not likely to occur in corporate environments but in home or test environments where users use "LOCAL SYSTEM" or "NETWORK SERVICE" in application pools, this error will occur. This is because" NETWORKSERVICE" translates to "NTAUTHORITY\IUSR" when credentials are passed from a web server to the database server. "IUSR" is used when user credentials are not available, for example, for anonymous users. To resolve this problem, either change the application pool identity or add "NT AUTHORITY\IUSR" to the database permissions. The first scenario is quite common. You can change application pool identity by going to the web server and updating the application pools or by logging into the SharePoint Central Administration site and going to" ManageService Accounts". We will cover the second scenario here; that is, to add IUSR to the database.

1. Go to Microsoft SQL Server Management Studio and connect to your database server.
2. Expand the Security node and right-click the Logins node and select New Login.

Login-In-Database-Server.jpg

3. In the Login Name, enter IUSR and click "Search….". This will open a new search box. Enter "IUSR" in the object name and click "Check Names". Click "OK".
4. You will notice that the Login Name has been populated with "MACHINENAME\IUSR" where "MACHINENAME" is your machine name, for example, in the figure below, you see "SP2013\IUSR. SP2013" is my machine name.

configure-user--using machine-name-in-databse.jpg

This is not what you want to add to the logins. Change "MACHINENAME" to "NT AUTHORITY" so Login Name should read "NT AUTHORITY\IUSR". Click "OK".

5. Now you may think that the user has been added and your external content type will work. Right? Wrong! You still have to map the user to the database, otherwise you will get the following error on the list page (where you are trying to load external content type):

The query against the database caused an error

error-in-configure-database.jpg

This error occurs, as I said, because the user is not yet mapped to the database.

6. To map the user to the database, right-click "NT AUTHORITY\IUSR" in Logins and select "Properties"

Map-User-to-Database.jpg
7. There are two ways to do this mapping. One way is to add the user to one of the server roles, for example,  server adminorsys admin. This will provide useful rights to all databases and thus you won't have to do explicit mapping. To do this, on the properties page, click ServerRoles and check sysadmin. Click "OK". Obviously you would not want to do this in a real environment. So the other option is to map the user directly to the database that has been used in the external content type.

Mapping-user-using-server-roles.jpg

To add a user mapping, in "LoginProperties", click "User Mapping". Locate the database in the list and then check the box in the Map column. As soon as you check the box, "NT AUTHORITY\IUSER" appears in the User column. That's it. Click OK to save the setting. By the way, on the same properties page, you can also assign database role membership to the user for the database but that is not required.

Mapping-User-Using-Login-Properties.jpg

Now, go back to the list page and reload it. You will see results from the external data source. Hope you enjoy this tutorial.

解决IIS中Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

1.在应用程序池中新建一个应用程序池 2.版本选择.net4,配置自己的wndows账户 3.将原有报错网站的应用程序池替换掉。...
  • xiaoguang44
  • xiaoguang44
  • 2011年10月17日 15:44
  • 3414

SSIS package出错报login failed for user 'nt authority\anonymous logon'的解决办法

问题链接:http://social.msdn.microsoft.com/Forums/sqlserver/en-US/35139786-12bd-424a-9a60-27b5de981cd6/lo...
  • rav009
  • rav009
  • 2014年06月27日 12:36
  • 3486

SQLServer JOB无法运行的问题。

今天建一个JOB 一直无法运行。显示错误信息为: Message Executed as user: NT AUTHORITY\SYSTEM. Login failed for user 'OS\...
  • delphigbg
  • delphigbg
  • 2013年07月22日 10:48
  • 684

NT AUTHORITY/Authenticated Users

NT AUTHORITY/Authenticated Users
  • snowman_sp
  • snowman_sp
  • 2005年08月26日 09:32
  • 1263

我也说说:用户 'NT AUTHORITY/NETWORK SERVICE' 登录失败

在网上搜索“用户 NT AUTHORITY/NETWORK SERVICE 登录失败”这个错误,可以看到很多解答都有一条将“NETWORK SERVICE”账户加入 Administrators组的步...
  • net_lover
  • net_lover
  • 2008年05月11日 00:47
  • 11836

[ASP.NET2.0][aspnetdb_log.ldf]Login failed for user 'NT AUTHORITY/NETWORK SERVICE'

错误信息大致如下:Cannot open user default database. Login failed. Login failed for user NT AUTHORITY/NETWORK...
  • Jresins
  • Jresins
  • 2006年07月31日 13:33
  • 2004

用户 'NT AUTHORITY/SYSTEM' 登录失败。

问题描述:[298] SQLServer 错误: 18456,用户 NT AUTHORITY/SYSTEM 登录失败。 [SQLSTATE 28000]解决方法:查询分析器里面执行sp_grantlo...
  • codeshark
  • codeshark
  • 2008年05月30日 23:13
  • 8639

NT AUTHORITY\NETWORK SERVICE 权限问题 NT AUTHORITY\NETWORK SERVICE 权限问题

错误描述信息: The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'X:\WIN...
  • jjkliu
  • jjkliu
  • 2014年04月02日 11:29
  • 650

SharePoint 2013 Search Keyword Query Class

原文地址  SharePoint 2013 Search Keyword Query Class 本文由SPFarmer翻译 在过去旧版本的SharePoint中,我已经写过一些关于如何使用搜索...
  • SPFarm
  • SPFarm
  • 2015年03月16日 15:07
  • 1168

NT AUTHORITY/LOCAL SERVICE

I am making a Windows service application using the C# .Net framework.I have installed the setup and...
  • JOEMAIL
  • JOEMAIL
  • 2007年05月29日 17:59
  • 1969
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:四 错误处理篇 How to Fix Login Failed For User NT AUTHORITY IUSRS in SharePoint 2013 ...
举报原因:
原因补充:

(最多只允许输入30个字)