473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Interop.SHDocVw: Unspecified error

I have written a VB .Net Console application which uses
SHDocVw.InternetExplorer(). This works perfectly when run
in the foreground but I need to schedule this as a
background job. When ever I run it as a scheduled tasks I
get an Unspecified Error exception when I call the .Busy
or the .Document properties.

Can anyone please help me with this?
Nov 22 '05 #1
3 3269
Hello,

I tested following code:

Imports System.Threading

Module Module1

Sub Main()

Dim myie As New SHDocVw.InternetExplorer

myie.Navigate2("www.google.com")
Console.Write("opening")
While myie.Busy

Thread.CurrentThread.Sleep(100)
Console.Write(".")

End While

Console.WriteLine("")

Console.Write(myie.Document)

End Sub

End Module

And the add the assembly as a scheduled task, it was run correctly, and I
haven't found the problem. I suggest you may check if the scheduled task
was executed under a proper account, for example, your current logon
account. Addtionally, you may add some Try...Catch statement in your code
and to see if you can catch the detailed exception information within it.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 22 '05 #2
It works as a scheduled job as long as it is scheduled as
the current foreground user. If you schedule it as a
valid user that is not the current logged on user then it
fails with Unspecified Error.

I made the user an administrator to ensure there were no
permissions problems.
-----Original Message-----
Hello,

I tested following code:

Imports System.Threading

Module Module1

Sub Main()

Dim myie As New SHDocVw.InternetExplorer

myie.Navigate2("www.google.com")
Console.Write("opening")
While myie.Busy

Thread.CurrentThread.Sleep(100)
Console.Write(".")

End While

Console.WriteLine("")

Console.Write(myie.Document)

End Sub

End Module

And the add the assembly as a scheduled task, it was run correctly, and Ihaven't found the problem. I suggest you may check if the scheduled taskwas executed under a proper account, for example, your current logonaccount. Addtionally, you may add some Try...Catch statement in your codeand to see if you can catch the detailed exception information within it.
Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers norights.)

.

Nov 22 '05 #3
Hello,

I also found the problem with a different account. SHDocVw.InternetExplorer
is a component with UI. When the application was run under a different
account, there will be a access denied error because a different account
has no permission to access current logon account's desktop and use
SHDocVw.InternetExplorer component. If you need to access some web page is
the scheduled task application, I suggest you may try HttpWebRequest class
in .NET framework.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ian Macro | last post by:
I have written a VB .Net Console application which uses SHDocVw.InternetExplorer(). This works perfectly when run in the foreground but I need to schedule this as a background job. When ever I...
1
by: Jason Garland \(Secure Access Pty Ltd\) | last post by:
Hi I am trying to work out how to either create a strong name wrapper for AxInterop.SHDocVw.dll I have researched the following : - 'Wrapper Assembly Key' but this is apparently for c#...
3
by: Wiktor Zychla | last post by:
I have a problem I cannot solve. My application hosts IE activex control. I follow the standard procedure: I just aximp shdocvw.dll. Note that this gives you two files: axshdocvw.dll and...
3
by: andrewcw | last post by:
I have code like this: SHDocVw.WebBrowserClass webCtl= new SHDocVw.WebBrowserClass(); object theURLobj; string theURL="overview.htm"; theURLobj= (object)theURL; object nullObj = null;...
1
by: Shiro | last post by:
Hi I have read the various postings relating to Interop strong name signing and cannot find an example similar to mine. I have stringly named my AxInterops/Interops and they all work just...
4
by: RM | last post by:
Had VS .Net 2002 installed on W2k Server SP3 and supported a number of web sites. Installed VS .Net 2003 on Friday and now all web sites using .Net & MS ACCESS get this strange error upon open. ...
0
by: Afigels | last post by:
I have an asp.net application that has references to MSHTML and SHDocVw to automate InternetExplorer from asp.net page. It works fine at the originating PC where the page was coded and compiled. ...
7
by: Mark | last post by:
I am trying to take a working VB.NET program (the SHOW HTML program from the Halvorson book) and pass in parameter values which are used to build the URL that IE looks up. The original program...
3
by: Jay A. Moritz | last post by:
I have an application that loads IE and iterates through web pages to retrieve information from the page then activates specific controls to retrieve the next page and iterate through that page for...
0
by: raghavendra2007 | last post by:
Hi, I am developing a screen reader application in C#. So, I hooked the system using SetWindowsHookEx Win32 API. Now I need to access the information from Internet Explorer. So, I am using...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.