1

I have not used the WebAPI for Web forms before but have inherited code that uses the WebAPI, so I apologise if this is a stupid question.

From the research I have undertaken today our setup seems fairly basic...

  1. Route Table definition in global.asax

  2. A Controller class that inherits from the ApiController

  3. Ajax calls via jQuery

This all works fine locally and on product sites that do not have SSL certificates. However, the site has an SSL the ajax call produces a 404.

Any help would be greatly appreciated.

Thank You!

Rich

Alex KeySmith
  • 16,657
  • 11
  • 74
  • 152

1 Answers1

0

This worked for me:

Go to: IIS -> [your site] -> Handler Mappings

You need to make sure there is a Handler mapped to a path your web service is using, i.e. " */api/* ". In my project there was an existing handler called "Static File" with such a path. It used the StaticFileModule, DefaultDocumentModule, and DirectoryListingModule.

Under "Request Restrictions" set the rules that apply to your project. My settings:

Mapping - Check "Invoke handler only if request is mapped to:" - Mark "File or folder"

Verbs - "All Verbs"

Access - "Script" (default)

More info about Request Restrictions: http://technet.microsoft.com/en-us/library/cc730969(v=ws.10).aspx

These settings can most likely be set in your site's Web.config. I'll post my findings when I get that working.

Doc
  • 81
  • 3