473,386 Members | 1,801 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,386 software developers and data experts.

HTTPModule and App_code ASP.NET 2.0

nHi,

is it possible to add pure code to APP_Code folder to act as an HTTPModule?
If so, how do I reference it in web.config? I know global.asax is the place
for such thing but I am just wondering.
Nov 19 '05 #1
3 1996
Hi Samuel,

APP_CODE code generates into a fixed filename of APP_CODE.DLL so you can use
that name for the assembly in the Web apps bin directory.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog

"Samuel" <pr********@nospam.nospam> wrote in message
news:90**********************************@microsof t.com...
nHi,

is it possible to add pure code to APP_Code folder to act as an
HTTPModule?
If so, how do I reference it in web.config? I know global.asax is the
place
for such thing but I am just wondering.

Nov 19 '05 #2
Thanks Rick for your help. It works well.

One question: what's the difference now for global.asax and httpmodules
created in app_code in terms of functionality? I know the way we code the two
are different, but what's the main difference now for the two methods in .net
2.0?

"Rick Strahl [MVP]" wrote:
Hi Samuel,

APP_CODE code generates into a fixed filename of APP_CODE.DLL so you can use
that name for the assembly in the Web apps bin directory.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog

"Samuel" <pr********@nospam.nospam> wrote in message
news:90**********************************@microsof t.com...
nHi,

is it possible to add pure code to APP_Code folder to act as an
HTTPModule?
If so, how do I reference it in web.config? I know global.asax is the
place
for such thing but I am just wondering.


Nov 19 '05 #3
HttpModules and code in global.asax can handle any per-request events fired
by the HttpApplication (like BeginRequest, EndRequest, etc). Only global.asax
can handle Application_Start, Application_End, Session_Start and Session_End.
global.asax is only deployed in the root of your virtual directory whereas
modules are packaged as assemblies so they can be deployed to ~/bin or in
the GAC. Modules can be configured machine or site wide as well.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Thanks Rick for your help. It works well.

One question: what's the difference now for global.asax and
httpmodules created in app_code in terms of functionality? I know the
way we code the two are different, but what's the main difference now
for the two methods in .net 2.0?

"Rick Strahl [MVP]" wrote:
Hi Samuel,

APP_CODE code generates into a fixed filename of APP_CODE.DLL so you
can use that name for the assembly in the Web apps bin directory.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog
"Samuel" <pr********@nospam.nospam> wrote in message
news:90**********************************@microsof t.com...
nHi,

is it possible to add pure code to APP_Code folder to act as an
HTTPModule?
If so, how do I reference it in web.config? I know global.asax is
the
place
for such thing but I am just wondering.


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: nail | last post by:
Folks, I develop a HttpModule and it works correct, but one problem is occurs. After I register the httpmodule in the web.config, my pages (not testing http://localhost/site but...
4
by: Danny W | last post by:
Hi There! Is it possible to use HttpModule to replace the built-in ASP.NET Session object? I want to write a HttpModule that will handle storing and retrieving of session values from an external...
2
by: Simon-Pierre Jarry | last post by:
Hi, I created a custom HttpModule for managing the security of my application. in "Init" sub, I regsiter the events doing that : Public Sub Init(ByVal context As System.Web.HttpApplication)...
2
by: walter | last post by:
Hi there, I know there is pool of HttpApplications, and for each request coming in, HttpRuntime will dedicate one from pool to serve the request. My questions are : 1. since HttpModule is plug...
1
by: Faraz | last post by:
Hi everyone, I am running into a slight problem. My understanding is that a custom HttpModule will run for every request made to the server, regardless of the extension. I do not experience this...
9
by: rn5a | last post by:
Is putting a VB class file in the special directory named App_Code the same as relocating the VB class file from the App_Code directory to another directory & then using the VBC tool, compiling the...
1
by: =?Utf-8?B?Q2h1Y2sgUA==?= | last post by:
I am writing an httpModule for unhandled exceptions. I want to log what application the error occured in. Normally in 1.x I would do this by getting the AssemblyName associated with the executing...
2
by: Jimi Schacht | last post by:
ok, so, i've got a web project in c#. I'm using IIS instead of dev server. The application builds fine until I add an httpmodule I intend to use for URL rewriting and it's entry in the web.config....
3
by: Joseph Geretz | last post by:
I'm implementing a web application whose purpose in life is to act as a data conduit. Data is posted to my Web app in XML format, my application examines the data and forwards it onward by posting...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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...

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.