Base solution for your next web application

Activities of "cictan"

Question

my host website is dobany.com, angular site is admin.dobany.com, I have aleady updated the setting like this: "App": { "ServerRootAddress": "http://dobany.com", "ClientRootAddress": "http://admin.dobany.com", "CorsOrigins": "http://*.dobany.com,http://localhost:4200,http://localhost:49152,http://admin.dobany.com", "SwaggerEndPoint": "/swagger/v1/swagger.json", "AllowAnonymousSignalRConnection": "true" },

But I still have issues:

  1. angular site works fine, I can see the data loaded, however, when I submitted email setting from the host setting page, the error messages showed: Access to XMLHttpRequest at 'http://dobany.com/api/services/app/HostSettings/UpdateAllSettings' from origin 'http://admin.dobany.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. polyfills.59c59ad684f93239a61e.js:1 PUT http://dobany.com/api/services/app/HostSettings/UpdateAllSettings net::ERR_FAILED

  2. When I refreshed the home page or loaded different pages, the cors policy issue showed occasionally

Answer

I updated web.config and the updates worked:

<system.webServer> <modules runAllManagedModulesForAllRequests="false"> <remove name="WebDAVModule" /> </modules> </system.webServer>

However, I still see the issue showed occasionally

Access to XMLHttpRequest at 'http://dobany.com/api/services/app/Account/ResolveTenantId' from origin 'http://admin.dobany.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. dobany.com/api/services/app/Account/ResolveTenantId:1 Failed to load resource: net::ERR_FAILED main.c435b59a98948a44e76d.js:1 ERROR Error: An unexpected server error occurred. at new t (main.c435b59a98948a44e76d.js:1) at to (main.c435b59a98948a44e76d.js:1) at t.project (main.c435b59a98948a44e76d.js:1) at t._tryNext (main.c435b59a98948a44e76d.js:1) at t._next (main.c435b59a98948a44e76d.js:1) at t.next (main.c435b59a98948a44e76d.js:1) at e._subscribe (main.c435b59a98948a44e76d.js:1) at e._trySubscribe (main.c435b59a98948a44e76d.js:1) at e.subscribe (main.c435b59a98948a44e76d.js:1) at e.call (main.c435b59a98948a44e76d.js:1)

Answer

I opened the dashboard page, the following error showed, I then refresh the page, the error disappeared and everything worked, any idea? :

