简体   繁体   中英

How to use native DLL in a deployed website (IIS 7)

I'm consuming a 32-bit native DLL from ac# web service. Everything works fine locally in VS with IIS express. However when I deployed the site to an IIS hosting provider (IIS 7) the calls to the DLL (using platform invoke) did not work (no error, it doesn't even return from the call and the web service is terminated abruptly). However, the client side is notified via PageMethod error function: "Unable to load DLL access is denied (exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

Since the provider IIS is running 64-bit mode, I asked them to change my process to 32-bit, however that didn't make any difference. Do I need to do anything special to use native DLLs on IIS 7? Do I have to register native modules with the server before they can be used? Any explanation for the weird behavior when the DLL is called?

Thanks

您可能已经搜索过,但似乎已经有人问过这个问题:请参阅此处的SO问题 ,但是归结为将dll放在正确的位置并设置PATH变量的原因。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM