• Viernes 19 de Abril de 2024, 08:03

Autor Tema:  Autenticación Reporting Services AZURE  (Leído 2803 veces)

Jefralago

  • Nuevo Miembro
  • *
  • Mensajes: 15
    • Ver Perfil
Autenticación Reporting Services AZURE
« en: Viernes 13 de Julio de 2012, 00:26 »
0
Estimados Colegas,
 
Me está tirando un error al intentar ver un reporte de RS en un ReportViewer en asp.net, y es el siguiente:
Ayúdenme por favor.!!!

(en serio, ya se me está volviendo crítico, porque no llevo con este tema un par de días, sino meses ya investigando, hasta he solicitado asistancia directamente a los ingenieros de soporte en Microsoft y me dejaron en la misma, y nada. Seguramente es una bobada pero no he dado con el chiste) recordar que el problema de credenciales es con AZURE.
 Error al intentar conectar con el servidor de informes. Compruebe la información de conexión y que la versión del servidor de informes sea compatible. El cliente encontró el tipo de contenido de respuesta 'text/html; charset=utf-8', pero se esperaba 'text/xml'. Error de la solicitud con el mensaje de error: --< html> <head> <title> SQL Server Reporting Services </title><meta name="Generator" content="Microsoft SQL Server Reporting Services 11.0.1722.19" />< meta name="HTTP Status" content="500" />< meta name="ProductLocaleID" content="127" />< meta name="CountryLocaleID" content="9226" />< style> BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt; COLOR:black} H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt} LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt; DISPLAY:inline} .ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt; COLOR:gray} A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none} A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#FF3300; TEXT-DECORATION:underline} A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none} A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; color:#FF3300; TEXT-DECORATION:underline} </style> </head><body bgcolor="white"> <h1> Error de Reporting Services<hr width="100%" size="1" color="silver" /> </h1><ul> <li>La extensión de autenticación produjo una excepción inesperada o devolvió un valor que no es válido: identity==null. (rsAuthenticationExtensionError) <a href="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsAuthenticationExtensionError&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=11.0.1722.19" target="_blank">Obtener ayuda en pantalla</a></li><ul> <li>El identificador de seguimiento es: ff5f3db4-af65-4ad1-9703-aeaa3a673cd7.</li> </ul> </ul><hr width="100%" size="1" color="silver" /><span class="ProductInfo">SQL Server Reporting Services</span> </body>< /html>--.
 

Ya he hecho cuanta cosa he encontrado con la Web y nada funciona. Mi código está así ahora:
 
        ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
         ReportViewer1.ServerReport.ReportServerUrl = New System.Uri(System.Configuration.ConfigurationManager.AppSettings.Item("ReportServer"))
         ReportViewer1.ServerReport.ReportPath = System.Configuration.ConfigurationManager.AppSettings.Item("ReportServer") & "ReportTest"
         ReportViewer1.ServerReport.ReportServerCredentials = New MyReportServerCredentials()
         ReportViewer1.ServerReport.Refresh()
 
MyReportServerCredentials es una clase que implementa esto:
 
Imports System.Net
 Imports System.Security.Principal
 Imports Microsoft.Reporting.WebForms
 
Public NotInheritable Class MyReportServerCredentials
     Implements IReportServerCredentials
 
    Public ReadOnly Property ImpersonationUser() As WindowsIdentity _
             Implements IReportServerCredentials.ImpersonationUser
         Get
 
            'Use the default windows user.  Credentials will be
             'provided by the NetworkCredentials property.
             Return Nothing
 
        End Get
     End Property
 
    Public ReadOnly Property NetworkCredentials() As ICredentials _
             Implements IReportServerCredentials.NetworkCredentials
         Get
 
            'Read the user information from the web.config file.
            'By reading the information on demand instead of storing
             'it, the credentials will not be stored in session,
             'reducing the vulnerable surface area to the web.config
             'file, which can be secured with an ACL.
 
            'User name
             Dim userName As String = "Admin2012"
 
            If (String.IsNullOrEmpty(userName)) Then
                 Throw New Exception("Missing user name from web.config file")
             End If
 
            'Password
             Dim password As String = "Acceso2008+*"
 
            If (String.IsNullOrEmpty(password)) Then
                 Throw New Exception("Missing password from web.config file")
             End If
 
            'Domain
             Dim domain As String = ""
 
            'If (String.IsNullOrEmpty(domain)) Then
             '    Throw New Exception("Missing domain from web.config file")
             'End If
 
            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 IReportServerCredentials.GetFormsCredentials
 
        authCookie = Nothing
         userName = Nothing
         password = Nothing
         authority = Nothing
 
        'Not using form credentials
         Return False
 
    End Function
 
End Class