下运行在此的Azure中运行我的C#应用程序没有发现,我需要使用互操作/的DllImport调用“IEGetProtectedModeCookie”在ieframe.dll的DllImport切入点互操作功能ieframe.dll天青
这里的签名:
[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);
我添加ieframe.dll到我的项目的bin目录,我不得不参考SHDOCVW生成调试或零售Interop.S HDocVw.dll文件在我的obj目录中。
当我测试这个在我的dev的盒子,一切正常,但是当我部署到Azure中,我得到以下运行时错误:
System.EntryPointNotFoundException: Unable to find an entry point named 'IEGetProtectedModeCookie' in DLL 'ieframe.dll'. 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...
缺少什么我在这里?
我不知道在Azure上的默认浏览器是什么(如果,事实上,有*任何*默认浏览器的话)。然而,我认为,如果我在其bin目录中包含ieframe.dll和解决方案,并且还引用了ieframe.dll(实际上最终生成Interop.SHDocVw.dll),那么我将拥有所有二进制位在Azure服务器上是必需的。 –
为什么你要在Azure上调用IEGetProtectedModeCookie?看起来很奇怪。 –
我们的应用程序有一个在IFRAME中托管的小部件(相同的域)。对于IE8,服务器读取站点和小部件之间共享的cookie的唯一方法是使用IEGetProtectedModeCookie。如果还有其他方法可以做到这一点,我就会全神贯注。但基于我们的研究,没有其他方法可以做到这一点。当使用'localhost'测试它时,它可以工作;没有,cookie对服务器是不可见的。 –