Assmebly.Load error using Byte()



I have 2 WebApplication project (dummy and dummy2).

The first is trying to load a UserControl compiled in the second.
I've set up the application as follow:

[dummy]
\_(Virtual directory)
.:Modules:.

[dummy2]
\_(physical directory)
-Modules-
\index.aspx (inherits dummy.index)


The idea behind this setup is that dummy is a "general" application I
use in to build web sites. I often want personalized module, and I
don't want to modify the "base" application.
The web sites are formed of a client part and an administration part.

My idea was to set up a virtual directory in the administrative part
that points in the client part. That directory hold pages who inherits
type from the base application. That way they can benefit from all the
logique of the base app.

Now, from those page I register a UserControl which will hold the new
module.

Of course, this will generate a "Type not found" as soon as the parser
hit the @control instruction.

I added an @Assembly instruction in the user control naming the client
assembly name.

This will fire my AssemblyResolve from the base application which in
return will try to load the assembly asked.

If I use Assembly.LoadFrom (which will call the fusion), the DLL is
loaded and everythings works fine... until I try to recompile the
client application. Obviously this will generate an error since the
main app will have locked it (since it was charged in the othe
AppDomain).

So I figured I'd use Assembly.Load and read the raw bytes from the
client DLL and load it...

That's when I get a very nice error:

Description: An unhandled exception occurred during compilation using
the CodeDomProvider 'Microsoft.VisualBasic.VBCodeProvider'. Please
review the stack trace for more information about the error and where
it originated in the code.

Exception Details: System.ArgumentException: Illegal characters in
path.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.


Stack Trace:


[ArgumentException: Illegal characters in path.]
System.IO.Path.GetFileName(String path) +113

Microsoft.VisualBasic.VBCodeGenerator.CmdArgsFromParameters(CompilerParameters
options) +241

System.CodeDom.Compiler.CodeCompiler.FromFileBatch(CompilerParameters
options, String[] fileNames) +447
System.CodeDom.Compiler.CodeCompiler.FromDomBatch(CompilerParameters
options, CodeCompileUnit[] ea) +428
System.CodeDom.Compiler.CodeCompiler.FromDom(CompilerParameters
options, CodeCompileUnit e) +90

System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromDom(CompilerParameters
options, CodeCompileUnit e) +37
System.Web.Compilation.BaseCompiler.GetCompiledType() +227


I'm not sure what's the problem here... anyone?

Thank you

.



Relevant Pages

  • Re: Load Testing Errors
    ... There are many reasons an application might fail under load when it normally ... I notice your exception is occurring inside a DataView. ... from your request when you were expecting non-null values. ... One is a "Object reference not set to an instance of an object." ...
    (microsoft.public.dotnet.framework.performance)
  • Re: Load Testing Errors
    ... There are many reasons an application might fail under load when it normally ... I notice your exception is occurring inside a DataView. ... from your request when you were expecting non-null values. ... One is a "Object reference not set to an instance of an object." ...
    (microsoft.public.dotnet.general)
  • Re: Client Firewall and Outlook
    ... Additionally there are times when a user is on the phone to a client, ... I am trying to add Outlook ... as an exception to the firewall list. ... on windows firewall in control panel. ...
    (microsoft.public.windows.server.sbs)
  • =?ISO-8859-15?Q?Seltsames_Problem_mit_glassfish=3A_WebSe?= =?ISO-8859-15?Q?rvice-
    ... Endziel des Ganzen ist eine Anwendung, bei der ein über Web Start verteilter Client auf Web Services zugreift, die auf dem Glassfish laufen. ... im EJB-Modul wurde mit Hilfe der IDE eine Entity Class "Dummy" aus der Tabelle erzeugt. ... Schließlich wurde in der IDE ein "Enterprise Application Client"-Projekt erzeugt und darin ein "Web Service Client" auf den dargestellten Web Service. ...
    (de.comp.lang.java)
  • Re: Code design ideas?
    ... app and the webservice, etc. ... Errors of type 1 should be handled by the client side. ... Usually it is the Message of the Exception. ... severity levels: warning and error. ...
    (microsoft.public.dotnet.languages.csharp)