【发布时间】:2016-07-18 14:16:00
【问题描述】:
我将 MVC4 应用程序(使用 SignalR)部署到服务器。 SignalR 在我的开发机器上运行它时工作正常,但是当我将它部署到服务器后运行它时,我收到以下错误。我认为这与无权写入事件日志有关。我查看了this 的答案,但这些解决方案对我不起作用。有人能解释一下吗?
System.Security.SecurityException:找不到源,但无法搜索部分或全部事件日志。要创建源,您需要读取所有事件日志的权限,以确保新的源名称是唯一的。无法访问的日志:安全性。
服务器堆栈跟踪:在 System.Diagnostics.EventLog.FindSourceRegistration(字符串源, String machineName, Boolean readOnly, Boolean wantToCreate) at System.Diagnostics.EventLog.SourceExists(字符串源,字符串 machineName, Boolean wantToCreate) at System.Diagnostics.EventLogInternal.VerifyAndCreateSource(字符串 sourceName,字符串 currentMachineName) 在 System.Diagnostics.EventLogInternal.WriteEvent(EventInstance 实例, Byte[] 数据,Object[] 值)在 System.Diagnostics.EventLog.WriteEvent(EventInstance 实例, 对象 [] 值)在 System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id,字符串格式,Object[] args)在 Microsoft.AspNet.SignalR.Transports.TransportHeartbeat.c__DisplayClass2.b__1(字符串 键,ConnectionMetadata 旧)在 System.Collections.Concurrent.ConcurrentDictionary
2.AddOrUpdate(TKey key, TValue addValue, Func3 updateValueFactory) 在 Microsoft.AspNet.SignalR.Transports.TransportHeartbeat.AddConnection(ITrackingConnection 连接)在 Microsoft.AspNet.SignalR.Transports.ForeverTransport.ProcessReceiveRequest(ITransportConnection 连接)在 Microsoft.AspNet.SignalR.PersistentConnection.ProcessRequest(HostContext 上下文)在 Microsoft.Owin.Host.SystemWeb.OwinCallContext.Execute() 在 Microsoft.Owin.Host.SystemWeb.OwinHttpHandler.BeginProcessRequest(HttpContextBase httpContext、AsyncCallback 回调、对象 extraData)在 [0] 处重新抛出异常:在 Microsoft.Owin.Host.SystemWeb.Infrastructure.ErrorState.c__DisplayClass1.b__0(异常 例如)在 Microsoft.Owin.Host.SystemWeb.CallContextAsyncResult.End(IAsyncResult 结果)在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤, Boolean& completedSynchronously) 失败的程序集区域 是:我的电脑
【问题讨论】:
标签: .net asp.net-mvc asp.net-mvc-4 signalr