Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error on server when trying to show Crystal Report

I am getting below error while generating report using crystal report: Error in File C:\Windows\TEMP\repEnquiry {095737EB-07B4-437D-9E86-85780B7417B0}.rpt: Access to report file denied. Another program may be using it.

For this i did google and found some solutions but still its not working: what i tried: -given full access to aspnet and network services on my root directory and reports folder and then restarted iis.

OS:windows server 2008(64) vs2008 application.

but still getting same error.

like image 319
Dr. Rajesh Rolen Avatar asked Dec 17 '22 21:12

Dr. Rajesh Rolen


2 Answers

"Access to report file denied. Another program may be using it."

This is a very misleading error message, and usually has nothing to do with another program. The actual filename will differ based on your configuration, but the entire error message will be the same, similar to what's shown below.

Usually, the ASPNET user does not have write permission granted to it, and especially not on the root directory. The solution in this case was to change the output directory to a subfolder of the web root, and grant ASPNET Modify permissions on that folder. If you're using Windows Server 2003, you need to grant permissions to Network Service, not ASPNET.

If you have configured your application to run as a user other than ASPNET, you need to make sure that user has the permissions described above. On Windows Server 2003, you need to grant permissions to NetworkService user, not ASPNET. The .NET Framework on Win2K3 uses NetworkService, while on Win2K, ASPNET.

provide write permission on c:\windows\temp

Dot forgot to restart IIS after setting permissions on folder: go to run type iisreset and press enter.

Please Refer to below link for full description.....

http://dotnetacademy.blogspot.com/2010/09/crystal-reports-net-error-access-to.html

like image 59
JSJ Avatar answered Jan 08 '23 00:01

JSJ


I know the questioner was using Windows 2008, but in case anyone, like I, finds this question when searching for this error in a Windows 2012/IIS8 world. The name of the account that needs access to C:\Windows\Temp is now IIS_USRS.

like image 27
Brandon Barkley Avatar answered Jan 07 '23 23:01

Brandon Barkley