You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this stacktrace when doing an CORS ajax call: [HttpException (0x80004005): Server cannot set status after HTTP headers have been sent.] System.Web.HttpResponse.set_StatusCode(Int32 value) +9837007 Devbridge.BasicAuthentication.BasicAuthenticationModule.IssueAuthenticationChallenge(Object source, EventArgs e) in Devbridge.BasicAuthentication\BasicAuthenticationModule.cs:149 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I'm unclear if this is an issue with devbridge or is there something i need to configure in my application. My application is a web project using System.Web.Http.ApiController. My CORS settings were working using the Visual Studio IIS Instance, but when I deployed it to our azure environment running IIS and using this module, I'm getting that error and the ajax is failing.
Here is the request/response from Chrome Dev Tools:
Unfortunately we have not used BasicAuthenticationModule with CORS. Please create a pull request if you find a solution.
One more note - it seems that you are trying to protect your API with BasicAuthenticationModule. This module was created to be used for public facing websites. You should consider another options (like JWT) to secure your API.
Thank you for the suggestion. I'm just using basic auth for demo purposes since i've used the BasicAuthenticationModule before. I'll see if I can use get CORS working and will create a pull request. Yes I will eventually using JWT to properly secure my API.
Hello,
I'm getting this stacktrace when doing an CORS ajax call:
[HttpException (0x80004005): Server cannot set status after HTTP headers have been sent.] System.Web.HttpResponse.set_StatusCode(Int32 value) +9837007 Devbridge.BasicAuthentication.BasicAuthenticationModule.IssueAuthenticationChallenge(Object source, EventArgs e) in Devbridge.BasicAuthentication\BasicAuthenticationModule.cs:149 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I'm unclear if this is an issue with devbridge or is there something i need to configure in my application. My application is a web project using System.Web.Http.ApiController. My CORS settings were working using the Visual Studio IIS Instance, but when I deployed it to our azure environment running IIS and using this module, I'm getting that error and the ajax is failing.
Here is the request/response from Chrome Dev Tools:
The text was updated successfully, but these errors were encountered: