2012-08-14 4 views
0

webHttpEndpoint 끝점을 사용하여 REST 인터페이스를 구현하는 WCF가 있습니다. WCF 서비스 >> C# 라이브러리 >> PInvoke를 >> C++ 라이브러리 모든 것이 예상대로 작동 비주얼 스튜디오에서 실행WCF PInvoke가 "액세스가 거부되었습니다."를 생성합니다.

:

콜 스택이 같은 것입니다. IIS에 배포하면 다음 오류가 발생합니다.

System.DllNotFoundException: Unable to load DLL 'native.dll': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at ... 

모든 .dll 파일은 \ bin 폴더에 있습니다.

정확히 같은 C# 라이브러리/PInvoke 체인은 동일한 서버의 Web Forms ASP.NET 사이트에서 작동합니다. WCF 환경에서 뭔가 특별한

<system.web> 
    <trust level="Full"/> 
    <compilation debug="true" targetFramework="4.0" /> 
    <customErrors mode="Off"/> 
</system.web> 

<system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"> 
    <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
    </modules> 
</system.webServer> 

<system.serviceModel> 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/> 
    <standardEndpoints> 
    <webHttpEndpoint> 
     <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true"/> 
    </webHttpEndpoint> 
    </standardEndpoints> 
</system.serviceModel> 

가 아니면이 찾을 수있는 기본 DLL에 필요한 특정 권한입니다 : 여기

는 WCF 서비스에 대한 Web.config이다/접근?

는 추가 정보 제거 native.dll에서/빈은 생산 :

System.DllNotFoundException: Unable to load DLL 'util32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) 

그래서 실제로 파일을 찾는 것.

답변

0

이것은 파일에 대한 간단한 사용 권한 문제로 발생합니다.

+1

그러면 사용자의 응답에 체크 표시를 할 수 있습니다. –

+1

다른 사람들에게 도움이 될만한 세부 사항이 부족하기 때문에 이것을 답으로 분류하지 않을 것입니다. –

관련 문제