Prev: NULL Parameter in Data Driven Subscription
Next: "Action Canceled" Message when running the Report
From: Steven Cheng[MSFT] on 25 Jul 2006 22:03 Thanks for your followup John, I think the non-default installed location of the webservice could be the potential cause as the configuration file of reportserver contains some settings that identitfy the webservice's url(virtual directory or server url). Before you performing the reinstall, I still suggest you have a look at the following threads and tried the settings mentioned there: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=256312&SiteID=1 #Installing Microsoft SQL Server 2005 Reporting Services on a non-default web site. http://www.mathgv.com/sql2005docs/SQL2005ReportingServicesInstall.htm Hope that also helps. If you meet any further problem or need any assistance, please feel free to let me know. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead This posting is provided "AS IS" with no warranties, and confers no rights.
From: Steven Cheng[MSFT] on 25 Jul 2006 22:08 Hello Rwiethorn, Yes, 401 error indicate that the supplied credential (security identity) is not valid. What's your client appilcation(calling the SSRS webservice)'s type, winform or asp.net? You can first try changing your client appliation's security identity to a valid account which is recognizable on the remote server to see whether it works. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead This posting is provided "AS IS" with no warranties, and confers no rights.
From: rwiethorn on 26 Jul 2006 09:16 Steven Thanks for your response. To answer your questions: >What's your client application(calling the SSRS webservice)'s type, winform or asp.net? Its an ASP.NET application. >You can first try changing your client application’s security identity to a valid account which is recognizable on the remote server to see whether it works. I've done that using the SOAP API Render method, and rendering the report to a Response Object works perfectly. (Response.BinaryWrite(data)) When I use the SOAP method, I assign credentials to the RS object via this method: RS.Credentials = New System.Net.NetworkCredential(“MyName”, “MyPWD”, “MyDomain”) Then proceed to assign the other propeties ie: parameters, and call the Render method of the RS object as so: data = RS.Render(Path2, Format, Nothing, Nothing, Parameters, Nothing, Nothing, Encoding, MimeType, ParametersUsed, Warnings, StreamIDs) When I try to use the ReportViewer Control, I’m getting an error: “Unable to cast object of type 'System.Net.NetworkCredential' to type 'Microsoft.Reporting.WebForms.IReportServerCredentials'”. From the following lines of code: Dim RC As New NetworkCredential("strUserName_Dev", "strPWD_Dev", "strDomain_Dev") ReportViewer1.ServerReport.ReportServerCredentials = RC ReportViewer1.ServerReport.ReportPath = "/PA/CASNO_with_UNASSIGNED" ReportViewer1.ServerReport.Refresh() I’ve also tried: Dim CC As New System.Net.CredentialCache CC.Add(New Uri("http://bdcintra557.internal.pg.com/ReportServer$SQL2005/ReportService.asmx"), "Digest", New System.Net.NetworkCredential("strUserName_Dev", "strPWD_Dev", "strDomain_Dev")) ReportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = CC ReportViewer1.ServerReport.ReportPath = "/PA/CASNO_with_UNASSIGNED" ReportViewer1.ServerReport.Refresh() But I get an error trying to assign the CredentialCache to the ReporViewer Control: Property 'NetworkCredentials' is 'ReadOnly' I need help to assign these same NetworkCredentials to the ReportViewer Control. I just don’t know the VB syntax to do it; I’m not a very strong programmer. Thanks, Robert Wiethorn rwiethorn "Steven Cheng[MSFT]" wrote: > Hello Rwiethorn, > > Yes, 401 error indicate that the supplied credential (security identity) is > not valid. What's your client appilcation(calling the SSRS webservice)'s > type, winform or asp.net? You can first try changing your client > appliation's security identity to a valid account which is recognizable on > the remote server to see whether it works. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > This posting is provided "AS IS" with no warranties, and confers no rights. > > > > > >
From: Steven Cheng[MSFT] on 27 Jul 2006 05:29 Hello Robert, AS for the ReportViewer's Credential property, you can not directly use the System.Net.NetworkCredential class, you need to implement a custom IReportCredential interface's concrete class. Here is a previous thread in which I've provided a sample IReportCredential implementation: http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/brow se_thread/thread/359cd6fce6f3ab37/dadf62fe2aed9f87?lnk=st&q=&rnum=1&hl=en#da df62fe2aed9f87 In addition, do you think it's also possible that we programmatically imerpsonate the ASP.NET worker thread as a specific user(which has sufficient permission on the remote server)? If so, you can programmtically impersonate in the reportviewer page (as a specific account) so that you do not need to implement a custom ReportCredential class. For programmtic impersonate in ASP.NET, please refer to the following kb: #How to implement impersonation in an ASP.NET application http://support.microsoft.com/kb/306158/en-us Hope this helps. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead This posting is provided "AS IS" with no warranties, and confers no rights.
From: rwiethorn on 28 Jul 2006 11:39 Steven, Thanks for the info, and all I can say is wow, thats going deep, but I got it to work, I'll paste the code that I found after following a couple of links: Public Class MyReportViewerCredentials Implements IReportServerCredentials Private _userName As String Private _password As String Private _domain As String Public Sub New(ByVal userName As String, ByVal password As String, ByVal domain As String) _userName = userName _password = password _domain = domain End Sub Public ReadOnly Property ImpersonationUser() As System.Security.Principal.WindowsIdentity Implements Microsoft.Reporting.WebForms.IReportServerCredentials.ImpersonationUser Get Return Nothing End Get End Property Public ReadOnly Property NetworkCredentials() As System.Net.ICredentials Implements Microsoft.Reporting.WebForms.IReportServerCredentials.NetworkCredentials Get Return New Net.NetworkCredential(_userName, _password, _domain) End Get End Property Public Function GetFormsCredentials(ByRef authCookie As System.Net.Cookie, ByRef userName As String, ByRef password As String, ByRef authority As String) As Boolean Implements Microsoft.Reporting.WebForms.IReportServerCredentials.GetFormsCredentials userName = _userName password = _password authority = _domain Return Nothing End Function End Class I then call that class in using: ReportViewer1.ServerReport.ReportServerCredentials = New MyReportViewerCredentials(strUserName_Dev, strPWD_Dev, strDomain_Dev) ReportViewer1.ServerReport.Refresh() Here is the link I found: http://forums.asp.net/thread/1271383.aspx Thanks for the help. rwiethorn "Steven Cheng[MSFT]" wrote: > Hello Robert, > > AS for the ReportViewer's Credential property, you can not directly use the > System.Net.NetworkCredential class, you need to implement a custom > IReportCredential interface's concrete class. Here is a previous thread in > which I've provided a sample IReportCredential implementation: > > http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/brow > se_thread/thread/359cd6fce6f3ab37/dadf62fe2aed9f87?lnk=st&q=&rnum=1&hl=en#da > df62fe2aed9f87 > > In addition, do you think it's also possible that we programmatically > imerpsonate the ASP.NET worker thread as a specific user(which has > sufficient permission on the remote server)? If so, you can > programmtically impersonate in the reportviewer page (as a specific > account) so that you do not need to implement a custom ReportCredential > class. For programmtic impersonate in ASP.NET, please refer to the > following kb: > > #How to implement impersonation in an ASP.NET application > http://support.microsoft.com/kb/306158/en-us > > Hope this helps. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > This posting is provided "AS IS" with no warranties, and confers no rights. > > > > > >
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: NULL Parameter in Data Driven Subscription Next: "Action Canceled" Message when running the Report |