0
다른 회사에서 작성한 WCF 3.5 서비스가 있지만 소스 코드가 있습니다. 두 고객이 있는데, 첫째는 Silverlight (동일한 회사에서 작성)이고 두 번째 ASP 페이지는 저에게 만들어졌습니다. 내가 WCF 사이트에서 오류 다음 한가장하려고 할 때 WCF 사용자 ID 문제
:
using(((WindowsIdentity)HttpContext.Current.User.Identity).Impersonate())
{
SomeClass.SomeMethod();
}
ID는 거의 동일합니다. 실버 호출에 대한
정체성 : ASP 웹 호출에 대한
Name=Contoso\Administrator
Authenticated=True
Type=Negotiate
ImpersonationLevel=**Impersonation**
IsAnonymous=False
IsGuest=False
IsSystem=False
정체성 :
Name=Contoso\Administrator
Authenticated=True
Type=Negotiate
ImpersonationLevel=**Identification**
IsAnonymous=False
IsGuest=False
IsSystem=False
따라서 차이가 ImpresonationLevel 값입니다. 내가 어떻게 고칠 수 있니?
예외 :
System.IO.FileLoadException: Could not load file or assembly 'System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)
File name: 'System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' ---> System.Runtime.InteropServices.COMException (0x80070542): Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.OnAbort()
at System.ServiceModel.Channels.CommunicationObject.Abort()
at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.System.IDisposable.Dispose()
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.IDisposable.Dispose()
at Microsoft.ResourceManagement.Client.WsTransfer.WsTransferClient.Put(Message request)
at Microsoft.ResourceManagement.Client.WsTransfer.WsTransferClient.Put(PutRequest request)
at Microsoft.ResourceManagement.Client.DefaultClient.Put(RmResourceChanges transaction)
at SomeClass.SomeMethod(some_parames)