none
and System.Net.WebException: The request failed with HTTP status 401: Unauthorized

    Question

  • We have a .NET Application on separate server, which build reports from Reporting Services 2008 on its own server.

    Windows Authentication works, as the browser picks up the users Credentials, but upon building the report the Application Crashes

    EVENT ID 1309

    and System.Net.WebException: The request failed with HTTP status 401: Unauthorized

    .NET application is a Windows 2008 R2, and Reporting Services server is Windows 2008.


    MisDevelopers

    Wednesday, April 23, 2014 4:07 PM

Answers

  • I was running into a authentication double-hop issue.

    I was able to correct this by Setting up IIS to only USE Kerberos, then I went into Active Directory and setup the Web for Trusted Delegation.  Within 10 mins, everything was working as it should.


    MisDevelopers

    Friday, April 25, 2014 9:04 PM

All replies

  • Hello,

    Based on your description, it seems that you can access the SSRS report with Windows Authentication, but application authenticate failed when rendering report from .NET application in another server.

    Please try to implement impersonation with the authorized windows user in an .NET application by adding the following code in the Web.config file of this application:

    <identity impersonate="true"  />
    <authentication mode="Windows" />

    Reference:http://support.microsoft.com/kb/306158

    Regards,
    Fanny Liu

    If you have any feedback on our support, please click here. 


    Fanny Liu
    TechNet Community Support

    Thursday, April 24, 2014 5:19 AM
  • I do have this configured this way.  And i found it weird that everything works off the Web Server.  but not from other workstations?

    MisDevelopers

    Friday, April 25, 2014 1:02 AM
  • I was running into a authentication double-hop issue.

    I was able to correct this by Setting up IIS to only USE Kerberos, then I went into Active Directory and setup the Web for Trusted Delegation.  Within 10 mins, everything was working as it should.


    MisDevelopers

    Friday, April 25, 2014 9:04 PM