System.InvalidOperationException error

zainhansrod

New member
Joined
Nov 12, 2009
Messages
4
Programming Experience
Beginner
Hi,

I have designed a application in VB.net using the MS Office spreadsheet component.

When launching the app on the client PC it gives a 'Windows has encountered a problem and needs to close' error, when clicked on Debug the error says 'An Unhandled exception occured ('System.InvalidOperationException') in 'ApplicationName.exe'.

The client PC runs WinXP SP3 with .NET framework 3.5 with SP1 and Office Web Components, also has Office 2007 installed.

When I remove the spreadsheet componenet from the app and redeploy the app to the client it works fine!

Please help.

Thanks.
 
If you don't already, turn Option Strict On and it should point out the piece of code throwing the error.

What installation and setup package did you use to get the app on the client machine?
 
tried another thing with option strict on, and got the ffg err on the client:

An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'AxInterop.OWC11, Version=11.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

I have installed Office 07 + office web components and SP, whats the problem here, how do i check?

the spreasheet component works perfectly from Excel VBA if I plot it there! strange!

i used the built in setup wizard from .net to package and deploy to the client.
 

Latest posts

Back
Top