I am trying to deploy my app to azure.
The buildup is as followed:
- .Net WCF REST Service witch does data handling
- .Net MVC App witch is the site
So I deployed my service on 1 site (xxService.azurewebsites.net) and the App on the other site xxApp.azurewebsites.net
I offcorse made in the config of both apps to allow orginin and stuff:
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value=<<Address to app>> />
<add name="Access-Control-Allow-Headers" value="Origin, X-Requested-With, Content-Type, Accept" />
<add name="Access-Control-Allow-Methods" value="GET,POST,DELETE,HEAD,PUT,OPTIONS" />
<add name="Access-Control-Allow-Credentials" value="true" />
</customHeaders>
</httpProtocol>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
Now the Error I am getting is that the connection is not allowing OPTION
call's to the SERVICE
:
OPTIONS <some POST endpoint>
XMLHttpRequest cannot load <some POST endpoint>
. Invalid HTTP status code 405
I also tryed to deploy the WCF on a subfolder in the MVC app with Virtual directory but that is not working at all.
Hope anyone got an idea?