469,917 Members | 1,701 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

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 1867
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Chuck Hartman | last post: by
5 posts views Thread by Lucvdv | last post: by
reply views Thread by Colmeister | last post: by
reply views Thread by Mike S | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.