Showing posts with label unauthorized. Show all posts
Showing posts with label unauthorized. Show all posts

Monday, February 13, 2012

401: Unauthorized.

Dear all,
I have 2 server, Server_A is IIS, Server_B is Reporting Server(SQL2005).
I create a web project under Server_A and drop a reportviewer on the
default.aspx.
I then enter the Server URL and Report path. And build the project.
I can then browse the report without any problem if URL is typing
localhost/web_project/default.aspx
But problem comes up if change into Server_A/webproject/default.aspx.
The message is
The request failed with HTTP status 401: Unauthorized.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with HTTP
status 401: Unauthorized.
Regards,
Ken Linhai
this ragu
u have iis server security problem u verify ur admin
i have the same problem occur i verify my admin
i sent the coading
private void button1_Click_1(object sender, EventArgs e)
{
RunRemote();
}
private void RunRemote()
{
try
{
// this.Cursor = Cursors.WaitCursor;
reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
reportViewer1.ServerReport.ReportServerUrl = new Uri(Settings.Default.ReportServerEndPoint);
reportViewer1.ServerReport.ReportPath = "/Report Project3/TestReortForFunds";
reportViewer1.RefreshReport();
}
catch (Exception ex)
{
throw ex;
}
finally
{
//this.Cursor = Cursors.Default;
}
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com|||use this code easily retrive your report
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportPath = "/Report Project3/TestReortForFunds";
ReportViewer1.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportServerEndPoint"]);
Microsoft.Reporting.WebForms.ReportParameter [1]=new Microsoft.Reporting.WebForms.ReportParameter (0);
}
}
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com|||No, I can sucess to view the report from the IE in Web Server.
But when I go to toher computers, got the 401 error.
Regards,
Ken Lin
<ragu> wrote in message news:2006122114446ragu1100@.yahoo.com...
> use this code easily retrive your report
>
> protected void Page_Load(object sender, EventArgs e)
> {
>
> if (!Page.IsPostBack)
> {
> ReportViewer1.ProcessingMode => Microsoft.Reporting.WebForms.ProcessingMode.Remote;
> ReportViewer1.ServerReport.ReportPath = "/Report
> Project3/TestReortForFunds";
> ReportViewer1.ServerReport.ReportServerUrl = new
> Uri(ConfigurationManager.AppSettings["ReportServerEndPoint"]);
> Microsoft.Reporting.WebForms.ReportParameter [1]=new
> Microsoft.Reporting.WebForms.ReportParameter (0);
>
> }
> }
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com

401 Web Service Access

