1

I have an ASP.NET 3.5 Website (Win 7, IIS 7.0) that uses Forms Authentication. I trying to implement a WCF REST webservice endpoint (Rest.svc) but it keeps redirecting webservice calls to the login page "Login.aspx".

If I change the website to Windows authentication, it works well but that does not help because I need to support FORMS authentication.

I even tried the following changes to the web.config file as some have suggested, but it has not worked either.

<location path="Rest.svc">
    <system.web>
        <authorization>
            <allow users="*"/>
        </authorization>
    </system.web>
</location>

Note: that I have other myService.ashx and webservices.asmx webservices runing on the same website that don't have these issues.

Am I missing something?

Tawani
  • 10,649
  • 20
  • 77
  • 104
  • Can Rest.svc sit in it's own directory? If so you can drop a local web.config in folder (with allow users="*"). Rest.svc is currently in the web root? – Neil Thompson Dec 02 '11 at 12:33
  • Yes. I even added it in its on /Services/Api.svc with its own web.config but that did not work either – Tawani Dec 02 '11 at 13:38

1 Answers1

0

In my case the issue is that IIS svc handlers were not registered, So IIS was not able to serve SVC files. Follow the link below which will tell you how to install some features to get the handler mappings.

WCF on IIS8; *.svc handler mapping doesn't work

Screenshot of IIS "Handler Mappings" after the fix