You can try to write another small app to load your original application in
a domain.
The code of that app looks like:
Imports System.Security
Imports System.Security.Permissions
Imports System.Security.Policy
Sub Main(ByVal CmdArgs() As String)
If CmdArgs.Length <> 2 Then Return
Dim AppPath As String = CmdArgs(0)
Dim CodeBase As String = CmdArgs(1)
Dim e As New Evidence()
e.AddHost(New Url(CodeBase))
e.AddHost(Zone.CreateFromUrl(CodeBase))
e.AddHost(Site.CreateFromUrl(CodeBase))
Dim ad As AppDomain = AppDomain.CreateDomain("TestHost")
ad.ExecuteAssembly(AppPath, e)
AppDomain.Unload(ad)
End Sub
==
Lifeng
MS VB