我有一个 WCF 服务服务,它在本地 IIS 中托管时运行良好,但在 Azure VM IIS 中托管时会出现以下异常:
DispatchOperation requires Invoker.
Exception Details: System.InvalidOperationException: DispatchOperation requires Invoker
堆栈跟踪 :
[InvalidOperationException: DispatchOperation requires Invoker.]
System.ServiceModel.Dispatcher.DispatchOperationRuntime..ctor(DispatchOperation operation, ImmutableDispatchRuntime parent) +17276262
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime..ctor(DispatchRuntime dispatch) +824
System.ServiceModel.Dispatcher.DispatchRuntime.GetRuntimeCore() +114
System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpened() +520
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +766
System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +260
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +742
System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +126
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +901
[ServiceActivationException: The service '/PidPlusService.svc' cannot be activated due to an exception during compilation. The exception message is: DispatchOperation requires Invoker..]
System.Runtime.AsyncResult.End(IAsyncResult result) +650220
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +210733
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +282
我有服务中的 svc 文件、web.config 文件和 dll。服务项目是一个类库项目,是生成 dll 的解决方案的一部分。在 Azure 中托管的代码中是否需要更改某些内容?还是配置问题?