Access to XMLHttpRequest at 'http://dobany.com/api/services/app/HostDashboard/GetDashboardStatisticsData?IncomeStatisticsDateInterval=1&StartDate=2019-08-21T07%3A00%3A00.000Z&EndDate=2019-08-29T06%3A59%3A59.999Z' from origin 'http://app.dobany.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. polyfills.59c59ad684f93239a61e.js:1 GET http://dobany.com/api/services/app/HostDashboard/GetDashboardStatisticsData?IncomeStatisticsDateInterval=1&StartDate=2019-08-21T07%3A00%3A00.000Z&EndDate=2019-08-29T06%3A59%3A59.999Z net::ERR_FAILED T @ polyfills.59c59ad684f93239a61e.js:1 t.scheduleTask @ polyfills.59c59ad684f93239a61e.js:1 onScheduleTask @ polyfills.59c59ad684f93239a61e.js:1 t.scheduleTask @ polyfills.59c59ad684f93239a61e.js:1 e.scheduleTask @ polyfills.59c59ad684f93239a61e.js:1 e.scheduleMacroTask @ polyfills.59c59ad684f93239a61e.js:1 v @ polyfills.59c59ad684f93239a61e.js:1 (anonymous) @ polyfills.59c59ad684f93239a61e.js:1 A.i.<computed> @ polyfills.59c59ad684f93239a61e.js:1 (anonymous) @ main.c435b59a98948a44e76d.js:1 e._trySubscribe @ main.c435b59a98948a44e76d.js:1 e.subscribe @ main.c435b59a98948a44e76d.js:1 e.intercept @ main.c435b59a98948a44e76d.js:1 e.handle @ main.c435b59a98948a44e76d.js:1 e.intercept @ main.c435b59a98948a44e76d.js:1 e.handle @ main.c435b59a98948a44e76d.js:1 e.intercept @ main.c435b59a98948a44e76d.js:1 e.handle @ main.c435b59a98948a44e76d.js:1 e.handle @ main.c435b59a98948a44e76d.js:1 (anonymous) @ main.c435b59a98948a44e76d.js:1 t._tryNext @ main.c435b59a98948a44e76d.js:1 t._next @ main.c435b59a98948a44e76d.js:1 t.next @ main.c435b59a98948a44e76d.js:1 (anonymous) @ main.c435b59a98948a44e76d.js:1 e._trySubscribe @ main.c435b59a98948a44e76d.js:1 e.subscribe @ main.c435b59a98948a44e76d.js:1 e.call @ main.c435b59a98948a44e76d.js:1 e.subscribe @ main.c435b59a98948a44e76d.js:1 e.call @ main.c435b59a98948a44e76d.js:1 e.subscribe @ main.c435b59a98948a44e76d.js:1 e.call @ main.c435b59a98948a44e76d.js:1 e.subscribe @ main.c435b59a98948a44e76d.js:1 e.call @ main.c435b59a98948a44e76d.js:1 e.subscribe @ main.c435b59a98948a44e76d.js:1 n.getDashboardStatisticsData @ 8.48c9374a55a423eb696e.js:1 n.init @ 8.48c9374a55a423eb696e.js:1 n.ngOnInit @ 8.48c9374a55a423eb696e.js:1 (anonymous) @ main.c435b59a98948a44e76d.js:1 (anonymous) @ main.c435b59a98948a44e76d.js:1 qO @ main.c435b59a98948a44e76d.js:1 QO @ main.c435b59a98948a44e76d.js:1 (anonymous) @ 8.48c9374a55a423eb696e.js:1 updateDirectives @ main.c435b59a98948a44e76d.js:1 AO @ main.c435b59a98948a44e76d.js:1 CO @ main.c435b59a98948a44e76d.js:1 kO @ main.c435b59a98948a44e76d.js:1 AO @ main.c435b59a98948a44e76d.js:1 CO @ main.c435b59a98948a44e76d.js:1 TO @ main.c435b59a98948a44e76d.js:1 AO @ main.c435b59a98948a44e76d.js:1 CO @ main.c435b59a98948a44e76d.js:1 kO @ main.c435b59a98948a44e76d.js:1 AO @ main.c435b59a98948a44e76d.js:1 CO @ main.c435b59a98948a44e76d.js:1 TO @ main.c435b59a98948a44e76d.js:1 AO @ main.c435b59a98948a44e76d.js:1 CO @ main.c435b59a98948a44e76d.js:1 kO @ main.c435b59a98948a44e76d.js:1 AO @ main.c435b59a98948a44e76d.js:1 CO @ main.c435b59a98948a44e76d.js:1 TO @ main.c435b59a98948a44e76d.js:1 AO @ main.c435b59a98948a44e76d.js:1 e.detectChanges @ main.c435b59a98948a44e76d.js:1 e.tick @ main.c435b59a98948a44e76d.js:1 (anonymous) @ main.c435b59a98948a44e76d.js:1 t.invoke @ polyfills.59c59ad684f93239a61e.js:1 onInvoke @ main.c435b59a98948a44e76d.js:1 t.invoke @ polyfills.59c59ad684f93239a61e.js:1 e.run @ polyfills.59c59ad684f93239a61e.js:1 e.run @ main.c435b59a98948a44e76d.js:1 next @ main.c435b59a98948a44e76d.js:1 i @ main.c435b59a98948a44e76d.js:1 t.__tryOrUnsub @ main.c435b59a98948a44e76d.js:1 t.next @ main.c435b59a98948a44e76d.js:1 t._next @ main.c435b59a98948a44e76d.js:1 t.next @ main.c435b59a98948a44e76d.js:1 t.next @ main.c435b59a98948a44e76d.js:1 t.emit @ main.c435b59a98948a44e76d.js:1 Fm @ main.c435b59a98948a44e76d.js:1 onHasTask @ main.c435b59a98948a44e76d.js:1 t.hasTask @ polyfills.59c59ad684f93239a61e.js:1 t._updateTaskCount @ polyfills.59c59ad684f93239a61e.js:1 e._updateTaskCount @ polyfills.59c59ad684f93239a61e.js:1 e.runTask @ polyfills.59c59ad684f93239a61e.js:1 d @ polyfills.59c59ad684f93239a61e.js:1 e.invokeTask @ polyfills.59c59ad684f93239a61e.js:1 b @ polyfills.59c59ad684f93239a61e.js:1 m @ polyfills.59c59ad684f93239a61e.js:1 Show 58 more frames main.c435b59a98948a44e76d.js:1 ERROR Error: An unexpected server error occurred. at new t (main.c435b59a98948a44e76d.js:1) at to (main.c435b59a98948a44e76d.js:1) at t.project (main.c435b59a98948a44e76d.js:1) at t._tryNext (main.c435b59a98948a44e76d.js:1) at t._next (main.c435b59a98948a44e76d.js:1) at t.next (main.c435b59a98948a44e76d.js:1) at e._subscribe (main.c435b59a98948a44e76d.js:1) at e._trySubscribe (main.c435b59a98948a44e76d.js:1) at e.subscribe (main.c435b59a98948a44e76d.js:1) at e.call (main.c435b59a98948a44e76d.js:1)

Answer

no, I kept looking at the backend logs, no useful messages.

Question

I've just set up the public site, however, it has no style, I checked the source code and found this: however, I don't see these files. I didn't see errors when I built the project. Can anyone help me?

Answer

I've sent you the log, thanks

Answer

Thanks, this is just a demo site. And also I found another strange issue today, the first time I loaded the angular home page(which will be the login page), it always reported CORS issue(of course, as you said, it was not caused by cors), and then I refreshed it, the issue was gone.

No other site has the same issue before, it's just me? Thank you so much, I will look at the IIS logs.

Answer

Hi maliming, I have checked IIS logs and the windows event logs very carefully with the date time when the errors occurred, but found no information. Any other suggestions? or work around?

I can run the iOS project on simulators and devices, however the android project has a problem.

How can I fix it?

7.1

Showing 1 to 10 of 22 entries