views:

61

answers:

2

Hi,

I have a serious problem (i think ;-)).

We have webservice. A there is a method which we can call A. We have also a service, which invokes this method from webservice.

On my local computer, invoking A, by service looks good. On a server, it doesn't work and I get an error like this:

error: The request failed with the error message:

Object moved

Object moved to here.

Whats wrong? Web.config file for WS, is the same - on my local computer, and a server.

I don't really have an idea, how to beat this problem.

A: 

This is what you typically get when forms authentication tries to redirect unauthenticated users to the login page. Are you sure, your web.config file is correct (forms authentication, access rights to the service)?

M4N
Yes, I had :<location path="Secured"> <system.web> <authorization> <deny users="?"/> <allow roles="loggedrole2" /> </authorization> </system.web> </location>and change it to<location path="Secured"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location>And you have to notice, that solution works locally but not on server computer.
Karol Bladek
A: 

Hello, now I have a time to return to this problem. I have noticed where propably is a problem.

We have a windows service name A, which call the web method x from webservice Z. Locally everything works great. The problem is still on the production enviroment.

Locally our webserver runs at Cassini. On production server it is not Cassini.

The problem is here:

protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
    if(Request.IsLocal)
         //DO WHAT I WANT
}

On the local machine, this condition is true. On the server is false. Windows service works also on server. I really don't have any idea what should I do :-).

Anyone can help me?

There is a little help to understand:
A_l - windows service named A on local machine
Z_l - webservice named Z on local machine

A - windows service named A on prodution server
Z - webservice named Z on production server

A_l invokes x from Z_l and we have Request.IsLocal == true 
A invokes x from Z and we have Request.IsLocal == false
Karol Bladek