473,387 Members | 1,504 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,387 software developers and data experts.

unhandled exception after deployment

I recently wrote my first Vb.net application, or at least my first complex app since moving up from vb6. When run from the VS.NET IDE, the program shows no errors and runs fine. When the output exe is run(this is a windows application) on my development pc, the exe runs fine as well. When the application is deployed on any other machine with .net framework 1.1, it generates an unhandled exception prioir to loading anything.
The setup project seems to be including all the proper dependencies and I have tried both debug and release configurations. I am running the exe from a local drive, so I do not think it is a security exception. What is causing this exception?
Nov 20 '05 #1
5 2049
If it uses ADO.NET you need to install MDAC on the machine.

HTH,
Greg

"Dave Stewart" <Da*********@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
I recently wrote my first Vb.net application, or at least my first complex
app since moving up from vb6. When run from the VS.NET IDE, the program
shows no errors and runs fine. When the output exe is run(this is a windows
application) on my development pc, the exe runs fine as well. When the
application is deployed on any other machine with .net framework 1.1, it
generates an unhandled exception prioir to loading anything.
The setup project seems to be including all the proper dependencies and I
have tried both debug and release configurations. I am running the exe
from a local drive, so I do not think it is a security exception. What is
causing this exception?

Nov 20 '05 #2
http://support.microsoft.com/default...Product=adonet

This seems to imply the exception is clearly spelled out. I seem to recall
learning the hard way that isn't always the case.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:u4**************@TK2MSFTNGP10.phx.gbl...
If it uses ADO.NET you need to install MDAC on the machine.

HTH,
Greg

"Dave Stewart" <Da*********@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
I recently wrote my first Vb.net application, or at least my first complex
app since moving up from vb6. When run from the VS.NET IDE, the program
shows no errors and runs fine. When the output exe is run(this is a
windows application) on my development pc, the exe runs fine as well. When
the application is deployed on any other machine with .net framework 1.1,
it generates an unhandled exception prioir to loading anything.
The setup project seems to be including all the proper dependencies and I
have tried both debug and release configurations. I am running the exe
from a local drive, so I do not think it is a security exception. What is
causing this exception?


Nov 20 '05 #3
My app does not use ado.net.

"Greg Burns" wrote:
http://support.microsoft.com/default...Product=adonet

This seems to imply the exception is clearly spelled out. I seem to recall
learning the hard way that isn't always the case.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:u4**************@TK2MSFTNGP10.phx.gbl...
If it uses ADO.NET you need to install MDAC on the machine.

HTH,
Greg

"Dave Stewart" <Da*********@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
I recently wrote my first Vb.net application, or at least my first complex
app since moving up from vb6. When run from the VS.NET IDE, the program
shows no errors and runs fine. When the output exe is run(this is a
windows application) on my development pc, the exe runs fine as well. When
the application is deployed on any other machine with .net framework 1.1,
it generates an unhandled exception prioir to loading anything.
The setup project seems to be including all the proper dependencies and I
have tried both debug and release configurations. I am running the exe
from a local drive, so I do not think it is a security exception. What is
causing this exception?



Nov 20 '05 #4
Hmmm...

Try using the code below to start your app. Maybe it will give you an idea
of what is going wrong.

Greg
Option Strict On

Imports System.Security

Module Module1

'The main entry point for the application.
<STAThread()> Public Sub Main()

Try
'Demand full trust permissions
Dim fullTrust As New
PermissionSet(Permissions.PermissionState.Unrestri cted)
fullTrust.Demand()

