468,306 Members | 1,197 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Loading from separate assembly

I've got this code which is running from an SSIS script component, it
fails with a FileIOPermission error when making a call to
CreateInstanceFromAndUnwrap, any help would be much appreciated.

thanks

Hoots.
Public Sub Main()
'
' Add your code here
'
Dim l As IList

Try
Dim adevidence As New
Evidence(AppDomain.CurrentDomain.Evidence)
Dim subDomain As AppDomain =
AppDomain.CreateDomain("LiliUtils", adevidence, "D:\Development
\LiliImport\LiliUtils\bin\Debug\", "D:\Development\LiliImport\LiliUtils
\bin\Debug\", False)
Dim fp As FileIOPermission = New
FileIOPermission(FileIOPermissionAccess.AllAccess, "D:\Development
\LiliImport\LiliUtils\bin\Debug\")
fp.Assert()

Dim cAccessor As Object =
subDomain.CreateInstanceFromAndUnwrap("D:\Developm ent\LiliImport
\LiliUtils\bin\Debug\LiliUtils.dll", "LiliUtils.Data.cAccessor")

l = cAccessor.getActiveList()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical +
MsgBoxStyle.OkOnly, "Error")
Dts.TaskResult = Dts.Results.Failure
Return
End Try

Dts.TaskResult = Dts.Results.Success
End Sub

Jun 27 '07 #1
0 827

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Mike Krueger | last post: by
reply views Thread by Philip | last post: by
6 posts views Thread by Pete Davis | last post: by
4 posts views Thread by BrianS | last post: by
4 posts views Thread by =?Utf-8?B?SmFu?= | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.