Hi,
We are getting a 401 unauthorized error when trying to create subscriptions
via a web service from our .Net. The server is Windows Server 2003 with SP1
and Reporting Services with SP2.
The frustration is that one of our servers is fine with this setup and the
other one is giving the 401 error! I have tried adding the DWORD registry
entry as commonly suggested, but have had no luck (the server that works
doesn't have this entry either).
Would anyone therefore be ale to offer any solutions?
Thanks
DaveUPDATE:
We have found that this problem only occurs if we have the reporting server
on a different server to the application server which is calling the web
service. If they are both hosted on the same machine, everything is fine.
I am guessing that this is because the user information isn't being passed
correctly?

401 Unauthorized When Access Application Remotely

Hello,
I have developed a web application which has a ReportViewer control
embedded in the page and connects to a remote Reporting Services
server. Everything works fine locally in my development environment.
However, when I deploy to the test server, the ReportViewer control
throws a Report Error: 401: Unauthorized exception. I am using
Windows Authentication and Impersonation (the application is on the
local intranet). If I log onto the web server locally and try to
access the web site through localhost, everything works fine. I have
found several articles on implementing the IReportServerCredentials
interface to set the permissions via code, but have not seen anything
on using Windows authentication and impersonation.
Any suggestions would be appreciated...
Thanks!
David.You are most likely experiencing what is called the "double hop" issue.
This happens all the time, thanks to the security set up by default on
your servers. When you log in to your server through the web it will
trust you, but strip your credentials from you. You will be an
anonymous user. Then when you try to request the data in a report from
another data source, it will pass your anonymous credentials to the
other server, and therefore you being denied access is a good thing.
The reason it works when you log in directly to the sever is because it
retains your credentials then. The solution to this is delegation,
which can be set up by the domain controller. This should be enough to
get you started I hope!
Lance M.
Cyke wrote:
> Hello,
> I have developed a web application which has a ReportViewer control
> embedded in the page and connects to a remote Reporting Services
> server. Everything works fine locally in my development environment.
> However, when I deploy to the test server, the ReportViewer control
> throws a Report Error: 401: Unauthorized exception. I am using
> Windows Authentication and Impersonation (the application is on the
> local intranet). If I log onto the web server locally and try to
> access the web site through localhost, everything works fine. I have
> found several articles on implementing the IReportServerCredentials
> interface to set the permissions via code, but have not seen anything
> on using Windows authentication and impersonation.
> Any suggestions would be appreciated...
> Thanks!
> David.

401 error?

When I try to access the reports site using
http://myserver/reports
I get the following error
The request failed with HTTP status 401: Unauthorized.
Is there any error happening with respect to web service level' If so how
can I track that service'I am having the same issue. Reporting Services was successfully installed
several months ago and rran beautifully but has gone belly up on a mission
critical application. I am busily RTFMing but if anybody has any bright
ideas I'd be eternally grateful!
"sqlster" wrote:
> When I try to access the reports site using
> http://myserver/reports
> I get the following error
> The request failed with HTTP status 401: Unauthorized.
> Is there any error happening with respect to web service level' If so how
> can I track that service'
>|||dbahawk wrote:
> I am having the same issue. Reporting Services was successfully installed
> several months ago and rran beautifully but has gone belly up on a mission
> critical application. I am busily RTFMing but if anybody has any bright
> ideas I'd be eternally grateful!
> "sqlster" wrote:
>
>>When I try to access the reports site using
>>http://myserver/reports
>>I get the following error
>>The request failed with HTTP status 401: Unauthorized.
>>Is there any error happening with respect to web service level' If so how
>>can I track that service'
looks like you're trying to access IIS anonymously, or anonymous access
allowed at IIS side.
Both will cause this error.|||Thanks for your swift reply!
However, I do have anonymous access turned off for the websites _Reports_
and _ReportServer_
When I try to connect to a previously working report, I get the following
error:
Here is the error and stack trace:
[begin error message]
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[WebException: The request failed with HTTP status 401: Unauthorized.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall) +1303
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +218
coiWeb.domain.domain.domain.domain.ReportingService.Render(String Report,
String Format, String HistoryID, String DeviceInfo, ParameterValue[]
Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle,
String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed,
Warning[]& Warnings, String[]& StreamIds) +143
coiWeb.print_form.Page_Load(Object sender, EventArgs e) +867
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +744
----
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET
Version:1.1.4322.2300
[end of error message]|||I should also add that I am able to log into the site
[domaininfo]/ReportServer and run these manually, so the reporting services
installation does not seem to be the problem. It's getting access to
[domaininfo]\Reports that is the hangup here.
"dbahawk" wrote:
> Thanks for your swift reply!
> However, I do have anonymous access turned off for the websites _Reports_
> and _ReportServer_
>
> When I try to connect to a previously working report, I get the following
> error:
> Here is the error and stack trace:
> [begin error message]
> Source Error:
> An unhandled exception was generated during the execution of the current web
> request. Information regarding the origin and location of the exception can
> be identified using the exception stack trace below.
> Stack Trace:
>
> [WebException: The request failed with HTTP status 401: Unauthorized.]
> System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
> message, WebResponse response, Stream responseStream, Boolean asyncCall) +1303
> System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters) +218
> coiWeb.domain.domain.domain.domain.ReportingService.Render(String Report,
> String Format, String HistoryID, String DeviceInfo, ParameterValue[]
> Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle,
> String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed,
> Warning[]& Warnings, String[]& StreamIds) +143
> coiWeb.print_form.Page_Load(Object sender, EventArgs e) +867
> System.Web.UI.Control.OnLoad(EventArgs e) +67
> System.Web.UI.Control.LoadRecursive() +35
> System.Web.UI.Page.ProcessRequestMain() +744
>
> ----
> Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET
> Version:1.1.4322.2300
> [end of error message]
>|||I found the references to the DisableLoopbackCheck registry entry and applied
it to our development server. Worked great so I applied it to the production
box where it also worked like a charm.
All is good again :)
"dbahawk" wrote:
> I should also add that I am able to log into the site
> [domaininfo]/ReportServer and run these manually, so the reporting services
> installation does not seem to be the problem. It's getting access to
> [domaininfo]\Reports that is the hangup here.
>
> "dbahawk" wrote:
> > Thanks for your swift reply!
> >
> > However, I do have anonymous access turned off for the websites _Reports_
> > and _ReportServer_
> >
> >
> > When I try to connect to a previously working report, I get the following
> > error:
> >
> > Here is the error and stack trace:
> >
> > [begin error message]
> >
> > Source Error:
> >
> > An unhandled exception was generated during the execution of the current web
> > request. Information regarding the origin and location of the exception can
> > be identified using the exception stack trace below.
> >
> > Stack Trace:
> >
> >
> > [WebException: The request failed with HTTP status 401: Unauthorized.]
> >
> > System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
> > message, WebResponse response, Stream responseStream, Boolean asyncCall) +1303
> > System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> > methodName, Object[] parameters) +218
> > coiWeb.domain.domain.domain.domain.ReportingService.Render(String Report,
> > String Format, String HistoryID, String DeviceInfo, ParameterValue[]
> > Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle,
> > String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed,
> > Warning[]& Warnings, String[]& StreamIds) +143
> > coiWeb.print_form.Page_Load(Object sender, EventArgs e) +867
> > System.Web.UI.Control.OnLoad(EventArgs e) +67
> > System.Web.UI.Control.LoadRecursive() +35
> > System.Web.UI.Page.ProcessRequestMain() +744
> >
> >
> > ----
> > Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET
> > Version:1.1.4322.2300
> >
> > [end of error message]
> >
> >

