Oops!
Sorry I don't know why I sent that without a question :-)
Basically, I've implimented the Forms Authentication sample, and now
the following code causes the error above.
ReportingService rs = new ReportingService();
rs.LogonUser("UserWithBlankPassword",String.Empty, null);
BatchHeader BH = new BatchHeader();
BH.BatchID = rs.CreateBatch();
rs.BatchHeaderValue = BH;
ScheduleDefinition SD = new ScheduleDefinition();
SD = ((ScheduleDefinition)S.ScheduleDefinition);
string scheduleid = rs.CreateSchedule(R.ReportId.ToString() + "_" +
EBCUserId.ToString(),SD);
rs.ExecuteBatch();
Anyone got any ideas?
Thanks,
Phil Winstanley
Microsoft ASP.NET MVPPhil,
It may be because the authentication ticket (sqlAuthCookie) is not passed to
the Report Server. The successful output of the LogonUser call is an
in-session cookie sent to the browser (just like ASP.NET Forms
Authentication). I think what is happening in your case is that you are
generating the cookie on the same page on which you are trying to pass it
back. Do a tcp trace to find out if the cookie is sent to the Report Server.
If not, you may need to move the subsequent SOAP calls to another page after
a redirect.
--
Hope this helps.
---
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
http://www.prologika.com
"Phil Winstanley [Microsoft MVP ASP.NET]" <phil@.winstanley.name> wrote in
message news:cffcgk$ol3@.odak26.prod.google.com...
> Oops!
> Sorry I don't know why I sent that without a question :-)
> Basically, I've implimented the Forms Authentication sample, and now
> the following code causes the error above.
> ReportingService rs = new ReportingService();
> rs.LogonUser("UserWithBlankPassword",String.Empty, null);
> BatchHeader BH = new BatchHeader();
> BH.BatchID = rs.CreateBatch();
> rs.BatchHeaderValue = BH;
> ScheduleDefinition SD = new ScheduleDefinition();
> SD = ((ScheduleDefinition)S.ScheduleDefinition);
> string scheduleid = rs.CreateSchedule(R.ReportId.ToString() + "_" +
> EBCUserId.ToString(),SD);
> rs.ExecuteBatch();
> Anyone got any ideas?
> Thanks,
> Phil Winstanley
> Microsoft ASP.NET MVP
>
Showing posts with label object. Show all posts
Showing posts with label object. Show all posts
Monday, March 26, 2012
Forms Authentication : Object moved
Forms Authentication : Object moved
Server Error in '/' Application.
----
The request failed with the error message: -- <html><head><title>Object
moved</title></head><body> <h2>Object moved to <a
href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
</body></html> --.
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 the
error message: -- <html><head><title>Object moved</title></head><body>
<h2>Object moved to <a
href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
</body></html> --.
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 the error message:
--
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a
href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
</body></html>
--.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream) +1136
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +216
BusinessFacade.ReportingServiceWeb.ReportingService.CreateBatch() in
h:\my documents\visual studio
projects\reportingservices\businessfacade\web
references\reportingserviceweb\reference.cs:72
BusinessFacade.Scheduling.CreateRsSchedule(SavedReport R, Schedule
S, Guid EBCUserId) in h:\my documents\visual studio
projects\reportingservices\businessfacade\scheduling.cs:249
BusinessFacade.Scheduling.Add(SavedReport R, Schedule S, Guid
EBCUserId, String ReportPath) in h:\my documents\visual studio
projects\reportingservices\businessfacade\scheduling.cs:157
EBCReportInterface.Schedule.Scheduler_Click(Object sender, EventArgs
e) in c:\ebusiness
centre\portfolio.net\ebcreportinterface_2\saveandschedule.aspx.cs:458
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1263
----
Version Information: Microsoft .NET Framework Version:1.0.3705.288;
ASP.NET Version:1.0.3705.288Are you manually handling the authentication cookies used? This is detailed
in the forms authentication extension docs.
"Phil Winstanley [Microsoft MVP ASP.NET]" wrote:
> Server Error in '/' Application.
> ----
> The request failed with the error message: -- <html><head><title>Object
> moved</title></head><body> <h2>Object moved to <a
> href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
> </body></html> --.
> 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 the
> error message: -- <html><head><title>Object moved</title></head><body>
> <h2>Object moved to <a
> href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
> </body></html> --.
> 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 the error message:
> --
> <html><head><title>Object moved</title></head><body>
> <h2>Object moved to <a
> href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
> </body></html>
> --.]
> System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
> message, WebResponse response, Stream responseStream) +1136
> System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters) +216
> BusinessFacade.ReportingServiceWeb.ReportingService.CreateBatch() in
> h:\my documents\visual studio
> projects\reportingservices\businessfacade\web
> references\reportingserviceweb\reference.cs:72
> BusinessFacade.Scheduling.CreateRsSchedule(SavedReport R, Schedule
> S, Guid EBCUserId) in h:\my documents\visual studio
> projects\reportingservices\businessfacade\scheduling.cs:249
> BusinessFacade.Scheduling.Add(SavedReport R, Schedule S, Guid
> EBCUserId, String ReportPath) in h:\my documents\visual studio
> projects\reportingservices\businessfacade\scheduling.cs:157
> EBCReportInterface.Schedule.Scheduler_Click(Object sender, EventArgs
> e) in c:\ebusiness
> centre\portfolio.net\ebcreportinterface_2\saveandschedule.aspx.cs:458
> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
> System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
> eventArgument) +57
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> sourceControl, String eventArgument) +18
> System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
> +33
> System.Web.UI.Page.ProcessRequestMain() +1263
>
>
> ----
> Version Information: Microsoft .NET Framework Version:1.0.3705.288;
> ASP.NET Version:1.0.3705.288
>sql
----
The request failed with the error message: -- <html><head><title>Object
moved</title></head><body> <h2>Object moved to <a
href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
</body></html> --.
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 the
error message: -- <html><head><title>Object moved</title></head><body>
<h2>Object moved to <a
href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
</body></html> --.
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 the error message:
--
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a
href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
</body></html>
--.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream) +1136
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +216
BusinessFacade.ReportingServiceWeb.ReportingService.CreateBatch() in
h:\my documents\visual studio
projects\reportingservices\businessfacade\web
references\reportingserviceweb\reference.cs:72
BusinessFacade.Scheduling.CreateRsSchedule(SavedReport R, Schedule
S, Guid EBCUserId) in h:\my documents\visual studio
projects\reportingservices\businessfacade\scheduling.cs:249
BusinessFacade.Scheduling.Add(SavedReport R, Schedule S, Guid
EBCUserId, String ReportPath) in h:\my documents\visual studio
projects\reportingservices\businessfacade\scheduling.cs:157
EBCReportInterface.Schedule.Scheduler_Click(Object sender, EventArgs
e) in c:\ebusiness
centre\portfolio.net\ebcreportinterface_2\saveandschedule.aspx.cs:458
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1263
----
Version Information: Microsoft .NET Framework Version:1.0.3705.288;
ASP.NET Version:1.0.3705.288Are you manually handling the authentication cookies used? This is detailed
in the forms authentication extension docs.
"Phil Winstanley [Microsoft MVP ASP.NET]" wrote:
> Server Error in '/' Application.
> ----
> The request failed with the error message: -- <html><head><title>Object
> moved</title></head><body> <h2>Object moved to <a
> href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
> </body></html> --.
> 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 the
> error message: -- <html><head><title>Object moved</title></head><body>
> <h2>Object moved to <a
> href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
> </body></html> --.
> 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 the error message:
> --
> <html><head><title>Object moved</title></head><body>
> <h2>Object moved to <a
> href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>here</a>.</h2>
> </body></html>
> --.]
> System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
> message, WebResponse response, Stream responseStream) +1136
> System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters) +216
> BusinessFacade.ReportingServiceWeb.ReportingService.CreateBatch() in
> h:\my documents\visual studio
> projects\reportingservices\businessfacade\web
> references\reportingserviceweb\reference.cs:72
> BusinessFacade.Scheduling.CreateRsSchedule(SavedReport R, Schedule
> S, Guid EBCUserId) in h:\my documents\visual studio
> projects\reportingservices\businessfacade\scheduling.cs:249
> BusinessFacade.Scheduling.Add(SavedReport R, Schedule S, Guid
> EBCUserId, String ReportPath) in h:\my documents\visual studio
> projects\reportingservices\businessfacade\scheduling.cs:157
> EBCReportInterface.Schedule.Scheduler_Click(Object sender, EventArgs
> e) in c:\ebusiness
> centre\portfolio.net\ebcreportinterface_2\saveandschedule.aspx.cs:458
> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
> System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
> eventArgument) +57
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> sourceControl, String eventArgument) +18
> System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
> +33
> System.Web.UI.Page.ProcessRequestMain() +1263
>
>
> ----
> Version Information: Microsoft .NET Framework Version:1.0.3705.288;
> ASP.NET Version:1.0.3705.288
>sql
Subscribe to:
Posts (Atom)