Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Web.Config file seems to be ignored

Reply
Thread Tools

Web.Config file seems to be ignored

 
 
=?Utf-8?B?QmlsbCBMb25n?=
Guest
Posts: n/a
 
      11-25-2005
Hi,

I have a situation like this:

wwwroot has a web.config file that adds a custom http module

<httpModules>
<add name="MyModue" type="MyType,MyAssembly" />
</httpModules>

This works wonderfully.

Problem is I have another directory under wwwroot that has this in the
web.config file located there.

<httpModules>
<remove name="MyModule" />
</httpModules>

If I call a page in wwwroot the http module runs and all is well. If I call
a page in the subdirectory that I would expect the http module not to run but
it does run.

Any ideas in what I am doing wrong?

--
Bill
 
Reply With Quote
 
 
 
 
Karl Seguin
Guest
Posts: n/a
 
      11-25-2005
If your subdir is an application or virtual dir, it won't inherit the
settings from the parent web.config.

karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


"Bill Long" <> wrote in message
news:404B0E5D-B82D-45D0-BEFA-...
> Hi,
>
> I have a situation like this:
>
> wwwroot has a web.config file that adds a custom http module
>
> <httpModules>
> <add name="MyModue" type="MyType,MyAssembly" />
> </httpModules>
>
> This works wonderfully.
>
> Problem is I have another directory under wwwroot that has this in the
> web.config file located there.
>
> <httpModules>
> <remove name="MyModule" />
> </httpModules>
>
> If I call a page in wwwroot the http module runs and all is well. If I
> call
> a page in the subdirectory that I would expect the http module not to run
> but
> it does run.
>
> Any ideas in what I am doing wrong?
>
> --
> Bill



 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmlsbCBMb25n?=
Guest
Posts: n/a
 
      11-25-2005
subdir is not an application or virtual Directory. It is just a plain
directory. It seems to find it because if I introduce an error in the file...
it complains. It just seems to ignore the "remove".

--
Bill


"Karl Seguin" wrote:

> If your subdir is an application or virtual dir, it won't inherit the
> settings from the parent web.config.
>
> karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
>
> "Bill Long" <> wrote in message
> news:404B0E5D-B82D-45D0-BEFA-...
> > Hi,
> >
> > I have a situation like this:
> >
> > wwwroot has a web.config file that adds a custom http module
> >
> > <httpModules>
> > <add name="MyModue" type="MyType,MyAssembly" />
> > </httpModules>
> >
> > This works wonderfully.
> >
> > Problem is I have another directory under wwwroot that has this in the
> > web.config file located there.
> >
> > <httpModules>
> > <remove name="MyModule" />
> > </httpModules>
> >
> > If I call a page in wwwroot the http module runs and all is well. If I
> > call
> > a page in the subdirectory that I would expect the http module not to run
> > but
> > it does run.
> >
> > Any ideas in what I am doing wrong?
> >
> > --
> > Bill

>
>
>

 
Reply With Quote
 
=?Utf-8?B?QmlsbCBMb25n?=
Guest
Posts: n/a
 
      11-25-2005
The names match. In my first post they don't "MyModue" <> "MyModule. This is
a typo in the post.

In my code they match exactly case and everything
--
Bill


"Bill Long" wrote:

> Hi,
>
> I have a situation like this:
>
> wwwroot has a web.config file that adds a custom http module
>
> <httpModules>
> <add name="MyModue" type="MyType,MyAssembly" />
> </httpModules>
>
> This works wonderfully.
>
> Problem is I have another directory under wwwroot that has this in the
> web.config file located there.
>
> <httpModules>
> <remove name="MyModule" />
> </httpModules>
>
> If I call a page in wwwroot the http module runs and all is well. If I call
> a page in the subdirectory that I would expect the http module not to run but
> it does run.
>
> Any ideas in what I am doing wrong?
>
> --
> Bill

 
Reply With Quote
 
Karl Seguin
Guest
Posts: n/a
 
      11-29-2005
I played with it and couldn't get it to work

In the httpModule itself, you could look at the path and skip processing
....not an elegant solution...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


"Bill Long" <> wrote in message
news:CB657263-5876-43E5-B702-...
> subdir is not an application or virtual Directory. It is just a plain
> directory. It seems to find it because if I introduce an error in the
> file...
> it complains. It just seems to ignore the "remove".
>
> --
> Bill
>
>
> "Karl Seguin" wrote:
>
>> If your subdir is an application or virtual dir, it won't inherit the
>> settings from the parent web.config.
>>
>> karl
>>
>> --
>> MY ASP.Net tutorials
>> http://www.openmymind.net/
>>
>>
>> "Bill Long" <> wrote in message
>> news:404B0E5D-B82D-45D0-BEFA-...
>> > Hi,
>> >
>> > I have a situation like this:
>> >
>> > wwwroot has a web.config file that adds a custom http module
>> >
>> > <httpModules>
>> > <add name="MyModue" type="MyType,MyAssembly" />
>> > </httpModules>
>> >
>> > This works wonderfully.
>> >
>> > Problem is I have another directory under wwwroot that has this in the
>> > web.config file located there.
>> >
>> > <httpModules>
>> > <remove name="MyModule" />
>> > </httpModules>
>> >
>> > If I call a page in wwwroot the http module runs and all is well. If I
>> > call
>> > a page in the subdirectory that I would expect the http module not to
>> > run
>> > but
>> > it does run.
>> >
>> > Any ideas in what I am doing wrong?
>> >
>> > --
>> > Bill

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Decompressing a file retrieved by URL seems too complex John Nagle Python 0 08-12-2010 08:17 PM
mailbox.mbox.add() also seems to set file permissions tinnews@isbd.co.uk Python 2 04-27-2009 08:08 AM
Socket recv(1) seems to block instead of returning end of file. Hendrik van Rooyen Python 10 08-24-2007 03:30 PM
FlexeLint warning (assert seems ignored) Martin Herbert Dietze C Programming 5 03-04-2007 05:41 PM
Iterating command switches from a data file - have a working solutionbut it seems inefficient News Python 17 04-14-2006 03:28 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57