?
Solved

enable HTTP download of assemblies

Posted on 2005-04-12
6
Medium Priority
?
701 Views
Last Modified: 2012-08-13
hi,

executing the following code

        Dim sampleAssembly As [Assembly]
        sampleAssembly = [Assembly].LoadFrom("http://localhost/asp.net/mcad/randomnumbergenerator/bin/RandomNumberGenerator.dll")

        Dim types As Type() = sampleAssembly.GetTypes()
        Dim oType As Type

        For Each oType In types
            Response.Write(oType.Name.ToString() & "<br>")
        Next


gives me the error

System.IO.FileLoadException: HTTP download of assemblies has been disabled for this appdomain.


I have the following configuration in my machine.config file

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="RandomNumberGenerator" publicKeyToken="7427fab1076a5262" />
        <codeBase version="1.0.0.0" href="http://localhost/asp.net/mcad/randomnumbergenerator/bin/RandomNumberGenerator.dll" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>


what am I missing I have no idea... how can I enable HTTP download for appdomain..?
0
Comment
Question by:davidlars99
  • 3
  • 3
6 Comments
 
LVL 20

Expert Comment

by:ihenry
ID: 13780703
I'm not very sure what exactly are trying to do here, but the code should be able to execute with an absolute path:

        Dim a As [Assembly] = [Assembly].LoadFrom("c:\asp.net\mcad\randomnumbergenerator\bin\RandomNumberGenerator.dll")
        Dim types As Type() = a.GetTypes()
        Dim oType As Type

        For Each oType In types
            Response.Write(oType.Name.ToString() & "<br>")
        Next
0
 
LVL 13

Author Comment

by:davidlars99
ID: 13781358
this is one of methods how .NET works with its assemblies, why don't you review msdn documentation? you'll find out
0
 
LVL 20

Accepted Solution

by:
ihenry earned 2000 total points
ID: 13781659
:o) You mean assembly download via http? I've seen a lot of similar things. But the purpose is to execute .NET assembly in the client-side not in server-side.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 13

Author Comment

by:davidlars99
ID: 13781718
I tryed client-side and it worked perfect, but it also should be fine this way... not sure though... :) you left with no hope, so is there any chance that this will work..?
0
 
LVL 20

Expert Comment

by:ihenry
ID: 13783631
I felt hopeless as I coudn't find an answer for myself :o). However, I am lucky since my requirement extends only in intranet environment so I can just use some urls that pointing to my latest assemblies.
0
 
LVL 13

Author Comment

by:davidlars99
ID: 13799249
only for client side apps in current version of .NET framework,  but they say we should be able to it in 2.0, thanks henry  :)
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month17 days, 8 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question