By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,847 Members | 2,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,847 IT Pros & Developers. It's quick & easy.

Application without global.asax

P: n/a
Hi altogether,

I ran into a problem with asp.net:

I tried to create a pure web application WITHOUT any asax or aspx
pages. Only one .dll in the bin folder supplying a HttpApplication and
some IHttpModules etc.. All pages are created dynamicly using a xml
data source and converting through xslt.

Now I have the problem, that asp.net does not start my HttpApplication
(how could it? it can't even know which class to use :( ).
web.config isn't very helpful either, you cannot specify your
httpapplication to use and using the global.asax really annoys me!

Is there any way to solve this problem elegant? Btw. could somebody
explain to me how asp chooses the .dll in the bin folder? Does it load
all of them and then decides wich too take?

Most pages around the asp.net deployment only explain "Create a new
Http Application in VS" or "xcopy - the new tool, written for asp.net
deployment" :)).

One last question comes to mind - why does asp.net compile the aspx
pages at every first page access per session? Wouldn't a caching of
the compiled files be a lot more effective? (maybe i haven't found the
right setting to enable this ;)

Thanks,

Colin
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Max
I'm fairly new to ASP.NET, but I believe I'm giving the correct response:

"Colin" <tr****@gmx.net> wrote
I tried to create a pure web application WITHOUT any asax or aspx
pages. Only one .dll in the bin folder supplying a HttpApplication and
some IHttpModules etc.. All pages are created dynamicly using a xml
data source and converting through xslt.
ASP.NET is nothing more than an ISAPI DLL running as an IIS "plug-in." As
you know, IIS basically just routes the HTTP request to the appropriate
ISAPI DLL, and then gets the response from that DLL and shoots it off as an
HTTP request.

The aspx or asmx pages are the only way I know of to initiate an HTTP
request in IIS. The pages tell IIS that it should use the .NET engine,
instead of say the ASP engine, which is another ISAPI DLL. ISAPI DLL's are
just multithreaded COM DLL's that you can write in Visual C++.

One last question comes to mind - why does asp.net compile the aspx
pages at every first page access per session? Wouldn't a caching of
the compiled files be a lot more effective? (maybe i haven't found the
right setting to enable this ;)


When an ASP.NET application compiles on first access, it also creates a
thread in memory. When no one is using the application, it removes it from
memory. If you only get 1 hit every 30 minutes, which is very odd, well then
your app will hang while it compiles. There is no way to change this. The
app must be hit to keep it alive.

This is actually very common in software. Every app takes time to load. If
you use it frequently, you keep it in memory.

-Max
Nov 18 '05 #2

P: n/a
hmmm, you going the long way around here. but i'll assume you have a
excellent reason for this effort.

Without the application file, your application cannot respond to any
application level events raised by asp.net or by httpmodules. If you are
going to build out your own pages manually, you still need a way to point
Asp.NET to the target assembly which is the job of the global.asax file.

Also to note, you are dropping a whole bunch of functionality which are
implemented automatically for you by the framework. In the absence of these,
you will have to build your own to ensure that your application is
well-behaved. I'm not sure why the application file is causing you enough
heartache that you want to subvert the mechanism.

The files are cached, but to cache you must have a file. Upon initial
request, there is no compiled class so Asp.Net compiles one and uses it,
caching a copy of it for as long as it remains valid - validity of the class
being determined by a number of facters such as time stamp etc.

hth
--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Colin" <tr****@gmx.net> wrote in message
news:93**************************@posting.google.c om...
Hi altogether,

I ran into a problem with asp.net:

I tried to create a pure web application WITHOUT any asax or aspx
pages. Only one .dll in the bin folder supplying a HttpApplication and
some IHttpModules etc.. All pages are created dynamicly using a xml
data source and converting through xslt.

Now I have the problem, that asp.net does not start my HttpApplication
(how could it? it can't even know which class to use :( ).
web.config isn't very helpful either, you cannot specify your
httpapplication to use and using the global.asax really annoys me!

Is there any way to solve this problem elegant? Btw. could somebody
explain to me how asp chooses the .dll in the bin folder? Does it load
all of them and then decides wich too take?

Most pages around the asp.net deployment only explain "Create a new
Http Application in VS" or "xcopy - the new tool, written for asp.net
deployment" :)).

One last question comes to mind - why does asp.net compile the aspx
pages at every first page access per session? Wouldn't a caching of
the compiled files be a lot more effective? (maybe i haven't found the
right setting to enable this ;)

Thanks,

Colin

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.