470,569 Members | 2,188 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,569 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.


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

Dim adevidence As New
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

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
End Try

Dts.TaskResult = Dts.Results.Success
End Sub

Jun 27 '07 #1
0 859

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
By using this site, you agree to our Privacy Policy and Terms of Use.