I am getting the following error: **Can't read from server. It may not have 
the appropriate access-control-origin settings.** when the code is deployed 
to the server.
I did lot of reserach adding the
Added folowing code in web.config 

        <httpProtocol>
          <customHeaders>
            <add name="Access-Control-Allow-Origin" value="*" />
            <add name="Access-Control-Allow-Methods" value="GET, POST, 
OPTIONS, PUT, DELETE" />
          </customHeaders>
        </httpProtocol>
or in the startup project

    public static void Configuration(IAppBuilder app)
            {
                app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
            }
or int the webapi.config -> Register

    config.EnableCors(new EnableCorsAttribute("*", "*", "*"));

Can some help? did anyone had the same issue[enter image description 
here][1]


  [1]: https://i.stack.imgur.com/x7tSP.jpg

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to