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

HTTPModules

P: n/a
Does anyone know if there's a way to register a HTTPModule at runtime?

One of the big reasons we use them is to create graphics on the fly. I have
a calendar control that allows the developer to specify an image to activate
the calendar. I was thinking that it would be great if that control could
dynamicly register a module that rendered any one of 3 or 4 images. From a
configuration standpoint, the developer would just have to plop the control
(yeah, technical terminology) on the web form and the control would register
the image HTTPModule with the web application if it didn't already exist.
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Hi David,

Short answer is: no, there is no configuration APIs you can call to
programmatically register a module.

Long answer is: you could write a VS.NET addin, that you install @ your
product's installation time. This addin will be checking the current
projects references, and if it detects that your product's assembly is
referenced it will modify the current project's web.config file accordingly.
You could even check if the dev is actually using the control that requires
the module to be registered and modify the web.config only in this case.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

"David Jessee" <dj*****@houston.rr.com> wrote in message
news:OV*************@tk2msftngp13.phx.gbl...
Does anyone know if there's a way to register a HTTPModule at runtime?

One of the big reasons we use them is to create graphics on the fly. I have a calendar control that allows the developer to specify an image to activate the calendar. I was thinking that it would be great if that control could
dynamicly register a module that rendered any one of 3 or 4 images. From a configuration standpoint, the developer would just have to plop the control (yeah, technical terminology) on the web form and the control would register the image HTTPModule with the web application if it didn't already exist.

Nov 18 '05 #2

P: n/a
Great idea!
Granted, I was actually hoping that there was a way to do it at runtime,
because there are a couple other applications of this type of thing that I
was trying to figure out. But this will get me a lot farther than I was.
"Victor Garcia Aprea [MVP]" <vg*@NOobiesSPAM.com> wrote in message
news:eJ****************@TK2MSFTNGP10.phx.gbl...

Hi David,

Short answer is: no, there is no configuration APIs you can call to
programmatically register a module.

Long answer is: you could write a VS.NET addin, that you install @ your
product's installation time. This addin will be checking the current
projects references, and if it detects that your product's assembly is
referenced it will modify the current project's web.config file accordingly. You could even check if the dev is actually using the control that requires the module to be registered and modify the web.config only in this case.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

"David Jessee" <dj*****@houston.rr.com> wrote in message
news:OV*************@tk2msftngp13.phx.gbl...
Does anyone know if there's a way to register a HTTPModule at runtime?

One of the big reasons we use them is to create graphics on the fly. I have
a calendar control that allows the developer to specify an image to

activate
the calendar. I was thinking that it would be great if that control could dynamicly register a module that rendered any one of 3 or 4 images. From a
configuration standpoint, the developer would just have to plop the

control
(yeah, technical terminology) on the web form and the control would

register
the image HTTPModule with the web application if it didn't already

exist.


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.