如何调用非托管code在ASP.NET网站和IIS主机呢? [英] How to call unmanaged code in ASP.NET website and host it in IIS?

查看:114
本文介绍了如何调用非托管code在ASP.NET网站和IIS主机呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个C ++ DLL。它工作正常,并没有工作。

I have created a C++ dll. It works fine and does the job.

我已经创建了asp.net调用C ++中的dll方法的方法。 DLL的路径是绝对的。它工作正常了。

I have created methods in asp.net that call the methods in C++ dll. DLL path is absolute. It works fine too.

然后我公布在网站上的一个文件夹并托管在网站上IIS。我得到一个错误信息

I then published the website onto a folder and hosted the website on IIS. I get an error message

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

请建议什么,我需要做的就是它的工作。

Please suggest what I need to do to get it to work.

推荐答案

你确认这是运行你的应用程序的应用程序池的身份验证的用户具有适当的权限读取和执行DLL?

Did you confirm that the authenticated user of the application pool which is running your app has the appropriate permissions to read and execute the DLL?

尝试添加权限谁是竞选IIS7的应用程序池的用户。对于IIS6,如果您使用的是匿名身份验证试图给予同意后配置在Web站点设置IIS匿名用户。
见<一href=\"http://stackoverflow.com/questions/154735/understanding-iis6-permissions-acl-and-identity-how-can-i-restrict-access\">here对于IIS6 和这里IIS7

Try adding permissions for the user who is running the application pool for IIS7. For IIS6, if you are using anonymous authentication trying giving permission to the IIS anonymous user as configured in your Web Site settings. See here for IIS6 and here for IIS7.

这篇关于如何调用非托管code在ASP.NET网站和IIS主机呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