访问被拒绝(System.ComponentModel.Win32Exception),同时调用WCF服务

时间:2014-01-23 18:12:40

标签: wcf windows-8.1 capability appcontainer

通过Windows 8.1上的主机exe托管WCF服务我收到了与AppContainer相关的错误。我找不到有关堆栈跟踪顶部方法的任何好文档。在这里抓住稻草的那种。

“System.ComponentModel.Win32Exception(0x80004005):访问被拒绝\ r \ n \ r \ n \ n堆栈跟踪:\ r \ n \ n
at System.ServiceModel.Channels.AppContainerInfo.GetCurrentProcessToken()\ r \ n

在System.ServiceModel.Channels.AppContainerInfo.RunningInAppContainer()\ r \ n

at System.ServiceModel.Channels.AppContainerInfo.get_IsRunningInAppContainer()\ r \ n

at System.ServiceModel.Channels.PipeSharedMemory.BuildPipeName(String pipeGuid)\ r \ n

在System.ServiceModel.Channels.PipeSharedMemory.get_PipeName()\ r \ n

在System.ServiceModel.Channels.PipeSharedMemory.GetPipeName(AppContainerInfo appInfo)\ r \ n

在System.ServiceModel.Channels.PipeConnectionInitiator.GetPipeName(Uri uri,IPipeTransportFactorySettings transportFactorySettings)\ r \ n

at System.ServiceModel.Channels.NamedPipeConnectionPoolRegistry.NamedPipeConnectionPool.GetPoolKey(EndpointAddress address,Uri via)\ r \ n

at System.ServiceModel.Channels.CommunicationPool`2.TakeConnection(EndpointAddress地址,Uri via,TimeSpan超时,TKey&键)\ r \ n

at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)\ r \ n

at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)\ r \ n

在System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超时)\ r \ n

at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)\ r \ n

在System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超时)\ r \ n

at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel,TimeSpan timeout)\ r \ n

在System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout,CallOnceManager cascade)\ r \ n

at System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object [] outs,TimeSpan timeout)\ r \ n

at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime operation)\ r \ n

在System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)\ r \ n \ r \ n 在[0]处重新抛出异常:\ r \ n在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)\ r \ n \ n 在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 type)\ r \ n

at IAuthenticationService.AuthTempTokens(TokenSet标记,CAMSSystem systemId,String accountId,String ipAddress,String uniqueId)\ r \ n

在c:\ Source \ RiverTam \ Source \ Systems \ Web \ PMI \ PMI \ Default.aspx.cs中的login_Default.AuthenticateAndRedirect():第167行“

2 个答案:

答案 0 :(得分:0)

看起来您正在尝试使用命名管道绑定,并且不能在基于WinRT的应用程序中使用命名管道。

答案 1 :(得分:0)

因此IIS站点配置为模拟并且该用户没有权限!发现用户使用Process Monitor。毫不奇怪地删除以下行允许的东西工作,因为我的用户,管理员,权利就好了。

<system.web>    
    <identity impersonate="true" username="user" password="password" />
</system.web>