I have developed a web application which is using the WatiN to open an IE instants. its working fine in development mode(without deploy running from VS), but once it deployed using IIS it not working and giving an error:
An unhandled exception occurred and the process was terminated. Application ID: /LM/W3SVC/5/ROOT Process ID: 23176 Exception: System.Runtime.InteropServices.COMException Message: This function is not supported on this system. (Exception from HRESULT: 0x80070078) StackTrace: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at WatiN.Core.Native.InternetExplorer.WinInet.ForEachCacheGroup(CacheGroupAction action) at WatiN.Core.Native.InternetExplorer.WinInet.ClearCookiesCommand.Run() at WatiN.Core.IE.ClearCookies() at StandUpChecksTool.Automation.AtlanticStandUpChecks.GetBrowser() at StandUpChecksTool.Automation.AtlanticStandUpChecks.ExecuteTest(TestElement testElement) at StandUpChecksTool.Automation.AtlanticStandUpChecks.ExecuteChecks() at StandUpChecksTool.Automation.StandUpChecks.ExecuteStandUpChecks(StandupChecksModel checkModel) at StandUpChecksTool.Controllers.StandUpChecksController.<>c__DisplayClass5_0.b__0() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
code that I am using to create IE instants is:
protected override IE GetBrowser()
{
IE ie = new IE();
ie.ClearCookies();
ie.ClearCache();
ie.BringToFront();
ie.ShowWindow(NativeMethods.WindowShowStyle.Maximize);
return ie;
}
I am using:
User contributions licensed under CC BY-SA 3.0