401 Error with ReportViewer

I'll try to best explain the issue I'm having and the setup I'm working with.
ISSUE - I'm getting a 401 Unauthorized error when trying to view a report
within a web page using the reportviewer control, even if I "Hardcode" the
username, Password, and domain for the credentials.
Setup - we have IIS 6.0 box that the asp.net 2.0 application is on with
basic authentication. The reporting services server uses Basic
authentication as well. The RS server and the IIS box are in our
DMZ(internet), and the user account exists for both the IIS server and RS
server, and using that username and password I can go in to the report in RS
and view it fine.
I am able, with the app to connect to another RS server in the same DMZ.
What can I have or ask the network admins to check to see what's wrong?
--
Mike Voissem
Lead Software Engineer
Donnelley MarketingOn Apr 21, 5:58 am, Mike Voissem
<MikeVois...@.discussions.microsoft.com> wrote:
> I'll try to best explain the issue I'm having and the setup I'm working with.
> ISSUE - I'm getting a 401 Unauthorized error when trying to view a report
> within a web page using the reportviewer control, even if I "Hardcode" the
> username, Password, and domain for the credentials.
> Setup - we have IIS 6.0 box that the asp.net 2.0 application is on with
> basic authentication. The reporting services server uses Basic
> authentication as well. The RS server and the IIS box are in our
> DMZ(internet), and the user account exists for both the IIS server and RS
> server, and using that username and password I can go in to the report in RS
> and view it fine.
> I am able, with the app to connect to another RS server in the same DMZ.
> What can I have or ask the network admins to check to see what's wrong?
> --
> Mike Voissem
> Lead Software Engineer
> Donnelley Marketing
I am having a similar issue - I'm using the Reporting Service and
Report Execution Service to dynamically render a report into a
ReportViewer control. Both web services are using the default
credentials. The Reporting Service is (and always has been) working
fine with these credentials - I can retrieve report parameters,
validate them, and so forth. The Report Execution Service however is
what is causing the 401. The Report Execution Service is required when
I set the properties of the ReportViewer control, so that I can assign
the ReportViewer an ExecutionId (why this is required I don't know -
I've used the ReportViewer control to display reports which were
determined at design time and that was fine?) but when I go to load
the report it gives the 401. Thing is, it was working in my local
environment (ASP.NET virtual server and a local Report Server
instance)... could anyone shed some light on this situation?
Cheers,
- Tokes|||On Apr 21, 9:31 am, Tokes <michael.to...@.gmail.com> wrote:
> On Apr 21, 5:58 am, Mike Voissem
>
> <MikeVois...@.discussions.microsoft.com> wrote:
> > I'll try to best explain the issue I'm having and the setup I'm working with.
> > ISSUE - I'm getting a 401 Unauthorized error when trying to view a report
> > within a web page using the reportviewer control, even if I "Hardcode" the
> > username, Password, and domain for the credentials.
> > Setup - we have IIS 6.0 box that the asp.net 2.0 application is on with
> > basic authentication. The reporting services server uses Basic
> > authentication as well. The RS server and the IIS box are in our
> > DMZ(internet), and the user account exists for both the IIS server and RS
> > server, and using that username and password I can go in to the report in RS
> > and view it fine.
> > I am able, with the app to connect to another RS server in the same DMZ.
> > What can I have or ask the network admins to check to see what's wrong?
> > --
> > Mike Voissem
> > Lead Software Engineer
> > Donnelley Marketing
> I am having a similar issue - I'm using the Reporting Service and
> Report Execution Service to dynamically render a report into a
> ReportViewer control. Both web services are using the default
> credentials. The Reporting Service is (and always has been) working
> fine with these credentials - I can retrieve report parameters,
> validate them, and so forth. The Report Execution Service however is
> what is causing the 401. The Report Execution Service is required when
> I set the properties of the ReportViewer control, so that I can assign
> the ReportViewer an ExecutionId (why this is required I don't know -
> I've used the ReportViewer control to display reports which were
> determined at design time and that was fine?) but when I go to load
> the report it gives the 401. Thing is, it was working in my local
> environment (ASP.NET virtual server and a local Report Server
> instance)... could anyone shed some light on this situation?
> Cheers,
> -Tokes
Update:
I reverted back to code that did not use the Report Execution Service,
and this now works in my local environment as well as my servers...
very strange behaviour! I also learned that I was using the 2000
Reporting Service web service instead of the 2005 one, which clarified
a couple of things for me (because I didn't understand why the Report
Execution Service did some things that the Reporting Service did too).|||Hi,
Please find my message according to this issue by clicking here:
news:9CD3F523-6D16-40D0-8F97-B9183E28C7D6@.microsoft.com
Regards,
Janos
"Mike Voissem" <MikeVoissem@.discussions.microsoft.com> wrote in message
news:D6CB015C-EEA4-4FBE-8653-4A3D7A34550B@.microsoft.com...
> I'll try to best explain the issue I'm having and the setup I'm working
> with.
> ISSUE - I'm getting a 401 Unauthorized error when trying to view a report
> within a web page using the reportviewer control, even if I "Hardcode" the
> username, Password, and domain for the credentials.
> Setup - we have IIS 6.0 box that the asp.net 2.0 application is on with
> basic authentication. The reporting services server uses Basic
> authentication as well. The RS server and the IIS box are in our
> DMZ(internet), and the user account exists for both the IIS server and RS
> server, and using that username and password I can go in to the report in
> RS
> and view it fine.
> I am able, with the app to connect to another RS server in the same DMZ.
> What can I have or ask the network admins to check to see what's wrong?
> --
> Mike Voissem
> Lead Software Engineer
> Donnelley Marketing

