2

I have a WCF webservice hosted in IIS6 that another site will POST to in a cross domain manner using jquery.

Because it is a cross domain POST, the browser first sends an OPTIONS verb with Access-Control-Request-Method: POST However, IIS6 does not respond back with anything.

Is this something that I need to handle at a web service level or something at the IIS level?

puffpio
  • 201
  • 4
  • 6

2 Answers2

2

What exactly is it giving you in the response? Also, how exactly is the OPTIONS request formed? You should be good unless you've manually disabled OPTIONS using something like URLScan.

squillman
  • 37,618
  • 10
  • 90
  • 145
  • I've the same problem and don't have URLScan installed. In my case it returns 403 for every OPTIONS request – Josef Jul 11 '11 at 19:04
0

You can edit your .svc mapping (if that is the URL you're using) in IIS6 in the website's Properties -> Home Directory -> Configuration -> Mappings -> .svc -> Edit -> Limit Verbs to explicitely allow the OPTIONS verb. That will allow you to receive OPTIONS requests in your WCF application and deal with them however you like (e.g. return Access-Control- headers in the Global.asax's Begin_Request method).

Josef
  • 393
  • 1
  • 3
  • 8