SubMain()
Catch ex As SecurityException
' Report that permissions were not full trust
MessageBox.Show("This application requires full-trust security
permissions to execute.")

Catch ex As Exception
HandleUnhandledException(ex)
End Try

End Sub
Private Sub SubMain()

' // Setup unhandled exception handlers
AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf
OnUnhandledException

AddHandler Application.ThreadException, AddressOf
OnGuiUnhandedException

Application.Run(New Main)

End Sub

'// CLR unhandled exception
Private Sub OnUnhandledException(ByVal sender As Object, ByVal e As
UnhandledExceptionEventArgs)
HandleUnhandledException(e.ExceptionObject)
End Sub

' // Windows Forms unhandled exception
Private Sub OnGuiUnhandedException(ByVal sender As Object, ByVal e As
System.Threading.ThreadExceptionEventArgs)
HandleUnhandledException(e.Exception)
End Sub
Private Sub HandleUnhandledException(ByVal o As Object)
Dim e As Exception = CType(o, Exception)

MessageBox.Show("An unhandled exception occurred and the application
is shutting down.")
MessageBox.Show(e.ToString)

Environment.Exit(1) ' // Shutting down

End Sub
End Module
"Dave Stewart" <Da*********@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.com...
My app does not use ado.net.

"Greg Burns" wrote:
http://support.microsoft.com/default...Product=adonet

This seems to imply the exception is clearly spelled out. I seem to
recall
learning the hard way that isn't always the case.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:u4**************@TK2MSFTNGP10.phx.gbl...
> If it uses ADO.NET you need to install MDAC on the machine.
>
> HTH,
> Greg
>
> "Dave Stewart" <Da*********@discussions.microsoft.com> wrote in message
> news:A5**********************************@microsof t.com...
>>I recently wrote my first Vb.net application, or at least my first
>>complex
>>app since moving up from vb6. When run from the VS.NET IDE, the program
>>shows no errors and runs fine. When the output exe is run(this is a
>>windows application) on my development pc, the exe runs fine as well.
>>When
>>the application is deployed on any other machine with .net framework
>>1.1,
>>it generates an unhandled exception prioir to loading anything.
>> The setup project seems to be including all the proper dependencies
>> and I
>> have tried both debug and release configurations. I am running the exe
>> from a local drive, so I do not think it is a security exception. What
>> is
>> causing this exception?
>
>


Nov 20 '05 #5
Hi Dave,

One of the improvements of AdoNet is that it should not give this always
been anoying errors.

Therefore most regulars in this newsgroup use ADONET and when there comes a
question from someone who has problems with Ado in deployment, because he
persist in using that, I hope you understand it.

Cor

Nov 20 '05 #6

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

Similar topics

7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
3
by: Dave Stewart | last post by:
I recently wrote my first Vb.net application, or at least my first complex app since moving up from vb6. When run from the VS.NET IDE, the program shows no errors and runs fine. When the output exe...
5
by: Lucvdv | last post by:
Can someone explain why this code pops up a messagebox saying the ThreadAbortException wasn't handled? The first exception is reported only in the debug pane, as expected. The second (caused by...
5
by: Samuel R. Neff | last post by:
When you have an unhandled exception in vb.net how do you view the exception information in the debugger? In C# the debugger creates a local variable that points to the exception and you can...
0
by: Colmeister | last post by:
I recently read Jason Clark's excellent article on Unhandled Exceptions (http://msdn.microsoft.com/msdnmag/issues/04/06/NET/default.aspx) and have attempted to incorporate the features he talks...
0
by: Mike S | last post by:
I'm still looking into this problem, but to summarize: I wrote a very simple Windows Service in VB.NET, as part of a larger application. I created a deployment project for the application the...
0
by: martin1 | last post by:
Hi, All, when the window form application runs outside of VS.NET 2005, it gets Unhandled Exception error about Microsoft .NET Framework. The app runs production box from dev box, the .NET 2.0...
17
by: Zytan | last post by:
I am using: Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); But, my function is not run when an exception is thrown on another...
0
by: Pieter | last post by:
Hi, When using clickOnce for a VB.NET 2.0 application it installs fine on every computer, except one (a new one...). Every is isstalled, Framework, Mdac, .... The error in the log file is:...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.