HTTP module

S

simon

Hi,

I created one http module. If I put my module(testModule.dll) into bin
folder of my application and I put this into config file:
<httpModules>
<add name="testModul" type="testModule.checkModul,
testModule" />
</httpModules>

my module works. Now I would like that this module executes for all
applications on my web server. So I move this config section into root
folder of my web server. It still works but only for application which
has this dll into it's root folder.

Where I should put my testModule.dll that it would work for all
applications on my web server? Or what is the process to achieve that?

thank you for your answer,
Simon
 
J

Jason Keats

simon said:
Hi,

I created one http module. If I put my module(testModule.dll) into bin
folder of my application and I put this into config file:
<httpModules>
<add name="testModul" type="testModule.checkModul,
testModule" />
</httpModules>

my module works. Now I would like that this module executes for all
applications on my web server. So I move this config section into root
folder of my web server. It still works but only for application which
has this dll into it's root folder.

Where I should put my testModule.dll that it would work for all
applications on my web server? Or what is the process to achieve that?

thank you for your answer,
Simon


I believe you put it in the GAC then register it in machine.config.

http://www.15seconds.com/Issue/020417.htm

HTH
 
S

simon

Thank you for your answer. Do you know what is the right format of
registering the module in machine.config file? It's different than in
web.config because if I put the following code into machine.config, I
get an error:
<httpModules>
<add name="testModul" type="testModule.checkModul,
testModule" />

Would this modul works for all aplications on my web server or just
for asp.net applications? I have also some old asp applications and I
would like that modul works for all of them, that it would be included
in IIS. Is it possible? Or I must wrte isapi extension.

Thank you,
Simon
 
J

Jason Keats

simon said:
Thank you for your answer. Do you know what is the right format of
registering the module in machine.config file? It's different than in
web.config because if I put the following code into machine.config, I
get an error:
<httpModules>
<add name="testModul" type="testModule.checkModul,
testModule" />

Would this modul works for all aplications on my web server or just
for asp.net applications? I have also some old asp applications and I
would like that modul works for all of them, that it would be included
in IIS. Is it possible? Or I must wrte isapi extension.

Thank you,
Simon


The article says "machine.config file contains the configuration
settings that apply to all the Web applications installed on that box."

My guess is that it only applies to .NET applications.

http://msdn.microsoft.com/en-us/library/9b9dh535.aspx contains
information about configuration.

If you provide more details about the error message you're getting then
someone may further help you.
 
S

simon

I install testModule as GAC. There were no errors. I created key file
and add it with gacutil.

Than I included this dll into the machine.config file:

<httpModules>
<add name="testModul" type="testModule.checkModul,
testModule" />
</httpModules>

But it works only if dll is in bin folder of each application. It
doens't work as GAC. Should I missed something. Probably I must use
some different configuration settings if my module is as GAC.
Something like :
<add assembly="AssemblyFileName, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=5edf592a9c40680c" /> ?

So, short summary: I created httpModule which I would like to that it
works for all applications on my web server by default.
As I understand I must add my assembly to the GAC and include setting
into machine.config file. Is it true or is there some other way?
And it would work for all ASP.NET applications? If I would like to
work for all applications(also old ASP) I must use IIS 7.0 Why? Any
explanation or directions.
maybe some url?

Thank you for your help,
Simon
 

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,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top