简体   繁体   English

在Azure下运行的ieframe.dll中找不到Interop函数的DllImport入口点

[英]DllImport entry point for Interop function not found in ieframe.dll running under Azure

In my C# app that's running under Azure, I need to use Interop / DllImport to call 'IEGetProtectedModeCookie' in ieframe.dll 在运行于Azure下的C#应用​​程序中,我需要使用Interop / DllImport在ieframe.dll中调用“ IEGetProtectedModeCookie”

Here's the signature: 这是签名:

  [DllImport("ieframe.dll", CharSet = CharSet.Unicode, EntryPoint = "IEGetProtectedModeCookie", SetLastError = true)]
  public static extern int IEGetProtectedModeCookie(String url, String cookieName, StringBuilder cookieData, ref int size, uint flag);

I've added ieframe.dll to my project's bin directory, and I have a reference to SHDocVw that generates the Debug or Retail Interop.SHDocVw.dll file in my obj directory. 我已经将ieframe.dll添加到了项目的bin目录中,并且引用了在我的obj目录中生成Debug或Retail Interop.SHDocVw.dll文件的SHDocVw

When I test this on my dev box, everything works fine, but when I deploy to Azure, I'm getting the following runtime error: 当我在开发箱上对此进行测试时,一切正常,但是当我部署到Azure时,出现以下运行时错误:

System.EntryPointNotFoundException: Unable to find an entry point named 'IEGetProtectedModeCookie' in DLL 'ieframe.dll'. System.EntryPointNotFoundException:无法在DLL“ ieframe.dll”中找到名为“ IEGetProtectedModeCookie”的入口点。 at Predicere.Utilities.LoginUtils.IEGetProtectedModeCookie(String url, String cookieName, StringBuilder cookieData, Int32& size, UInt32 flag) at Predicere.Utilities.LoginUtils.GetProtectedModeIECookieValue(String cookieName, Boolean isFacebookPage) in blah... 在Predicere.Utilities.LoginUtils.GetProtectedModeIECookieValue(String cookieName,Boolean isFacebookPage)在Predicere.Utilities.LoginUtils.IEGetProtectedModeCookie(String url,字符串cookieName,StringBuilder cookieData,Int32&大小,UInt32标志)

What am I missing here? 我在这里想念什么?

IEGetProtectedModeCookie was introduced with IE8. IEGetProtectedModeCookie与IE8一起引入。 Could it be that only IE6 or IE7 is installed? 可能仅安装了IE6或IE7吗?

So, we finally found a solution using feedback from SO on another separate but related issue. 因此,我们终于找到了一个解决方案,该解决方案使用了来自SO的反馈来解决另一个单独但相关的问题。

The problem is that IEGetProtectedModeCookie was not introduced until IE8, but the baseline Azure web instance is based on IE7. 问题在于,直到IE8才引入IEGetProtectedModeCookie,但是基准Azure Web实例基于IE7。

The OS flavor is controlled by the osFamily attrib in : 操作系统风格由osFamily attrib控制:

<ServiceConfiguration serviceName="Foobar" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="1" osVersion="*">

This setting installs Windows Server 2008 SP2, which is based on IE7. 此设置将安装基于IE7的Windows Server 2008 SP2。

If we modify the osFamily attrib as follows, we end up with Windows Server 2008 R2, which is based on IE8: 如果我们按如下方式修改osFamily属性,则最终会得到基于IE8的Windows Server 2008 R2:

<ServiceConfiguration serviceName="Foobar" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="2" osVersion="*">

More details can be found in this blog entry, especially if you want to upgrade you Azure instance to use IE9 (which, it turns out, is non-trivial). 可以在此博客条目中找到更多详细信息,特别是如果您想升级Azure实例以使用IE9(事实证明,这是很简单的)。

http://sajojacob.com/blog/2011/03/startup-tasks-elevated-privileges-vm-role/ http://sajojacob.com/blog/2011/03/startup-tasks-elevated-privileges-vm-role/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 引用SharpSVN时,IEFrame.DLL和SHLWAPI.DLL中缺少外部函数 - Missing External Function in IEFrame.DLL and SHLWAPI.DLL when referencing SharpSVN 在安装使用watin构建的应用程序时出现“ ieframe.dll无法注册”的问题? - Getting “ieframe.dll failed to register” while installing an application built using watin? Project使用IEFrame.dll,因为浏览器无法在Windows 10上运行,有解决方案吗? - Project uses IEFrame.dll as browser won't work on Windows 10, any solution? RemoteWebDriver和IE8挂起下载图片res://ieframe.dll/background_gradient_red.jpg - RemoteWebDriver & IE8 hangs Downloading picture res://ieframe.dll/background_gradient_red.jpg 在DLL导入中找不到入口点 - Entry point not found on DLL import 如何将Azure函数的入口点放在.NET DLL中? - How to put the entry point of an Azure Function inside a .NET DLL? “无法在 DLL 'SQLite.Interop.dll' 中找到名为 'sqlite3_open_interop' 的入口点。” - "Unable to find an entry point named 'sqlite3_open_interop' in DLL 'SQLite.Interop.dll'." 困惑的DLL入口点(入口点未找到异常) - Confused over DLL entry points (entry point not found exception) delphi使用指定的入口点导入dll函数 - delphi Import dll function with specified entry point SQLite更新后:无法在DLL“SQLite.Interop.dll”中找到名为“sqlite3_changes_interop”的入口点 - After SQLite update: Unable to find an entry point named 'sqlite3_changes_interop' in DLL 'SQLite.Interop.dll'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM