The request failed with HTTP status 401: Unauthorized

Discussion in 'ASP.NET 2.0' started by mambo, Aug 7, 2008.

  1. Hi
    I have uploaded my reports to the remote server. Ihave confirmed them to be in the server by viewing the contents via report manager. I have also copied the connection string supplied in the control panel, which I have pasted in the web.config file as below:


    <add name="TrackerCS" connectionString="Data Source=********;Initial Catalog=*******;User ID=*******;Password=******;" providerName="System.Data.SqlClient"/>


    However, when i try to view the reports using www.conflictracker.org/reportforms/parameterised.aspx, I get the error 401.


    Also when i try to view the reports directly through the remote report manager, i get the following error:

    • <LI style="DISPLAY: inline; FONT-WEIGHT: normal; FONT-SIZE: 8pt; FONT-FAMILY: Verdana">An error has occurred during report processing.

      • <LI style="DISPLAY: inline; FONT-WEIGHT: normal; FONT-SIZE: 8pt; FONT-FAMILY: Verdana">Cannot create a connection to data source 'Tracker'.

        • <LI style="DISPLAY: inline; FONT-WEIGHT: normal; FONT-SIZE: 8pt; FONT-FAMILY: Verdana">An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


    Could someone help me sort out this error.

    Mambo
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    I suspect your application is using another connection string as well, most likely the "LocalSQLServer" connection string. This is the default connection string if you are using membership / profile provider.


    Try add this line into the connection string section
    <remove name="LocalSqlServer" />


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Thanks, Bruce.


    Actually, I have another connection string for a separate database. i have added the code with the name of the other connection string. however, i still get the same results: error 401


    Mambo
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    i went to your page and it seems like you fixed the problem.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  5. Yes, I did.
    there were settings in the remote report manager that we off, and also .aspx.vb file needed to be coded quite a bit before it could work. somebody did it for me, after a very long day!

    Mambo
     

Share This Page