Reputation: 10998
I have an ASP.NET site using role based security via the SQLMemberShipProvder.
Is it possible to provide internet access to SSRS reports using my existing MembershipProvider roles?
For example, if I have a role SupportPersonRole, can I allow only people in that role to use certain reports?
The docs say SQL 2008 R2 uses basic auth to the local security authority. However if SSRS can only present it's own basic auth login for SSRS content, I'm not sure how I would get a chance to authorize using the MembershipProvider roles.
The ASP.Net page needs to handle report parameter prompting so it seems this implies "remote" mode is appropriate to get this functionality.
The confusing part is SSRS (in remote mode) has it's own role security credentials, which are separate from ASP.Net role based security. So how do you avoid managing security in both places?
Upvotes: 4
Views: 958
Reputation: 17388
You could also render a LocalReport
to the output of your choice. This can be a good option if you don't need as many choices as the control offers.
// Controller Action
public ActionResult GetReport(ReportParameters foo)
{
string mimeType;
var stream = foo.RenderReport(out mimeType);
return new FileStreamResult(stream, mimeType);
}
class ReportParameters {
public Stream RenderReport(out string mimeType)
{
var localReport = new LocalReport();
// ... TODO: Set up report data sources render call out variales, etc.
byte[] renderedBytes;
renderedytes = localReport.Render(
reportType,
deviceInfo,
out mimeType,
out encoding,
out fileNameExtension,
out streams,
out warnings);
return new MemoryStream(renderedBytes);
}
}
Upvotes: 4
Reputation: 33867
If you include the report viewer control in your site, you can then limit who can see this page, and what reports they can run via your site front end.
Your connection through to the SSRS server (from web server to it), can then be secured so that only your site can access these reports.
Upvotes: 4