cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

No 'Access-Control-Allow-Origin' in ASP.net web API call

I get the following error  with my API call (for all APIs anyway): 

Could someone help to get this working fine ?.

 

When I run the same setup in Azure, works fine.

 

"Failed to load resource: the server responded with a status of 403 (Site Disabled)"

"Failed to load http://www.muhyl.com/api/VFO/UserExists: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://demo.muhyl.com' is therefore not allowed access."

 

My ASP.net controller has following call :

[EnableCors(origins: "http://www.demo.Muhyl.com", headers: "*", methods: "*", SupportsCredentials = true)]

 

Web.config is as follows (default from Godaddy)

<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>

1 REPLY 1
Community Manager
Community Manager

Re: No 'Access-Control-Allow-Origin' in ASP.net web API call

Hi @pubuducg. I'm not familiar enough with this type of code or the error in question to offer much in the way of assistance. However, I know one thing that can cause issues on Windows accounts (especially if it works elsewhere) is the trust level you have set for the site. You can find out more about changing this here. Not sure it will help, but I thought it might be worth a shot.

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.