Hosting the ASP.NET pipeline.

M

Mujtaba Syed

I am trying out some code to create an ASP.NET 2.0 application host. The
following two classes are in the same assembly, HostingDemo.exe:

class Program
{
public static void Main ()
{
Host host = (Host) ApplicationHost.CreateApplicationHost (typeof
(Host), "/", Directory.GetCurrentDirectory ()); // RTE
host.ProcessRequest (...);
}
}

class Host : MarshalByRefObject
{
public void ProcessRequest (...) { //... }
}

I get a runtime exception of type FileNotFound. It says that it could not
find/load the assembly HostingDemo.exe!

Any clues why it's happening?

Thanks,
Mujtaba.
 
M

Mujtaba Syed

Thanks Neil.
I forgot to mention that I am using the Nov '04 CTP of .NET Framework 2.0
and Visual Studio .NET 2005.

Also, I went through your code. I have a few questions:

1. Why do you have both the AspNetProxy and the AspNetHost type?
2. Why are you creating the AppDomain manually when you can use the
System.Web.Hosting.ApplicationHost.CreateApplicationHost method?

Thank you,
Mujtaba.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top