|
-
Aug 31st, 2005, 01:17 AM
#1
Thread Starter
New Member
LoadFrom() Hell
Hi All, I have a .dll file that I have mapped to with a virtual directory so it can be referenced at (http://Localhost/WEBDEP/EX.dll). I than created a stub app that I based off of the "Death of the Browser doco" as follows:
Try
'Download the assembly from a web server over HTTP
Dim sLocation As String
sLocation = _
"http://Localhost/WEBDEP/EX.dll"
Dim formAsm As [Assembly] = [Assembly].LoadFrom(sLocation)
'Get the Form from the assembly
Dim formtype As Type = formAsm.GetType("EX.Form1")
'Create an instance of the Form
Dim FormObj As Object
FormObj = Activator.CreateInstance(formtype)
'Cast it to a Form object to enable early binding and show the form
Dim Form1 As Form = CType(FormObj, Form)
Form1.Show()
Catch exc As Exception
MsgBox(exc.ToString)
End Try
=================================
When I run this I receive an error when it hits the following line:
Dim formAsm As [Assembly] = [Assembly].LoadFrom(sLocation)
The error is "File or assembly name EX.dll, or one of its dependencies, was not found."
Has anyone came across this problem before? Or can anyone give me any help at all? I have been banging my head against this one for quite a few hours and any help would sooth this headache that I have got.
Thanks in advance
-
Aug 31st, 2005, 01:26 AM
#2
Re: LoadFrom() Hell
New territory, but shouldn't you be working with a local copy of the DLL, instead of using it over http? I think that's the entire problem.
-
Aug 31st, 2005, 10:41 PM
#3
Thread Starter
New Member
Re: LoadFrom() Hell
Im implementing internet deployment so therefore the dll must be accessed through the net.
-
Sep 1st, 2005, 03:15 AM
#4
Fanatic Member
Re: LoadFrom() Hell
Maybe it's having a problem accessing the dll directly. Maybe you can try downloading it to the hard-disk first and then accessing it from there?
I guess this is inefficient though, especially if the dll is quite large. (Although if it's external, you'll be still having to download it, technically, so there won't be any difference in speed).
Hopefully someone else can help, but there's my suggestion if you can't do anything else.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|