Web Performance Test: SignalR - Unrecognized user identity

半世苍凉 提交于 2019-12-25 02:37:10

问题


When running a recorded Web Test using Visual Studio, initializing the signalr connection triggers the error.

Unrecognized user identity. The user identity cannot change during an active SignalR connection.

Request:

GET /Computer/signalr/connect?
transport=foreverFrame&
connectionToken=xxx&
connectionData=yyy&
tid=7&
frameId=1 HTTP/1.1

User-Agent : Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Accept : */*
Accept-Language : en-GB
Accept-Encoding : GZIP
Host : test.host.com
Cookie : __RequestVerificationToken_L01XTS1NYXN0ZXI1=YCuMgJ7WD6QNtHnUvgM4EFvVJ5lllR477xjaMAzFogypdqXEFV054ygGy0Spnqwo3LJDbDHyzGudF8QdTRZW30zcBHGh8oI7CEj2L0k01Eg1

Response:

HTTP/1.1 403 Forbidden
Pragma : no-cache
Transfer-Encoding : chunked
X-Content-Type-Options : nosniff
Cache-Control : no-cache
Content-Type : text/html
Date : Wed, 03 Sep 2014 13:42:03 GMT
Expires : -1

Update:

Looks like the problem is reconciling a change in user status with an active connection.

If a user's authentication status changes while an active connection exists, the user will receive an error that states, "The user identity cannot change during an active SignalR connection."

In that case, your application should re-connect to the server to make sure the connection id and username are coordinated.

Not sure how to coordinate the username and connection id during the webtest.


回答1:


I would suspect a dynamic parameter that has not been handled so a value provided by the server when test was recorded is being passed when the test is executed. The server is then detecting that a request is passing an unexpected value (ie the old value) and creating that message.

There are several web pages giving advice on debugging web performance tests. One technique is to record two versions of the test that are, as nearly as possible, identical. Then use a text comparison program to compare the two ".webtest" file. Sometimes recording a third test that logs in as a different user but otherwise is as nearly as possible identical to the other two test. Then comparing this third ".webtest" against the others. The comparison will, hopefully, indicate one or more dynamic parameters that had not previously been noted.



来源:https://stackoverflow.com/questions/25647166/web-performance-test-signalr-unrecognized-user-identity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!