473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Application without global.asax

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
2 4758
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mike Owen | last post by:
Hi, I have just used the import Wizard to import a VS 2003 app to VS 2005. I have a lot of work to do to enable it to compile successfully with all the errors and warnings it gave me, but as a...
1
by: CES | last post by:
All, Could someone please point me to a step by step resource on setting up a ..net Web Application on IIS. I'm having a problem setting up IIS to except a new Web Application. I'm deploying...
5
by: John Christensen | last post by:
I'm currently having an issue while trying to deploy a new ASP.NET application from my personal machine to our development web server. After I copy the folder over and create an IIS application in...
1
by: localhost | last post by:
In the Application_OnStart, I make some data calls and place the results in the HTTP cache. Sometimes, the database is not available when the application starts up, so I want to sleep for 20...
5
by: Leon | last post by:
Is there a way I can create a thread at application level that running all the time along with application exists? I have tried to do the above thing, and I found for some reason, the thread only...
6
by: jim | last post by:
Hi All, I like to know the life cycle of an ASP .NET Application( incudieng server application, such as .NET Web Service). That means from initialization to fully running and how to reboot it or...
16
by: Fernando Arámburu | last post by:
Hi , it´s me again. I will take another way because yesterday I make a question and, probably I didn´t make myself clear so you didn´t understand my question. I want to know if there is any...
8
by: Vishwanathan Raman | last post by:
Hi I have a declared a static DataSet object SOBJ in Global.asax.I also have a localy defined DataSet LSOBJ in Global.asax which I am storing in Application State.Is there any technical...
25
by: JJ | last post by:
I only want to catch 404 errors at the application level (the rest are will be handled by the customerrors section of the web.config). How do I check for the error code in the Application_Error...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.