Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > System.Net.WebException: The request failed with the error message:Object moved to here

Reply
Thread Tools

System.Net.WebException: The request failed with the error message:Object moved to here

 
 
Skeptical
Guest
Posts: n/a
 
      05-19-2005
Greetings,

This question is related to Microsoft Reporting Services Web service. I
tried asking it in RS groups but no one seems to be knowledgeable enough to
answer, so I wanted to try my chances here. Thanks...


I am trying to get the code below to work with no success, I googled the
issue but docs popped up provided little help. Basically I am trying to
create a directory in RS that uses Forms authentication. Everything works on
the Forms authentication side, but it looks like the cookie created using
the web service somehow does not satisfy RS and it tries to redirect to the
logon page.

Could you point me with a document or just provide me with a working sample?

I already tried Teo Lachev's example with no luck.

Thanks,

Skep...

PS: Both web application and the RS are on the same server.


ReportingService rs = new ReportingService();
ReportServerProxy server = new ReportServerProxy();

// Get the server URL from the Report Manager configuration file
server.Url = AuthenticationUtilities.GetWebServiceUrl();
bool passwordVerified = false;
try
{
server.LogonUser("user","password", null);
passwordVerified = true;
}
catch(System.Web.Services.Protocols.SoapException)
{
Message.Text = "Login Error, please try again";
return;
}
// Create a custom property for the folder.
Property newProp = new Property();
newProp.Name = "Department";
newProp.Value = "Finance";
Property[] props = new Property[1];
props[0] = newProp;
string folderName = "Budget";
try
{
rs.CreateFolder(folderName, "/", props );
Label2.Text="Folder created: "+ folderName;
}
catch(Exception ex)
{
Message.Text=ex.ToString();
}




 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      05-20-2005
Hi Skeptical:

How is the LogonUser call itself authenticated? Do you have anon
access for that call?

I suspect you need to create a CookieContainer object and assign the
instance to the Cookie property of the SSRS proxy class. The
CookieContainer will accept the Set-Cookie header from SSRS and pass
the cookie along on subsequest requests.


--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 19 May 2005 15:58:56 -0500, "Skeptical" <(E-Mail Removed)>
wrote:

>Greetings,
>
>This question is related to Microsoft Reporting Services Web service. I
>tried asking it in RS groups but no one seems to be knowledgeable enough to
>answer, so I wanted to try my chances here. Thanks...
>
>
>I am trying to get the code below to work with no success, I googled the
>issue but docs popped up provided little help. Basically I am trying to
>create a directory in RS that uses Forms authentication. Everything works on
>the Forms authentication side, but it looks like the cookie created using
>the web service somehow does not satisfy RS and it tries to redirect to the
>logon page.
>
>Could you point me with a document or just provide me with a working sample?
>
>I already tried Teo Lachev's example with no luck.
>
>Thanks,
>
>Skep...
>
>PS: Both web application and the RS are on the same server.
>
>
>ReportingService rs = new ReportingService();
>ReportServerProxy server = new ReportServerProxy();
>
>// Get the server URL from the Report Manager configuration file
>server.Url = AuthenticationUtilities.GetWebServiceUrl();
>bool passwordVerified = false;
>try
>{
>server.LogonUser("user","password", null);
>passwordVerified = true;
>}
>catch(System.Web.Services.Protocols.SoapException )
>{
>Message.Text = "Login Error, please try again";
>return;
>}
>// Create a custom property for the folder.
>Property newProp = new Property();
>newProp.Name = "Department";
>newProp.Value = "Finance";
>Property[] props = new Property[1];
>props[0] = newProp;
>string folderName = "Budget";
>try
>{
>rs.CreateFolder(folderName, "/", props );
>Label2.Text="Folder created: "+ folderName;
>}
>catch(Exception ex)
>{
>Message.Text=ex.ToString();
>}
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The request failed with the error message:Object moved to here Linh Phan ASP .Net Web Services 1 10-12-2005 06:35 PM
System.Net.WebException: The request failed with the error message:Object moved to here Skeptical ASP .Net Web Services 0 05-18-2005 07:48 PM
System.Net.WebException: The request failed with the error message: Object Moved Edgar D ASP .Net Web Services 1 11-29-2004 08:51 PM
Object Moved to Here Imran Shabbir ASP .Net 1 01-15-2004 12:56 PM
Object moved to here Shaun Dore ASP .Net 1 11-13-2003 12:50 AM



Advertisments