SignalR icon indicating copy to clipboard operation
SignalR copied to clipboard

Cannot connect to SignalR through Domain Name.

Open nbhuy89 opened this issue 12 years ago • 2 comments

Hi, I have a situation below: I have 3 servers, which are loaded balancing with name http://.....net I use .net 4.5 and IIS 7.5, use Redis for scaling out

My problem is when i run by domain http://.....net, it's success when negotiate, but next stage is failed, detail header below:

Request URL:http://.....net/ChartSignalRDemo/signalr/negotiate?connectionData=%5B%7B%22name%22%3A%22chathub%22%7D%5D&_=1394501385905 Request Method:GET Status Code:200 OK Request Headersview source Accept:text/plain, /; q=0.01 Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8,vi;q=0.6 Connection:keep-alive Content-Type:application/json; charset=UTF-8 Cookie:ASP.NET_SessionId=kfszitlfu4ofvbklwjg0vso4; .ASPXAUTH=F1324AC4C321D24D9377A2C17665D31C86328FF8262559F12811A8DF5170B822C4833B2EEA1E4725E3F1F9ED16C19A3D2459FE68738734157DBDB88717AA0EF90B3D28FD17A629C36C4B322D0087AE6E71A73DE59313978C82E5C9E5DC5A4B4B114C01A1D9993D8704AD8B4263548FC11C10E61A; _ga=GA1.2.369506848.1385535107 Referer:http://.....net/ChartSignalRDemo/demopage.htm User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36 X-Requested-With:XMLHttpRequest Query String Parametersview sourceview URL encoded connectionData:[{"name":"chathub"}] _:1394501385905 Response Headersview source Cache-Control:no-cache Content-Length:424 Content-Type:application/json; charset=UTF-8 Date:Tue, 11 Mar 2014 01:28:01 GMT Expires:-1 Pragma:no-cache X-Content-Type-Options:nosniff

And next request failed:

Request URL:http://.....net/ChartSignalRDemo/signalr/connect?transport=serverSentEvents&connectionToken=2htNX994nec38LVaUvYyVkna_yzpx1fe4x0S6uSasCYX3FMy9eKQATvCZDVAbWbJB9ZExm5ysknsdDWKjdsdf4uhdl9K_cTu0YiCW_LC5WWfM0EtH7Wv3p_n_52S95GXmBRM1XfsQkfJJchX45bRQo9Uj2kuBPoLA3wn7d5ELkUpHtvrIxDALzD3WpoBjkoX0&connectionData=%5B%7B%22name%22%3A%22chathub%22%7D%5D&tid=6 Request Headers CAUTION: Provisional headers are shown. Accept:text/event-stream Cache-Control:no-cache Referer:http://.....net/ChartSignalRDemo/demopage.htm User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36 Query String Parametersview sourceview URL encoded transport:serverSentEvents connectionToken:2htNX994nec38LVaUvYyVkna_yzpx1fe4x0S6uSasCYX3FMy9eKQATvCZDVAbWbJB9ZExm5ysknsdDWKjdsdf4uhdl9K_cTu0YiCW_LC5WWfM0EtH7Wv3p_n_52S95GXmBRM1XfsQkfJJchX45bRQo9Uj2kuBPoLA3wn7d5ELkUpHtvrIxDALzD3WpoBjkoX0 connectionData:[{"name":"chathub"}] tid:6

signalrerror

The strange thing is when i login in each server and go to another domain which host the same code: http://localhost:8822/ChartSignalRDemo/demopage.htm it works perfectly.

Any way to solve this problem? Thanks.

nbhuy89 avatar Mar 11 '14 02:03 nbhuy89

Can you try upgrading to 2.0.3 given that you're using .NET 4.5 on the server) and see if this still reproduces? If it still fails we'll need some more information as there isn't enough here for us to reproduce this ourselves. If possible, provide a simple sample project and deployment instructions (given you're using scale-out and mention a specific URL type) that we can follow to see the issue ourselves.

DamianEdwards avatar Apr 02 '14 00:04 DamianEdwards

I solved this problem, add machine key in web.config, because web is running on load balancing servers. Thanks

nbhuy89 avatar May 29 '14 01:05 nbhuy89