Adding CORS support to a legacy asp.net soap service -


for purposes of allowing developers connect development server, i'd enable cors. on development server, i've added following web.config options:

   <add name="access-control-allow-origin" value="http://localhost:3000" />    <add name="access-control-allow-methods" value="get, post, options" />    <add name="access-control-allow-headers" value="content-type" />    <add name="access-control-allow-credentials" value="true" /> 

when hit asmx , wsdl (e.g. /someservice.asmx?wsdl), see headers. however, when client-library development partners using hit service, perform options request against target method:

options /someservice.asmx/getall http/1.1 etc. 

again, appropriate cors headers present, server gives 500 status code, , subsequent real request doesn't occur. same error occurs if get verb used in place of options request.

i presumably need handle non-post requests in soap service (specifically options). but, i'm not sure start. i've tried adding web config:

<webservices>   <protocols>     <add name="httpget" />     <add name="httppost" />   </protocols> </webservices> 

and permits get requests go through; process though full posts, , options still fail.

is there simple way handle custom and/or options verbs in legacy, asp.net (.net 3.5) asmx/soap service? or, there quicker way give client-side developers access development server's services?


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -