Closed commodus closed 2 months ago
@commodus is there any error log on the browser console?
@commodus I dont seem to have this issue. It logs in fine for me. PS i am using PostgreSQL. I would need more info to figure out the issue
Hello @iammukeshm, Thanks for your quick response. When I set the "launchBrowser" value to false in the launchSettings.json file and run the Blazor application on port 7100, I don't encounter this error. However, when I set the "launchBrowser" value to false on port 55951 and fill in the administrator settings and click the Sign In button, it gives me this error. I can catch this code block within a try-catch. Below, I am sharing the screenshot and stack trace.
' at System.Net.Http.BrowserHttpInterop.1[[System.Runtime.InteropServices.JavaScript.JSObject, System.Runtime.InteropServices.JavaScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()\n at System.Net.Http.BrowserHttpHandler.CallFetch(HttpRequestMessage request, CancellationToken cancellationToken, Nullable
1 allowAutoRedirect)\n at System.Net.Http.BrowserHttpHandler.
@commodus I suspect this might be the CORS issue. It should be logged on your browser console i believe. So if you run your blazor application on , let's say port https://localhost:1234, you need to make sure to add this address to the API's app settings.
Specifically in this list,
"CorsOptions": {
"AllowedOrigins": [
"https://localhost:7100",
"http://localhost:7100",
"http://localhost:5010"
]
},
Only the requests coming from the addresses mentioned in this list will be allowed by the API. it will block requests from any other URLs. Let me know if this helps
Thank you. I will try it.
Hi @iammukeshm,
I am getting an error with no details in the JwtAuthenticationService.cs file line 57 I am using SqlServer database. This error occured when getting your latest commit.
Thank you