[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 612
  • Last Modified:

SQL Server Reporting Services: Unable to Render a Report

I'm trying to render a report in a C# Web Page.  The reporting server is on a different server.  I'm having trouble with the ExecutePermissions.  When I set the permissions using a specific username, password - access is granted and the report renders:

output.ReportExecutionCredentials = (System.Net.ICredentials)new System.Net.NetworkCredential("lusername", "password", "domain");
        //output.ReportExecutionCredentials = (System.Net.ICredentials)System.Net.CredentialCache.DefaultCredentials;

However - I don't have the user's passwords and need to be able to set this dynmcially.  When I try:

output.ReportExecutionCredentials = (System.Net.ICredentials)System.Net.CredentialCache.DefaultCredentials;

the DefaultCredentinals come back as empty and I keep receiving "access denied."  How can I set this without using a username and password so every user on my website can render these reports?

any help would be much appreciated!
       
0
coecho
Asked:
coecho
  • 2
  • 2
2 Solutions
 
EmesCommented:
Use windows authentication using the web user.

and then gran exec permissions on the needed stored procs.


0
 
coechoAuthor Commented:
I don't understand what you mean by the "Web User".  The user is alredy signing on using Windows Authentication.  Are you saying to grant execute permissions on the stored procedures for every single individual signing on?  Can you provide a C# code example of what you're describing?  thanks.
0
 
EmesCommented:
I have not done this in a long time I will try to show you.

need to go to the IIS configuration and get the anonymous  id.

That is the Id that you will need to set in sql server to have access to the procs.

 


reh.bmp
0
 
coechoAuthor Commented:
What if I don't want to allow "anonymous user" access on IIS?  I have it set now to just use Windows Integrated Security.  Is there a way in C# code to allow access?
0
 
60MXGCommented:
You can create a User Group in the domain then add all those users into the group.  In your SQL Server you grant this particular group with access to the database.  

For an example, you create a user group called SQLReportUsers in the Domain Server.  You have User A, User B need to access the database then You add all User A and User B into SQLReportUsers group.  In your SQL Server you grant access to SQLReportUsers group.  I think that will fix your security issues.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now