Solved.
For anyone else having the same problem, here is a sample:
public static void Main(string[] args)
{
MyTest mt = (MyTest)ApplicationHost.CreateApplicationHost(typeof(MyTest), "/myapp", @"c:\test");
mt.ProcessRequest();
Console.Read();
}
And than creating a new class named My:
public class MyTest : MarshalByRefObject
{
public void ProcessRequest()
{
SimpleWorkerRequest swr = new SimpleWorkerRequest("Test.aspx", string.Empty, Console.Out);
HttpRuntime.ProcessRequest(swr);
}
}
Build the application once and place the compiled file in a newly created bin folder in your path. So for example: c:\test\bin\ConsoleApplication1.exe in my case.
The file will be copied to the ASP.NET Tempory folder as far as I can see and then be run.
Works weird, let's see how I can get this in my application:D
Thanks.