【发布时间】:2013-03-13 16:00:27
【问题描述】:
我在 MVC 3.0 Windows Azure 应用程序中使用 SignalR。
以下行仅在 Windows Azure 模拟器中引发 ArgumentNullException。如果我运行 MVC 3.0 应用程序而不是云应用程序,它不会抛出。 (我还没有尝试在部署的云中运行此代码)。
public static void RegisterRoutes(RouteCollection routes)
{
RouteTable.Routes.MapHubs();
// ...
}
消息Value cannot be null.
Parameter name: instanceName 旁边没有关于错误的其他信息。我不知道它是什么实例名称。
我不知道可能出了什么问题。 为什么会这样?
编辑
这是完整的异常信息:
System.ArgumentNullException 未处理 HResult=-2147467261
Message=Value 不能为空。参数名称:instanceName
Source=Microsoft.AspNet.SignalR.Core ParamName=instanceName
堆栈跟踪: 在 Microsoft.AspNet.SignalR.Hosting.HostDependencyResolverExtensions.InitializeHost(IDependencyResolver 解析器、字符串 instanceName、CancellationToken hostShutdownToken) 在 Owin.OwinExtensions.UseType[T](IAppBuilder builder, Object[] args) 在 Owin.OwinExtensions.MapHubs(IAppBuilder 构建器,字符串路径,HubConfiguration 配置) 在 System.Web.Routing.SignalRRouteExtensions.c_DisplayClass7.b_5(IAppBuilder 地图) 在 Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action1 startup) at Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action1 启动) 在 System.Web.Routing.RouteCollectionExtensions.MapOwinPath(RouteCollection 路线、字符串名称、字符串路径基础、Action`1 启动) 在 System.Web.Routing.SignalRRouteExtensions.MapHubs(RouteCollection 路由、字符串名称、字符串路径、HubConfiguration 配置) 在 System.Web.Routing.SignalRRouteExtensions.MapHubs(RouteCollection 路由、字符串路径、HubConfiguration 配置) 在 System.Web.Routing.SignalRRouteExtensions.MapHubs(RouteCollection 路由,HubConfiguration 配置) 在 System.Web.Routing.SignalRRouteExtensions.MapHubs(RouteCollection 路线) 在 Cerebello.MvcApplication.RegisterRoutes(RouteCollection routes) 中 c:\Projetos\Cerebello\Cerebello\CerebelloWebRole\Global.asax.cs:line 25 在 CerebelloWebRole.Code.Helpers.RouteHelper.RegisterAllRoutes() 中 c:\Projetos\Cerebello\Cerebello\CerebelloWebRole\Code\Helpers\RouteHelper.cs:line 82 在 c:\Projetos\Cerebello\Cerebello\CerebelloWebRole\WebRole.cs:line 23 中的 CerebelloWebRole.WebRole.Run() 在 Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal() 在 Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRole() 在 Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.b__2() 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext、ContextCallback 回调、对象状态、布尔值 保留SyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback 回调, 对象状态, Boolean 保留SyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback 回调,对象状态) 在 System.Threading.ThreadHelper.ThreadStart() InnerException:
【问题讨论】:
-
你能在github上提交一个bug吗?
标签: .net asp.net-mvc-3 azure signalr