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?
>
>