locked
Problem with Windows Service with running under Local system with Interop.SHDocVw.dll ieframe.dll throwing res://ieframe.dll/dnserror.htm#

    General discussion

  • I am doing some screen scrapping from a website for that i have used Microsoft.mshtml and Microsoft Internet Controls

    In Windows form application run fine but after bundling my application in windows service I am getting following error res://ieframe.dll/dnserror.htm# at

    wb.Navigate(ConfigurationManager.AppSettings.Get("LoginUrl"), ref o, ref o, ref o, ref o);

    Same Windows Service Run fine if it runs under User Account

    But through above error when runs under Local system account



    Kamran Shahid Principle Engineer Development (MCP,MCAD,MCSD.NET,MCTS,MCPD.net[web])


    Tuesday, December 04, 2012 10:20 AM

All replies

  • Hi Kamran,

      Welcome to MSDN Forum Support.

      What you mentioned is lack of codes,please provide more information about your post so that we can point out your key point if your code actually has something wrong.

      Sincerely,

      Jason Wang


    Jason Wang [MSFT]
    MSDN Community Support | Feedback to us

    Friday, December 07, 2012 4:19 AM
  • It's a .net 2.0 solution

    using SHDocVw; using mshtml; InternetExplorer _ie; IWebBrowserApp _wb; object o = Missing.Value; _ie = new InternetExplorer(); _wb = _ie; _log.LogMessages("Step 1"); _wb.Navigate(ConfigurationManager.AppSettings.Get("LoginUrl"), ref o, ref o, ref o, ref o); int iTryCountFirstPageView = 0; do { iTryCountFirstPageView++; Thread.Sleep(iDelayForPageReady); if(iTryCountFirstPageView > 20)//3* 20 { _log.LogErros(string.Format("0. problem in loading login page {0}", _ie.StatusText)); return; } } while (_ie.Busy /*|| ie.ReadyState != SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE*/); HTMLDocument myDoc = _ie.Document as HTMLDocument; if (myDoc != null) { if (myDoc.title.Contains("Internet Explorer cannot display the webpage")) { _log.LogErros(string.Format("1. problem in loading page {0}", myDoc.url)); UpdateRecordsInDb(lst); return; }

    else

    {

    .............

    } }


    I have tried with 
    1. Local System [got error res://ieframe.dll/dnserror.htm#mypageaddress.] 
    2. Local service [got error Retrieving the COM class factory for component with CLSID {0002DF01-0000-0000-C000-000000000046} failed due to the following error: 80070005.] 
    3. Network Service [got error Retrieving the COM class factory for component with CLSID {0002DF01-0000-0000-C000-000000000046} failed due to the following error: 80070005.] 
    4. User account [Run successfully.]


    Friday, December 07, 2012 5:19 AM