相关疑难解决方法(0)

"即使平台相同,也试图加载格式不正确的程序"

我在64位系统上调用32位非托管DLL的函数.我得到的是:

BadImageFormatException:尝试加载格式不正确的程序.(HRESULT异常:0x8007000B)

起初,我将我的项目设置为Any CPU平台,因此我将它们都更改为x86,但此错误仍在发生.这真的是我所知道的唯一解决方案.

DLL没有损坏或任何东西,因为我可以将它们与其他程序一起使用(我没有源代码).我想也许它没有找到依赖,但我检查了,他们都在那里.另外,DllNotFoundException在这种情况下不会抛出一个吗?

我还可以做些什么?在您说"使用64位非托管DLL"之前,让我指出没有一个.;)

.net 64-bit pinvoke 32-bit badimageformatexception

448
推荐指数
11
解决办法
46万
查看次数

System.Runtime.InteropServices.COMException功能不正确.(HRESULT异常:0x80070001)

我在ASP.net中有一个Asynchronus IHttpHandler,我在ELMAH捕获中看到这个异常错误.

Windows Server 2008 R2 Web Edition IIS 7.5 ASP.NET .NET 4.0运行时在站点上运行HTTP.

谁能对这一个有所了解?谷歌列出了2008年左右的一些结果,关于.NET 2.0中关于在请求体的Read()函数期间断开HTTP的错误.

堆栈跟踪

System.Web.HttpException (0x80004005): An error occurred while communicating with the remote host. The error code is 0x80070001. ---> System.Runtime.InteropServices.COMException (0x80070001): Incorrect function. (Exception from HRESULT: 0x80070001)

Server stack trace: 
    at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
    at System.Web.Hosting.IIS7WorkerRequest.ReadEntityCoreSync(Byte[] buffer, Int32 offset, Int32 size)
    at System.Web.HttpRequest.GetEntireRawContent()
    at System.Web.HttpRequest.get_InputStream()
    at MyHandler.ProcessRequest(HttpContext context)
    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] …
Run Code Online (Sandbox Code Playgroud)

.net asp.net iis exception

10
推荐指数
1
解决办法
1万
查看次数