Base solution for your next web application

Activities of "Riaan.Smit"

Hi @ismcagdas,

Thank you for the follow up and all the help. I got the problem resolved on Monday. It was basically all related to the nginx server configuration. After spending a few hours with my server team, we got the config sorted and the signalr functionality worked 100%.

Hi @ismcagdas,

So I know why I'm getting the weird syntax error. If I check the url for any of the signalr endpoints, I'm getting the 404 html page back.

Navigating to any of the signalr urls produce a 404 page. I'm not sure if I deployed the server portion of the project correctly?

https://psecportalapi.prescient.co.za/signalr-chat/negotiate

Hi @ismcagdas,

I just sat with my server team and confirmed the reverse proxy settings and it seems like the websocket connection issue might be resolved. However, now I'm getting 100ds of "Cannot start the connection using ServerSentEvents transport. Unexpected token < in JSON at position 0" errors in the chrome console. And none of the .json files have any '<' characters in....any ideas where I can find what is causing the exception. Sorry I know this is super generic.

So I updated the abp packages to the latest version yersterday and did a fresh release. The error seems a bit different today. It seems like the end poinjt is getting reached, eventhough the handshake still fails. If I execute a POST request with the url in Postman, I get a 200 response though.

&lt;handlers&gt;
	&lt;remove name=&quot;WebDAV&quot; /&gt;
	&lt;remove name=&quot;ExtensionlessUrlHandler-Integrated-4.0&quot; /&gt;
	&lt;remove name=&quot;OPTIONSVerbHandler&quot; /&gt;
	&lt;add name=&quot;ExtensionlessUrlHandler-Integrated-4.0&quot; path=&quot;*.&quot; verb=&quot;*&quot; type=&quot;System.Web.Handlers.TransferRequestHandler&quot; preCondition=&quot;integratedMode,runtimeVersionv4.0&quot; /&gt;	  
&lt;/handlers&gt;

Great, thanx for the confirmation.

Hi @Ismcagdas,

Thank you for the reply. I tried everything I've read regarding server configuration, and after replacing the actual statup cors code with : builder .AllowAnyMethod() .AllowAnyHeader() .AllowAnyOrigin();

I'm still getting the same "No 'Access-Control-Allow-Origin' header is present on the requested resource" error on /signalr/negotiate

Am I correct in assuming that this error might have nothing to do with the Cors setup in the startup routine? I'm completely out of ideas.

So after reading up about nginx and signalR, I asked my server team to update the server config with the details as described in the following post (https://kimsereyblog.blogspot.com/2018/07/signalr-with-asp-net-core.html at #4)

No I'm getting a CORS policy failure on the signalR comms. I've also updated the appsettings.Production.config file to include the signalR hub enpoints:

"CorsOrigins": "https://psecportalapi.prescient.co.za,https://psecportal.prescient.co.za,https://psecportalapi.prescient.co.za/signalr-chat/negotiate,https://psecportalapi.prescient.co.za/signalr-equityDesk/negotiate"

Any ideas?

Thank you for the quick response!

Hi Maliming,

The value is set on the client side. It's in abp.js correct? That's the only place I could find to set it. Is there somewhere else I also need to set it?

Hi @Maliming,

I resolved the issue by following the advice on on https://docs.microsoft.com/en-us/aspnet/web-api/overview/testing-and-debugging/troubleshooting-http-405-errors-after-publishing-web-api-applications

I added the <remove name="WebDAV" />, line to my web.config, but I also had to manually remove the WebDav modules listed under Handler Mappings and ISAPI Filters in IIS. Once I did that, the functions started to work.

Showing 1 to 10 of 13 entries