SignalR works fine localhost, but when I deploy to azure and not change any code, signalr gives a 500 error.
Failed to load http://test.azurewebsites.net/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B%22name%22%3A%22abpcommonhub%22%7D%2C%7B%22name%22%3A%22chathub%22%7D%5D&_=1476676211353
resource: the server responded with a status of 500 (Internal Server Error)
GET http://test.azurewebsites.net/signalr/negotiate?clientProtocol=1.5&connec…22abpcommonhub%22%7D%2C%7B%22name%22%3A%22chathub%22%7D%5D&_=1476676211360 500 (Internal Server Error)
layout-libs.min.js?v=iDqjC6KTvzCpsxu5nUJHDUqAYIf9Q5BAbRhBBiD1vvU:15
Any advice would be appreciated. Thanks.
6 Answer(s)
-
0
Hi,
Did you deploy on a VM ? If so, you can check Logs.txt (under your iis site folder) for more error details.
Otherwise you can check Azure's logs to see error details.It might be a configuration issue.
-
0
I looked into the logs. The 500 error in my azure environment: D:\home\site\wwwroot\signalr\negotiate
http://testsite:80/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B%22name%22%3A%22abpcommonhub%22%7D%2C%7B%22name%22%3A%22chathub%22%7D%5D&_=1476798018491
Does it have anything to do with ABP platform? I could not find anything in the ABP SignalR documentation about deployment.
I have monitored my azure web app: <a class="postlink" href="https://azure.microsoft.com/en-us/documentation/articles/web-sites-enable-diagnostic-log/">https://azure.microsoft.com/en-us/docum ... ostic-log/</a>
Copy the code below, paste in notepad and save as error.html to view:
-
0
The 500 error is caused because of path location? SignalR is caught in a GET loop trying to connect, but is not targeting the correct path within Azure:
http://testapp:80/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B%22name%22%3A%22abpcommonhub%22%7D%2C%7B%22name%22%3A%22chathub%22%7D%5D&_=1476799379443
-
0
Hi,
We haven't faced such a problem when deploying to azure.
Your problem seems like a security or configuration issue.I have found this one when searching about your problem <a class="postlink" href="https://github.com/SignalR/SignalR/issues/3659#issuecomment-247773451">https://github.com/SignalR/SignalR/issu ... -247773451</a>
Can you try to do that ? -
0
Should the url be my server url? <a class="postlink" href="http://www.website.com:80/signalr/">http://www.website.com:80/signalr/</a> instead of <a class="postlink" href="http://website:80/signalr/">http://website:80/signalr/</a>
I took a screenshot of my trace in my Azure environment:
-
0
Logs from azure server:
ERROR 2016-10-21 12:42:21,610 [28 ] e.Diagnostics.ExceptionHandlerMiddleware - An unhandled exception has occurred: The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating. System.Security.Cryptography.CryptographicException: The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating. at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope) at System.Security.Cryptography.DpapiDataProtector.ProviderProtect(Byte[] userData) at Microsoft.AspNet.SignalR.Infrastructure.DataProtectionProviderProtectedData.Protect(String data, String purpose) at Microsoft.AspNet.SignalR.PersistentConnection.ProcessNegotiationRequest(HostContext context) at Microsoft.AspNet.SignalR.PersistentConnection.ProcessRequest(HostContext context) at Microsoft.Owin.Mapping.MapMiddleware.d__0.MoveNext()