KBA-01165: “The current identity (NT AUTHORITYNETWORK SERVICE) does not have write access…”

Question:

I want access to an account but when I connect to SQL Reporting Services (SRS), the following error appears.  What can I do?

‘The current identity (NT AUTHORITYNETWORK SERVICE) does not have write access to ‘D:WINDOWSMicrosoft.NETFrameworkv2.0.50215Temporary ASP.NET Files‘
Error Detail:
Server Error in ‘/xxxxxxxx‘ Application.
——————————————————————————–
The current identity (NT AUTHORITYNETWORK SERVICE) does not have write access to ‘D:WINDOWSMicrosoft.NETFrameworkv2.0.50215Temporary ASP.NET Files‘.
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.Web.HttpException: The current identity (NT AUTHORITYNETWORK SERVICE) does not have write access to ‘D:WINDOWSMicrosoft.NETFrameworkv2.0.50215Temporary ASP.NET Files‘.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[HttpException (0x80004005): The current identity (NT AUTHORITYNETWORK SERVICE) does not have write access to ‘D:WINDOWSMicrosoft.NETFrameworkv2.0.50215Temporary ASP.NET Files‘.]
System.Web.HttpRuntime.InitFusion() +3481615
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +158

[HttpException (0x80004005): The current identity (NT AUTHORITYNETWORK SERVICE) does not have write access to ‘D:WINDOWSMicrosoft.NETFrameworkv2.0.50215Temporary ASP.NET Files‘.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3427591
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +147

——————————————————————————–
Version Information: Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44

Answer:

You can grant access to this account explicitly using the aspnet_regiis -ga switch, for example:
C:WINDOWSMicrosoft.NETFrameworkv2.0.50215>aspnet_regiis -ga ‘NT AuthorityNetwork Service‘
Note: There are two IIS Registration Tools that ship with the .NET Framework; one for standard systems and one for 64-bit system. The tool for 64-bit systems in located in the Framework64 directory of the Microsoft.NET directory inside the Windows folder; for example C:WINDOWSMicrosoft.NETFramework64v2.0.50727 would contain the IIS Registration Tool.

Additional Comments:

For more information, see the following MSDN article:  http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedb…


KBA-01165; Last updated: October 13, 2016 at 13:24 pm;
Keywords:  SRS access rights