none
Azure Reporting - The request failed with the error message

    Question

  • When running the sample from http://archive.msdn.microsoft.com/RVControlforAzure I get the following page in IE...

    Anyone had similar?

    Report
    Viewer running in Windows Azure against SQL Azure Reporting


    The
    request failed with the error message: -- <?xml version="1.0"
    encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"> <head>
    <title>Service</title> <style>BODY { color: #000000;
    background-color: white; font-family: Verdana; margin-left: 0px; margin-top:
    0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; }
    A:link { color: #336699; font-weight: bold; text-decoration: underline; }
    A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; }
    A:active { color: #336699; font-weight: bold; text-decoration: underline; }
    .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color:
    #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em
    0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre
    { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier
    New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap;
    white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse:
    collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right:
    2px white solid; border-bottom: 2px white solid; font-weight: bold;
    background-color: #cecf9c;} table td { border-right: 2px white solid;
    border-bottom: 2px white solid; background-color: #e5e5cc;}</style>
    </head> <body> <div id="content"> <p
    class="heading1">Service</p> <p xmlns="">There is no operation
    listening for <a
    href="https://gguq8bah3j.database.windows.net/reportserver/ReportExecution2005.asmx">https://gguq8bah3j.database.windows.net/reportserver/ReportExecution2005.asmx</a>,
    but there is an operation listening for <a
    href="https://gguq8bah3j.database.windows.net/reportserver/ReportExecution2005.asmx/">https://gguq8bah3j.database.windows.net/reportserver/ReportExecution2005.asmx/</a>,
    so you are being redirected there.</p> </div> </body>
    </html> --.

    Tuesday, April 10, 2012 9:56 PM

Answers

  • Hi,

    To display reports deployed to a SQL Azure Reporting report server in the ReportViewer controls, you should supply the report server URL and the report path as you would for any server report, and implement the IReportServerCredentials interface and use it in ServerReport.ReportServerCredentials.

    The following example shows how to implement and use the IReportServerCredentials to access SQL Azure Reporting reports:

    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Init(object sender, EventArgs e)
        {
             ReportViewer1.ServerReport.ReportServerUrl = new Uri(String.Format("https://{0}/reportserver", ConfigurationManager.AppSettings["SERVER_NAME"]));
             ReportViewer1.ServerReport.ReportPath = ConfigurationManager.AppSettings["REPORT_PATH"];
             ReportViewer1.ServerReport.ReportServerCredentials = new ReportServerCredentials();
        }
    }
    
    /// <summary>
    /// Implementation of IReportServerCredentials to supply forms credentials to SQL Azure Reporting using GetFormsCredentials() 
    /// </summary>
    public class ReportServerCredentials : IReportServerCredentials
    {
        public ReportServerCredentials()
        {
        }
    
        public WindowsIdentity ImpersonationUser
        {
            get
            {
                return null;
            }
        }
    
        public ICredentials NetworkCredentials
        {
            get
            {
                return null;
            }
        }
    
        public bool GetFormsCredentials(out Cookie authCookie, out string user, out string password, out string authority)
        {
            authCookie = null;
            user = ConfigurationManager.AppSettings["USERNAME"];
            password = ConfigurationManager.AppSettings["PASSWORD"];
            authority = ConfigurationManager.AppSettings["SERVER_NAME"];
            return true;
        }
    }
    

    Then, in the Web.config or App.config file, specify the application settings in the <appSettings> element.

    <appSettings>
      <add key="SERVER_NAME" value="<INSTANCE_NAME>.report.int.mscds.com" />
      <add key="USERNAME" value="<USERNAME>"/>
      <add key="PASSWORD" value="<PASSWORD>"/>
      <add key="REPORT_PATH" value="<REPORT_PATH>"/>
    
    </appSettings>
    

    For more information on the IReportServerCredentials interface, see the corresponding API reference topic in ReportViewer Controls Programming Reference  on MSDN. For Windows Forms applications, use the Microsoft.Reporting.Winforms Namespace. For ASP.NET applications, use the Microsoft.Reporting.Webforms Namespace..

    See Security Considerations for information on how to secure sensitive data like report server URL, username, and password.


    Challen Fu

    TechNet Community Support

    Wednesday, April 18, 2012 9:57 AM
    Moderator