401 : Unauthorized

Having a hard time finding this one. Have gone as far as having everyone-
full control.
w2k3
rssp2
Any ideas anyone?
System.Net.WebException: The request failed with HTTP status 401:
Unauthorized.
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at smarter.ReportService.ReportingService.GetReportDefinition(String
Report)
at smarter.ReportRetrieval.generate_report()I have these problems when the security used in IIS is different from the
caller.
For example, if IIS is configured to Basic authentication, then an NTLM
authenticated user can't access it, and the rverse is possible too.
Also I have this problem with remote access, like the RS utility.
The RS utility works remotly only if IIS is in Basic authentication mode!
in mixed mode (Basic + NTLM) the utility doesn't works.
So, what is your config, and how do you access RS?
custom code? /Reports himself? 2 differents web servers? etc...
"John Holt" <johnh@.regionv.k12.mn.us> wrote in message
news:eP7GLzygFHA.1444@.TK2MSFTNGP10.phx.gbl...
> Having a hard time finding this one. Have gone as far as having everyone-
> full control.
> w2k3
> rssp2
> Any ideas anyone?
> System.Net.WebException: The request failed with HTTP status 401:
> Unauthorized.
> at
> System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
> message, WebResponse response, Stream responseStream, Boolean asyncCall)
> at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters)
> at smarter.ReportService.ReportingService.GetReportDefinition(String
> Report)
> at smarter.ReportRetrieval.generate_report()
>|||Thanks for the reply Jéjé.
Access RS from a third party app. The app on our web site calls the RS
server passing parameters for the reports. The old RS server works great,
it's just a bit small/slow. I've compared every piece of web and folder
security and they are identical as far as I can see.
Report Manager access is fine. I can do whatever needs to be done in there.
It's just when the app tries to create a report.
I have done this a dozen times and it's usually click, click, boom, boom
your done. I'm low on ideas with this one.:-(
John
"Jéjé" <willgart_A_@.hotmail_A_.com> wrote in message
news:uP6Ep$ygFHA.3256@.TK2MSFTNGP12.phx.gbl...
>I have these problems when the security used in IIS is different from the
>caller.
> For example, if IIS is configured to Basic authentication, then an NTLM
> authenticated user can't access it, and the rverse is possible too.
> Also I have this problem with remote access, like the RS utility.
> The RS utility works remotly only if IIS is in Basic authentication mode!
> in mixed mode (Basic + NTLM) the utility doesn't works.
> So, what is your config, and how do you access RS?
> custom code? /Reports himself? 2 differents web servers? etc...
> "John Holt" <johnh@.regionv.k12.mn.us> wrote in message
> news:eP7GLzygFHA.1444@.TK2MSFTNGP10.phx.gbl...
>> Having a hard time finding this one. Have gone as far as having
>> everyone- full control.
>> w2k3
>> rssp2
>> Any ideas anyone?
>> System.Net.WebException: The request failed with HTTP status 401:
>> Unauthorized.
>> at
>> System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
>> message, WebResponse response, Stream responseStream, Boolean asyncCall)
>> at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
>> methodName, Object[] parameters)
>> at smarter.ReportService.ReportingService.GetReportDefinition(String
>> Report)
>> at smarter.ReportRetrieval.generate_report()
>