Monday 16 November 2009

Fixing rsAccessDenied on Vista / Windows 7

When I upgraded myself from Windows XP to Windows 7 a while ago, I had to install all my developer tools again. I use SQL Server Reporting Services 2008 on my development machine and it installed fine. All the prerequisites were installed correctly and everything seemed to be installed correctly.

I went to the usual http://localhost/Reports and got an rsAccessDenied error on the page. Thinking that maybe it was an issue with localhost I tried http://<machinename>/Reports and still the same error.

Now at this stage I was a bit stumped. My gut instinct was telling me that Windows 7 UAC was the issue here and that some communication between the browser and the Reporting Server was at fault. So I ran the browser as an administrator and viola it worked.

I found this Microsoft Knowledge Base article which details how to install Reporting Services on Vista but it should be ok for Windows 7 and SQL Server 2008 SP1

VS2008The same issue also reared its head when I tried to publish reports to the server. Again the fix was to run the Visual Studio IDE as an Administrator.

In Windows 7 you can set the properties for this on the executable itself.

Right click on the devenv.exe file (not the XML settings file) and click properties

Click Compatibility and the select “Run the program as an administrator” option.

Using this method will allow you to double click the solution files (.sln) and automatically run the program as an administrator

You can see the dialog to the left (click to enlarge)

No comments: