.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

SQL Server Reporting Service 2008 R2 - The request failed with HTTP status 401: Unauthorized.

Posted By:      Posted Date: September 25, 2010    Points: 0   Category :Sql Server
 
I got the error "The request failed with HTTP status 401: Unauthorized." when I call the Reporting Service Web Service.

The code is very simple:

// Initialise the reporting service Web Service

this.RSWebService = new ReportingService2010();

// Pass windos authentication credentials to Web Service

this.RSWebService.Credentials = System.Net.CredentialCache.DefaultCredentials;

// List children

List<CatalogItem> reports = this.RSWebService.ListChildren(folder, false).ToList();

The SQL Server is installed on a different machine (say server A) from the Web server (say server B). We are using Windows Server 2003.

The code work fine for all the scenario below:

i) Run locally (XP) to call the web service on the sql server

ii) Provide the Network Credentials with the username, password, and domain when calling the web service

iii) If the web server and sql server is using same server (i.e. not distributed)

I'm using windows authentication and impersonation. Any idea?




View Complete Post


More Related Resource Links

While calling Web service gets exception "The request failed with HTTP status 401: Unauthorized"

  
Hi All, I created a ASP.NET web service, which was hosted on default visual studioserver, and on excecution of webservice it run .exe file which in turn update xml file. Now i hosted this webservice on IIS 6.0 server, and when i run the service, itfails to execute the exe.When i run it on debug mode, i never get any exception.Code...public string HelloWorld()    {        Process myProcess = new Process();        try        {            myProcess.StartInfo.UseShellExecute = false;            // You can start any process,             myProcess.StartInfo.FileName = @"E:\Projects\some.exe";            myProcess.StartInfo.CreateNoWindow = true;            myProcess.Start();            myProcess.Close();            myProcess.Dispose();            return "Suceess";         }&n

Anonymous Web Site receives "The request failed with HTTP status 401: Unauthorized"

  

I set up a test website on my local box and was able to access sharepoint search using the querySearch web service from SP.  After I got it all working properly I transferred the code to the target website that is set up with anonymous access for all people on the fab floor.  However from this website I keep getting the 401 error.  It can't be SP because the same code worked from my local website "localhost".  Any suggestions?  we don't want to have to have the fab people log in so we can't not have the box anonymous.  I would appreciate any suggestions very much!!!

Using WSS 2007 with MOSS.

code:

  private void GetDefaultCredentials()
  {
    try
    {
      m_where = "get configuration data for credentials";
      string userid = ConfigurationManager.AppSettings[ "userid" ];
      string password = ConfigurationManager.AppSettings[ "password" ];
      string domain = ConfigurationManager.AppSettings[ "domain" ];

      m_where = "set search query credentials";
      m_query.Credentials = new NetworkCredential ( userid, password

Reporting Services 2008: "HTTP status 401: Unauthorized" Issue

  

I'm getting the error "The request failed with HTTP status 401: Unauthorized" whenever I try to list the reports on my reporting server. The weird thing is, it works when I run the asp.net application on my dev machine hitting the server reporting services web service url (http://www.example.com/reports/reportservice2005.asmx?wsdl) but when the asp.net app is installed on the server (running iis 7) hitting the same url I get the error. Here's my set up:


Server:

SQL Server Reporting services 2008 (not R2)

Web service url: http://www.example.com/reports/reportservice2005.asmx?wsdl


Client

Created a proxy ReportingServices2005.cs

Web.config has <identity impersonate="true"/>

Code to list reports:


<asp:ListView ID="lvReportList" runat="server">
    <LayoutTemplate>
        <ul>
            <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
        </ul>
    </LayoutTemplate>
    <ItemTemplate>
        <li>
            <asp:HyperLink runat="server" ID="hpReportLink" NavigateUrl='<%#Eval("Url")%>'><%#Eval("Name")%></asp:HyperLin

Webs Webservices problem : The request failed with HTTP status 401: Unauthorized

  
I am trying to run this code to get the web collection details. I am running this code in debug mode in Visual Studio 2005. I am running this code on sharepoint.acme.com, the same machine on which MOSS 2007 is installed.

        Webs websService = new Webs();
        System.Net.SystemNetworkCredential credentials =
        websService.Credentials = System.Net.CredentialCache.DefaultCredentials;
        websService.Url = "http://sharepoint.acme.com/_vti_bin/Webs.asmx";

        System.Xml.XmlNode myNode = websService.GetAllSubWebCollection();

I get this error. "The request failed with HTTP status 401: Unauthorized" in the last line while debug mode running. Earlier it used to work fine, but today I see this problem. Both acme\administrator and sharepoint\administrator can log into SharePoint. I tried running this code by logging in to my win2k3 desktop as acme\administrator once and launching Visual Studio 2005 and sharepoint\administrator another time. Both time it I got the same error.

Could someone please help me in resolving this error?

"The request failed with HTTP status 403: Forbidden" when asp page calls remote web service

  

Hi,

I use iis7 on win7 pro. I develope an aspx web page which calls the web service in remote site.When it runs, I get an error in the below:

"System.Net.WebException: The request failed with HTTP status 403: Forbidden..."

What's the problem?

Thanks for helps.

Mehmet

 


The request failed with HTTP status 407: Proxy Authentication Required (the ISA server requires auth

  

I'm new to webservice. I writed an example to work with a web service which is supplied on Internet (its url: http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx ) when i tried running i got an error message as System.Net.WebException was unhandled
  Message="The request failed with HTTP status 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.  )."

I had found some solutions such as:
+ using ISA firewall
+ configuring proxy from Machine.config
+ inside coding

The first:  I used ISA firewall but i still got the same error, my problem didn't resolve. I guessed that is because ISA firewall needn't use Credentials (username/password).

The second:
 I tried coding in my source, it was okie. This solution is good because following this way i can get defaultCredentials from cache but needn't define straightforwardly my credentials as username/password
my code is as follows:

DelayedStockQuote wsStock =

sql server start service error "The request failed or the service didn't respond in a timely fashio

  
I cannot start sql server 2008 after repair windows. sql server (MSSQLSERVER) not start dialog message "The request failed or the service didn't respond in a timely fashion.Consult the event log or other applicable error logs for details"  I open even log (control panel >> administration >> event viewer) find error log with sql server it notice Could not open error log file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG'. Operating system error = 5(failed to retrieve text for this error. Reason: 1815) I open file ERRORLOG.5 but I don't understand where I should fix?  I copy errorlog.5 on this webboard  Please help me! thank you   2010-08-20 08:16:52.89 Server      Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)  Jul  9 2008 14:43:34  Copyright (c) 1988-2008 Microsoft Corporation  Standard Edition on Windows NT 5.1 <X86> (Build 2600: Service Pack 3) 2010-08-20 08:16:52.89 Server      (c) 2005 Microsoft Corporation. 2010-08-20 08:16:52.89 Server      All rights reserved. 2010-08-20 08:16:52.89 Server      Server process ID is 2248. 2010-08-20 08:16:52.89 Server      Authentication mode is MIXED. 2010-08-20 08:16:52.89 Server  &

Does SQL Server 2008 R2 Express Reporting Service support Shared Datasets?

  
I have spent a few hours trying to get this to work. I am using Report Builder 3.0 (locally), with SQL Server 2008 R2 Express Edition on a remote web server. I am running Report Builder as an Admin under Win7 64bit. All is OK until I attempt a Save of a newly created shared dataset. The error message is: Failed to save dataset "mydataset.rsd" The feature "Shared dataset" is not supported in this edition of Reporting Services. Details: The feature: "Shared dataset" is not supported in this edition of Reporting Services. ---> Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: "Shared dataset" is not supported in this edition of Reporting Services. I have researched the web, and the list of features for Express Edition does not list this feature as not being supported, although it does list "Shared component library" as being missing. Could anyone please confirm the situation please. If it is  a bug, is there any fix or workaround?  John Walton  

WCF The request failed with HTTP status 404: Not Found

  

Hello,

I get the error above with a WCF service I've deployed to a Windows Server 2008 box (with IIS 7). When using a test client with a proxy WSDL class to try to consume the service this error pops up while debugging. Using http is fine, however using https causes the error. We do have an SSL on the URL for the WCF service.

Is there a setting I'm missing?

Thanks.




WCF The request failed with HTTP status 404: Not Found

  
Hello,

I get the error above with a WCF service I've deployed to a Windows Server 2008 box (with IIS 7). When using a test client with a proxy WSDL class to try to consume the service this error pops up while debugging. Using http is fine, however using https causes the error. We do have an SSL on the URL for the WCF service.

Is there a setting I'm missing?

Thanks.

The remote server returned an error: (401) Unauthorized. Failed to execute web request for the speci

  

Hi,

I am creating reports using SQL business intelligence 2008.

Connection string 'http://<SharepointServer>/_vti_bin/lists.asmx '.

And i have created a data set using the below xml query.

<Query>
   <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems </SoapAction>
   <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/ " Name="GetListItems">
      <Parameters>
         <Parameter Name="listName">
            <DefaultValue>{GUID of the list}</DefaultValue>      
         </Parameter>      
      </Parameters>
   </Method>
   <ElementPath IgnoreNamespaces="True">*</ElementPath>
</Query>

 

When I try to execute th

Issue when migrating Reporting service reports from SQL Server 2005 to SQL Server 2008

  

Hi Friends,

We are migrating reporting service reports from SQL server 2005 to SQL Server 2008 and facing below login issue.

We got a virtual machine with 2003 server and got SQL Server 2008 installed with reporting service.

I was able to publish my 2005 reports using VS 2005 easily.


1) But when I try to run the reports I am getting below errors at my website home page.

The permissions granted to user 'DomainName\MachineName' are insufficient for performing this operation. (rsAccessDenied)

I could not get why there is no user name in above error and how it says machine name does not have permissioin?

There should be at least some user id mentioned as per me.

What could be the reason of above error?

2) Also when I try to run reports using Reports website (i.e. http://server/Reports URL), I get below errro in executing the reports.

"An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'ReportSource'. (rsErrorOpeningConnection)
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'."

Here the question is how it is picking up Anonymous logon. I thought it might be using Network Sevice acct to access reports.

What should I be doing to resolve above errors?

3) Also one more point about the s

Issue when migrating Reporting service reports from SQL Server 2005 to SQL Server 2008

  

Hi Friends,

We are migrating reporting service reports from SQL server 2005 to SQL Server 2008 and facing below login issue.

We got a virtual machine with 2003 server and got SQL Server 2008 installed with reporting service.

I was able to publish my 2005 reports using VS 2005 easily.


1) But when I try to run the reports I am getting below errors at my website home page.

The permissions granted to user 'DomainName\MachineName' are insufficient for performing this operation. (rsAccessDenied)

I could not get why there is no user name in above error and how it says machine name does not have permissioin?

There should be at least some user id mentioned as per me.

What could be the reason of above error?

2) Also when I try to run reports using Reports website (i.e. http://server/Reports URL), I get below errro in executing the reports.

"An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'ReportSource'. (rsErrorOpeningConnection)
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'."

Here the question is how it is picking up Anonymous logon. I thought it might be using Network Sevice acct to access reports.

What should I be doing to resolve above errors?

SQL Server 2008 R2 Reporting Service Error

  

Hi everybody,

 

I have an error when i try to access http://localhost/ReportServer

The report server has encountered a configuration error. See the report server log files for more information. (rsServerConfigurationError)

 

I have found lots of posts according this error but any of it describes my error.

Do you have any ideas about problem reason?

 

I am using Forms authentification

 

Here is my LOG file:

<Header>
  <Product>Microsoft SQL Server Reporting Services Version 2009.0100.1600.01 ((KJ_RTM).100402-1539 )</Product>
  <Locale>English (United States)</Locale>
  <TimeZone>GTB Daylight Time</TimeZone>
  <Path>D:\SQLDATA\MSRS10_50.MSSQLSERVER\Reporting Services\Logfiles\ReportServerService__05_26_2010_09_29_36.log</Path>
  <SystemName>RAPORTALAPP1</SystemName>
  <OSName>Microsoft Windows NT 6.1.7600</OSName>
  <OSVersion&g

Reporting service 2008 with sql server 2005

  

Is SSRS2008 Report builder 2.0 sufficient for generating reports using sql server server 2005?


how to use visual studio to debug sql server reporting service 2008 by attaching process

  

I did custom security extension and want to debug it. I used to debug it using visual studio by attaching its iexplore.exe process using visual studio 2005 and sql server reporting services 2005. After then, I can debug UILogon.aspx.cs and AuthenticationExtension.cs in Microsoft.Samples.ReportingServices.CustomSecurity.dll. When I set break point, it can reach.

Now I used 2008 version for all application. After I attaching process, it can't reach break point I set. I realize sql server reporting services didn't use IIS and it use another component to hold web app. I may affect it and unable to debug it ? Do I need to do any configuration or any thing before I can use visual studio 2008 to do debug by attaching process ?

thanks

Gary

 


Trying to make a SQL Server Reporting Service 2008 report public for basic users

  

Hey.  I'm somewhat new to SSRS 2008 and I've built two datasources connecting to "HumanResources" and "HumanResourcesDev5" databases on a single server.  Both of those datasources have been changed from a Windows NT login clone to a preset login for a temp account that we have for testing called "Test2".  I have opened my created datasets and verified that when they open they ask for the password for the new credentials that I have set for the datasources.  After verifying this and the connection I re-opened the reports that I made within Report Builder (not Report Designer a VS extension) and verified all of the dataset and datasource information.  These reports and report parts get saved to the http://localhost/Reports folder within the server.  I have published the report parts to the /Report Parts folder within the localhost. 

This is where I begin to have issues...

When someone uses the reports that I have generated through report builder and link to them on our sharepoint site when a person without an actual account on the SQL server tries to view them they cannot because they do not have sufficient permissions.  And what I noticed is that it still tries to use their Windows NT credentials rather than the temp account (Test2) that we have created which is why they

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend