Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 29, 2013 02:34 PM by pastrami01
Feb 26, 2013 07:53 PM|LINK
Hello , I am opening a report in SSRS on server, here is my code.. The problem that I have is , when try to open the report on click of a button.. It asks me enter network credentials, I hit cancel and I can see the report in excel but the credentail dialog
is irritating to the users..
On local m/c it does do that.. what I am I missing?
private void ShowReport()
rptQAQCReport.ShowCredentialPrompts = false;
string url = ConfigurationReader.GetElementText("ReportUrl");
string path = ConfigurationReader.GetElementText("ReportPath");
rptQAQCReport.ServerReport.ReportServerUrl = new Uri(url);
rptQAQCReport.ServerReport.ReportPath = path + "QAQCReview";
List<ReportParameter> parameters = GetReportParameters(ddlMonth.SelectedItem.Value, ddlYear.SelectedItem.Value);
if (parameters != null && parameters.Count > 0)
rptQAQCReport.ShowParameterPrompts = false;
rptQAQCReport.ShowPromptAreaButton = false;
string deviceInfo = null;
byte bytes = rptQAQCReport.ServerReport.Render(
"Excel", deviceInfo, out mimeType, out encoding,
out streamids, out warnings);
Response.ContentType = mimeType;
Feb 26, 2013 09:15 PM|LINK
I tried the same kind of code to open the file in pdf and it doesn't ask for login credentials, only while opening in excel it does that.. any ideas please?
Feb 26, 2013 10:39 PM|LINK
try using web services like:
Mar 04, 2013 04:09 AM|LINK
Hi, Please check if the option "pronpt for credentials " is selected in datsource properties -->Credential properties
for the mentioned report rdl. If checked you may uncheck that and redeploy and try.
Mar 21, 2013 07:14 PM|LINK
Please mark if any of the responses were helpful.
Apr 29, 2013 08:13 AM|LINK
did you solve your issue? I have the exact same problem at the moment.
As far as i can tell Excel knows that the file came from a Webresource and tries to open it directly on the server via WebDAV and therefore asks for the credentials. If you click cancel it just opens the local version.
Would be nice if you could share your solution.
Apr 29, 2013 02:34 PM|LINK
So I figured it out ...
I had the ContentDispositionType of the Response configured as "Inline"
A body part should be marked with a DispositionType property of "inline" if it is intended to be displayed automatically upon display of the message. A body part can be designated with a DispositionType property
of "attachment" to indicate that they are separate from the main body of the HTTP request or response.
when i changed it from:
Response.AddHeader("Content-Disposition", "inline; filename=ExcelReport.xls");
Response.AddHeader("Content-Disposition", "Attachment; filename=ExcelReport.xls");
it still showed me the same prompt:
open / save / cancel
when i now click on open it acutally uses the file from the local Temp folder and doesn't try to open the file from the server -> so the prompt for the credentials doesn't appear any more...
hope this helps others!
Maybe also worth mentioning: this problem is not SSRS specific but can happen with every office document that is pushed inline into the HTTPResponse!