none
ReportViewer control on a multi-instance Azure webrole RRS feed

  • Question

  • Dear all,

    I have a SSRS running on my own server accessed via http://<myserver's IP address>/ReportServer and I would like to host the ReportViewer control on Azure with 2 instances.

    I created a 'session-less' control using IReportServerConnection as per this guide "Using the ReportViewer ASP.NET Control in Windows Azure" but I get an "unauthorized" error message below.

    [WebException: The request failed with HTTP status 401: Unauthorized.]
       System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1787275
       System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +345
       Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.<>c__DisplayClass38.<LogonUser>b__37() +28
       Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.ProxyMethodInvocation.Execute(RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod) +728
       Microsoft.Reporting.WebForms.ServerReport.get_Service() +316
       Microsoft.Reporting.WebForms.ServerReport.EnsureExecutionSession() +88
       Microsoft.Reporting.WebForms.ServerReport.GetParameters() +61
       MyApplication.Web.AzureReportViewer.Page_Load(Object sender, EventArgs e) +903
       System.Web.UI.Control.LoadRecursive() +71
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064

    Can someone please give me ideas on what to look for?

    Many thanks.

    Best regards,

    CT




    • Edited by cte00 Sunday, July 29, 2012 11:08 PM
    Sunday, July 29, 2012 5:14 PM

Answers

  • I managed to get pass this problem but I hadn't been able to post what I did.  In the end, it was my mistake that I didn't understand the example fully.  

    For SQL Azure Reporting, you would need to provide the credentials through the "GetFormCredentials" property function.  For the normal SSRS hosted through SQL Server 20XX, the credentials will need to be provided through the "NetworkCredentials" property function.

    Public ReadOnly Property NetworkCredentials() As ICredentials Implements IReportServerConnection2.NetworkCredentials Get

    ' Credentials are taken from Azure role environment settings Dim userName As String = RoleEnvironment.GetConfigurationSettingValue("ReportUser") Dim password As String = RoleEnvironment.GetConfigurationSettingValue("ReportUserPassword") Dim domain As String = RoleEnvironment.GetConfigurationSettingValue("ReportDomain") Return New NetworkCredential(userName, password, domain) End Get End Property Public Function GetFormsCredentials(ByRef authCookie As Cookie, ByRef userName As String, ByRef password As String, ByRef authority As String) As Boolean Implements IReportServerConnection2.GetFormsCredentials authCookie = Nothing userName = Nothing password = Nothing authority = Nothing 'Not using form credentials Return False End Function


    • Marked as answer by cte00 Sunday, August 19, 2012 10:23 AM
    Sunday, August 19, 2012 10:23 AM