You must Sign In to post a response.
  • Category: Webservices


    Hi there,

    I am very new to webservices, I have created SOAP based service and it is returning the json data while testing, and I hosted the service in the IIS server and tried to call from another system using ajax post method, then it is giving the error "access-control-allow-Origin" in the browser.
    So I have added the header in IIS with value ' * ' the the error was gone and getting the error status 500 (Internal server error).

    Help me to solve this issue.

    Thanks in advance,
  • #759265
    Hello Vijay,

    Follow the below referenced websites:

    Hope this will help you.

    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"

  • #759273
    you need to add following lines in web.config to add access control, just add value as '*' so everyone can easily access it. to resolve 505 error you need to put some debugger while call webservice method and check which line throws exception, have you check

    <add name="Access-Control-Allow-Origin" value="*"/>
    <add name="Access-Control-Allow-Headers" value="Origin, X-Requested-With, Content-Type, Accept" />

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • Sign In to post your comments