使用 SignalR 实用程序时出错 Crank.exe
Error using SignalR utility Crank.exe
我正在使用 crank 来加载测试我的信号器应用程序。我使用的命令如下
crank /NumClients:100 /Url:http://localhost:29573/TestConnection /BatchSize:10
我的 powershell window 出现如下异常...
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object
reference not set to an instance of an object.
at Microsoft.AspNet.SignalR.Client.HubConnection.GetUrl(String url, Boolean useDefaultUrl) in c:\Users\t-niraj\Deskto
p\SignalR-master\src\Microsoft.AspNet.SignalR.Client\HubConnection.cs:line 216
at Microsoft.AspNet.SignalR.Client.HubConnection..ctor(String url, Boolean useDefaultUrl) in c:\Users\t-niraj\Desktop
\SignalR-master\src\Microsoft.AspNet.SignalR.Client\HubConnection.cs:line 38
at Microsoft.AspNet.SignalR.Client.HubConnection..ctor(String url) in c:\Users\t-niraj\Desktop\SignalR-master\src\Mic
rosoft.AspNet.SignalR.Client\HubConnection.cs:line 28
at Microsoft.AspNet.SignalR.Crank.Client.<OpenControllerConnection>d__6.MoveNext() in c:\Users\t-niraj\Desktop\Signal
R-master\src\Microsoft.AspNet.SignalR.Crank\Client.cs:line 71
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.SignalR.Crank.Client.<Run>d__0.MoveNext() in c:\Users\t-niraj\Desktop\SignalR-master\src\Microsof
t.AspNet.SignalR.Crank\Client.cs:line 43
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Microsoft.AspNet.SignalR.Crank.Client.Main() in c:\Users\t-niraj\Desktop\SignalR-master\src\Microsoft.AspNet.Signa
lR.Crank\Client.cs:line 34
我有示例应用程序:SignalR.LoadTestHarness 在 localhost:29573 运行。这与 SignalR 源代码示例中的应用程序相同。
我做错了什么?
您没有提供 ControllerUrl
参数,因此 crank 是 trying to create a hub connection with null Url which results in throwing a NullReferenceException
on this 行。
我正在使用 crank 来加载测试我的信号器应用程序。我使用的命令如下
crank /NumClients:100 /Url:http://localhost:29573/TestConnection /BatchSize:10
我的 powershell window 出现如下异常...
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object
reference not set to an instance of an object.
at Microsoft.AspNet.SignalR.Client.HubConnection.GetUrl(String url, Boolean useDefaultUrl) in c:\Users\t-niraj\Deskto
p\SignalR-master\src\Microsoft.AspNet.SignalR.Client\HubConnection.cs:line 216
at Microsoft.AspNet.SignalR.Client.HubConnection..ctor(String url, Boolean useDefaultUrl) in c:\Users\t-niraj\Desktop
\SignalR-master\src\Microsoft.AspNet.SignalR.Client\HubConnection.cs:line 38
at Microsoft.AspNet.SignalR.Client.HubConnection..ctor(String url) in c:\Users\t-niraj\Desktop\SignalR-master\src\Mic
rosoft.AspNet.SignalR.Client\HubConnection.cs:line 28
at Microsoft.AspNet.SignalR.Crank.Client.<OpenControllerConnection>d__6.MoveNext() in c:\Users\t-niraj\Desktop\Signal
R-master\src\Microsoft.AspNet.SignalR.Crank\Client.cs:line 71
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.SignalR.Crank.Client.<Run>d__0.MoveNext() in c:\Users\t-niraj\Desktop\SignalR-master\src\Microsof
t.AspNet.SignalR.Crank\Client.cs:line 43
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Microsoft.AspNet.SignalR.Crank.Client.Main() in c:\Users\t-niraj\Desktop\SignalR-master\src\Microsoft.AspNet.Signa
lR.Crank\Client.cs:line 34
我有示例应用程序:SignalR.LoadTestHarness 在 localhost:29573 运行。这与 SignalR 源代码示例中的应用程序相同。
我做错了什么?
您没有提供 ControllerUrl
参数,因此 crank 是 trying to create a hub connection with null Url which results in throwing a NullReferenceException
on this 行。