473,657 Members | 2,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Security problem w/ VB.Net and Word/Excel on Vista 32bit

Hi, I have a VB.Net application that I have recently upgraded from
Visual Studio 2003 to Visual Studio 2005. The VB.Net app accesses
Word and Excel. When I run the newly compiled VB.Net app on the
Windows XP Pro system the app can interact with Word and Excel just
fine. I'm pretty certain I have the correct Microsoft Word 11.0
Object Library and Microsoft Excel 11.0 Object Library references.
All of my library references have Local Copy set to true.

When I run the app on a Vista 32bit system I get the following error.

Source: Microsoft.Offic e.Interop.Word
System.InvalidC astException {"Unable to cast COM object of type
'Microsoft.Offi ce.Interop.Word .ApplicationCla ss' to interface type
'Microsoft.Offi ce.Interop.Word ._Application'. This operation failed
because the QueryInterface call on the COM component for the interface
with IID '{00020970-0000-0000-C000-000000000046}' failed due to the
following error: could not be found. (Exception from HRESULT:
0x80030002 (STG_E_FILENOTF OUND))."} System.InvalidC astException

Now for the odd part. On the Vista system when I right-click on the
new app .exe and select 'Run as administrator' the app runs without
error and can interact with Word and Excel with no problem. When I
just run the app as myself (I am a member of the local administrators
group) I get the exception.

This seems like some sort of conflict with new security in Vista.
Anybody got any ideas?

Thanks,
John

Oct 17 '07 #1
2 5965

"John Heitmuller." <jo************ *@jrfcorp.netwr ote in message
news:11******** **************@ z24g2000prh.goo glegroups.com.. .
Hi, I have a VB.Net application that I have recently upgraded from
Visual Studio 2003 to Visual Studio 2005. The VB.Net app accesses
Word and Excel. When I run the newly compiled VB.Net app on the
Windows XP Pro system the app can interact with Word and Excel just
fine. I'm pretty certain I have the correct Microsoft Word 11.0
Object Library and Microsoft Excel 11.0 Object Library references.
All of my library references have Local Copy set to true.

When I run the app on a Vista 32bit system I get the following error.

Source: Microsoft.Offic e.Interop.Word
System.InvalidC astException {"Unable to cast COM object of type
'Microsoft.Offi ce.Interop.Word .ApplicationCla ss' to interface type
'Microsoft.Offi ce.Interop.Word ._Application'. This operation failed
because the QueryInterface call on the COM component for the interface
with IID '{00020970-0000-0000-C000-000000000046}' failed due to the
following error: could not be found. (Exception from HRESULT:
0x80030002 (STG_E_FILENOTF OUND))."} System.InvalidC astException

Now for the odd part. On the Vista system when I right-click on the
new app .exe and select 'Run as administrator' the app runs without
error and can interact with Word and Excel with no problem. When I
just run the app as myself (I am a member of the local administrators
group) I get the exception.

This seems like some sort of conflict with new security in Vista.
Anybody got any ideas?
It's called setting up a Vista UAC Manifest that an application/program will
use to present the proper credential such as Run As Administrator to Vista
so that Vista will allow the program to run with the proper credentials
needed.

Look it up and find out how to create a .Net solution that uses the Vista
UAC Manifest -- use Google.

Oct 18 '07 #2
Thanks.

Oct 18 '07 #3

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

Similar topics

5
1592
by: DavidGeorge | last post by:
I have made a fundamental error in design and ignored security until the end of the project. This is largely because the whole process was a steep learning curve (helped enormously by this group) and I didn't know when I started (and still don't really understand), how to implement security. I have an application in two parts: - the first part is used by a number of people on standalone laptops who collect information about patients. ...
9
2681
by: salad | last post by:
Due to an earlier posting I read in this newsgroup regarding Office 2007 beta, I downloaded it. After I DL'd it, I got an invitation from MS to get WinVista. I am now wondering if, since both are betas, it is best to buy a new computer? My current computer setup is a Pentium 4, 1 gig memory, 2.66 ghz, 60-80 gig disk drive. MS's requirements for a WinVista computer is A modern processor (800mz)
2
1409
by: =?Utf-8?B?TW9vZHlCbHVl?= | last post by:
Hi - I installed Word 2002 from my Small Business Enterprise disc which was for XP. Excel and Outlook are fine, but I cannot open or save documents in Word format, they default to Wordpad and hence look illegible. Can anybody help with a solution please?
4
2663
by: Dking | last post by:
Just reciently using comp. with Vista. Worked fine for about a month, now i cant open Word, Excel or Explorer. The word and excel are 2007 versions. any help would be appreciated. Thanks in advance. DKing
0
1282
by: John Heitmuller. | last post by:
Hi, I have a VB.Net application that I have recently upgraded from Visual Studio 2003 to Visual Studio 2005. The VB.Net app accesses Word and Excel. When I run the newly compiled VB.Net app on the Windows XP Pro system the app can interact with Word and Excel just fine. I'm pretty certain I have the correct Microsoft Word 11.0 Object Library and Microsoft Excel 11.0 Object Library references. When I run the app on a Vista 32bit system...
0
1531
by: =?Utf-8?B?bWo=?= | last post by:
Hello, I am planning on developing a windows service in C# using VS 2005 on a Vista 32bit operating system. I am going to be deploying this windows service on a 2003 server in our Production environment. My question, does anyone know in advance if the Windows Service will run on 2003 server? Or should I just develop the C# windows service using VS 2003 on an XP operating system since I know it will run / work on 2003 server when I...
7
1459
by: Nicolas Hinze | last post by:
Dear all, I installed Vista SP1 on my Vista x64 Enterprise machine. Now my Visual Basic 2005 (.Net 2) does not behave correctly. It appears that 'for loops' have a problem of some sort. For example, I have a 'for loop' to fill a dropdown control with numbers from x to z. Now that dropdown stays empty. This behavior did not happen before SP1. I do not get any error messages. Everything works perfectly on WinXP. Anyone has any idea if...
2
2012
by: Tam | last post by:
Im running into problems installing either VS 05 or 08 on a Vista Premium 64 bit machine and, ahem, it isnt going sweetly. When installing i get an "Error 1935.An error occured during the installation of assembly component" when installing either 05 or 08. Vista Premium comes with .NET Framework 2.0 and Framework 3.5 which are both present. It also has Framerwork 1.0 SP3 Developer. As an
1
4490
by: Cupric | last post by:
I have a python script that runs fine from the command line or from within IDLE, but doesn't work through the Vista Task Scheduler. The script downloads some csv files and then uses pywin32 to combine the csv files into a single document. When I run it through the task scheduler, it downloads the csv files, but then doesn't seem to launch excel. I can't figure out what is wrong or how to add enough logging to tell. I'm using Python...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8608
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6172
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5633
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.