Report Viewer Error Xmlserializer and Temp Directory
I'm using the Reportviewer to view a report on a publicly hosted web server. I'm getting the following error:Access to the temp directory is denied. Identity 'Windows\windowsacount' under which XmlSerializer is running does not have sufficient permission to access the temp directory. CodeDom will use the user account the process is using to do the compilation, so if the user doesnt have access to system temp directory, you will not be able to compile. Use Path.GetTempPath() API to find out the temp directory location.What is the temp directory a reporting server uses?DJ Baby Anne's Biggest Fan................
July 9th, 2009 3:17pm

Hi Abercrombie07, It seems you want to render a server report using the ReportViewer control. However, you have received the error Access to the temp directory is denied. Identity 'Windows\windowsacount' under which XmlSerializer is running does not have sufficient permission to access the temp directory. CodeDom will use the user account the process is using to do the compilation, so if the user doesnt have access to system temp directory, you will not be able to compile. Use Path.GetTempPath() API to find out the temp directory location. When we use an ASP.NET web service/client, a temporary serialization assembly is generated by it several times, in particular a serialization code is first generated and csc.exe compiler is launched in order to create a temp assembly. The SQL Server Reporting Services is an ASP.NET web service. So, Reporting Service will use csc.exe to compile temp assemblies into temp folder. The aforementioned error describes a failure in the temp assembly generation. The NETWORK Service account does not have sufficient permission to access the temp directory. To solve the issue, please follow these steps: 1. By Right clicked on My Computer -> Properties -> Advanced -> Environment Variables Under System variables, ensure Variable TEMP and TMP point to the default location C:\WINDOWS\TEMP 2. Give Full permission to the Network service account for the Temp Directory The following article describes the same behavior. http://blogs.msdn.com/andreal/archive/2009/04/18/could-not-find-file-c-windows-temp-dll.aspx Please feel free to ask, if you have any more questions. Thanks, Jin ChenJin Chen - MSFT
Free Windows Admin Tool Kit Click here and download it now
July 13th, 2009 9:34am

Another useful article:http://weblogs.asp.net/israelio/archive/2004/06/25/165545.aspxJin Chen - MSFT
July 13th, 2009 9:34am

Thanks Jin. The reports on a public hosted server and I'm running the web code in debug mode on my laptop. That's the problem I have. Thanks again.DJ Baby Anne's Biggest Fan................
Free Windows Admin Tool Kit Click here and download it now
July 13th, 2009 7:22pm

Thanks Jin, for helping resolve this issue. I had: TEMP set as C:/WINDOWS/TEMP TMP set as C:/TEMP The security was set up correctly for C:/WINDOWS/TEMP for user: [SERVERNAME]\SQLServer2005ReportingServicesWebServiceUser$[SERVERNAME]$MSSQLSERVER Adding this user and matching the (default) security permissions fixed the issue. Full Control was not necessary, only the default permissions: Read & execute, List folder contents, Read. However, when clicking "View Report", the following error was received in the report data area: Access to the path is denied. This was resolved by giving Full Permissions to C:/TEMP Stuart Steedman
June 23rd, 2010 1:59pm

God bless you for this post. My you have a long and prosperous life. It fixed my issue
Free Windows Admin Tool Kit Click here and download it now
February 28th, 2011 10:31am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics