Web Performance Test: SignalR - Unrecognized user

2019-08-27 09:36发布

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条回答
相关推荐>>
2楼-- · 2019-08-27 10:04

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.

查看更多
登录 后发表回答