This guy demonstrates how to render a report by passing a scripty-VB file with extension .rss into the utility :
http://www.sqljunkies.com/Article/B197B9E7-EF3D-4D70-9B5E-47B74E57EF38.scuk
And this guy explains some of the underlying principles behind this marvel of modern software engineering :
http://odetocode.com/Blogs/scott/archive/2005/01/30/975.aspx
What I'm trying to do is build a script that deploys my whole suite of reports to the report server. I've built a test class that mirrors the functionality of my RSS script, because error handling in the RS utility distills every error message to this beauty :
error BC30456: 'Main' is not a member of '_ScriptClass'.
When I run my VB class, I'm consistently getting "http state 401 : Access Denied" when I make an rs call. For instance my create statement
rs.CreateReport(report, serverPath, True, definition, Nothing)
and K. Scott Allen's simple
rs.GetSystemPermissions() Both return 401. I'm assuming there are a dozen layers of security I have yet to uncover in my quest. My question : why do I have permissions to do this through my browser but not in code? And then, which specific hoops must i jump through in order to give myself access to do this?
I've discovered i can dodge this problem by running the command prompt window as a user who has Administrator privileges on the server. This is what my shortcut looks like :
%windir%\system32\runas.exe /profile /user:DOMAIN\AdminUser /savecred %windir%\system32\cmd.exe
Of course the preferred way to accomplish this would be to give myself access without giving myself Admin privileges. Any thoughts?
|||What is the command line you are using to execute rs.exe?|||rs -i DeployAllFinancialReports.rss -s http://ServerName/ReportServer
No comments:
Post a Comment