all groups > dotnet distributed apps > december 2003 >
You're in the

dotnet distributed apps

group:

HTTP download of assemblies


HTTP download of assemblies jeff Grundy
12/18/2003 2:21:47 PM
dotnet distributed apps:
I am trying to instantiate a windows form from a webform.
I have a command button on my web form with the following
code in the on_click.

Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click

Dim frmTemp As Form
Dim SimpAsm As [Assembly]

SimpAsm = [Assembly].LoadFrom
("http://jgrundy1/autodeploy/ClassLibrary1.dll")
frmTemp = CType(SimpAsm.CreateInstance
("ClassLibrary1.form1"), Form)
frmTemp.Show()

End Sub

When the 'loadfrom' tries to execute I get the following
error:

"HTTP download of assemblies has been disabled for this
appdomain."

How do I enable download of assemblies?


RE: HTTP download of assemblies lukezhan NO[at]SPAM online.microsoft.com
12/19/2003 3:41:59 AM
Hi Jeff,

Your code is in codebehind, and will be run on the web server. Normally,
ASP.NET server side code cannot have any user interface and cannot show a
window form yet.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
RE: HTTP download of assemblies Jeff Grundy
12/22/2003 8:52:41 AM
Yes Luke, you are right. The codebehind executes on the
server. I don't know what I was thinking.

If I use this on the html side and it works like
expected. "<A
HREF="http://jgrundy1/AutoDeploy/FlatFileCleaner.exe">Flat
File Cleaner</A>"

I click the link and the app is started on the client.
Thanks

[quoted text, click to view]
AddThis Social Bookmark Button