views:

29

answers:

1

I have an AJAX web application. ASP pages are accessing various Web Services that are part of the application using standard Microsoft .NET AJAX extension APIs.

Now, I have to call some of the web services from the Windows app.

It works when I add web reference to a project on my local development machine.

But when I try to access web service from production, I always get redirected to a login page.

I am using Windows XP and IIS5.1 in development and Windows 7/IIS 7 in production.

this is the line from Web.config:

        <authentication mode="Forms">

              <forms name=".localCookies" loginUrl="Login.aspx" protection="All" timeout="60" path="/"/>

        </authentication>

I've tried to set mode to "None" but now I am getting windows authentication screen.

Any idea how to change configurations?

+1  A: 

If you can get away with no security on your web services (e.g. Internal Only Server), then change your site's security settings to allow anonymous access to your web service.

<!-- Put beneath the closing </system.web> tag -->
<location path="YourWebService.ASMX" >
  <system.web>
    <authorization>
      <allow users="?" />
    </authorization>
  </system.web>
</location>
Zachary