.NET & Wacko web browser control

I have the Microsoft Web Browser control added to a form in a project, whenever I run the project in the IDE and open the form I get the following error:
"A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in system.windows.forms.dll.  Additional information: Unknown error."
Which then leads into:
"A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in system.windows.forms.dll.  Additional information: Marshaler restriction: Excessively long string."

If I double click the compiled EXE it works fine.

I have created a new blank project and done nothing other than add the Microsoft Web Browser control to the form and it does the same thing so I know it has nothing to do with my code.  And as I said, it only happens when I run inside the IDE, it is fine when compiled.
LVL 4
SkipFireAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
What .NET version do you have?

Bob
0
SkipFireAuthor Commented:
I'm using Visual Studio .NET 2003 so v1.1.4322, however I also have 2005 installed so I also have v2.xxxx.
0
Bob LearnedCommented:
Do you have access to another machine?  Can this be duplicated on another machine?  It appears to be a problem with the COM components for the Web Browser control, but I don't specifically know what the solution is, until we narrow down the problem.

Bob
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

SkipFireAuthor Commented:
I'll bring another machine in tomorrow morning and try it.
0
SkipFireAuthor Commented:
I am not getting the error on another machine.
0
Bob LearnedCommented:
Proof that this is something wrong the configuration or DLLs.  The easy part is over, now down to the hard part--finding a solution.

Bob
0
Bob LearnedCommented:
You could try reinstalling Internet Explorer.

Bob
0
SkipFireAuthor Commented:
But why would it behave differently when running in the IDE than running compiled on the same machine?
0
Bob LearnedCommented:
Ok, so I missed that one.  Did you try removing the WebBrowser references, and readding the control?

Bob
0
SkipFireAuthor Commented:
Yeah, and I created an entirely new project with only a web browser control and no other code and it shows the same behavior.  Errors in the IDE, but works fine when compiled.
0
Bob LearnedCommented:
Check this:

Go to Debug |Exceptions

Check that Common Language Runtime Exceptions are set to
Continue "When the exception is thrown". In these conditions, my Windows
form loads without reporting an exception.

Bob
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.