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

Web.Config file seems to be ignored

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
Nov 25 '05 #1
4 1624
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" <Bi******@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
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

Nov 25 '05 #2
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" <Bi******@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
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


Nov 25 '05 #3
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

Nov 25 '05 #4
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" <Bi******@discussions.microsoft.com> wrote in message
news:CB**********************************@microsof t.com...
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" <Bi******@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
> 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


Nov 29 '05 #5

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

Similar topics

13
by: Maxim Khesin | last post by:
I want to have a config file with my python proggie, satisfying the following requirements: 1) support key->(value, default) 2) simple and intuitive to read and edit 3) easyly readable into a...
2
by: Thilo Klein | last post by:
Hi, I have a managed app running from an unc path on the local intranet (Full trust is set for this path with the .NET Configuration mmc!). If the applications supplies both a .manifest and a...
3
by: scott dever | last post by:
In .NET framework 1.0 I had the responseadelockinterval set to 1:30 (1 hour 30 minutes) to allow for some long running queries to finish on certain pages of an ASP.NET application. After...
8
by: Subra Mallampalli | last post by:
Hi, I am trying to use <runtime> section within the web.config file. However, the contents of the <runtime> section seem to be ignored. What am i missing here? Is <runtime> section not used by...
3
by: Ralf Ziller | last post by:
I have a ASP.Net application with web.config files in subfolders. This works fine with the Visual Studio development server. But after publication to an IIS6 webserver a config file inside a...
3
by: wizofaus | last post by:
I've now created the same setup on four different machines, where I'm changing the processModel section machine.config so that ASP.NET (1.1) runs as SYSTEM, to give it permission to do various...
13
by: Jonny Bergdahl | last post by:
I have a ASP.Net 2.0 web application that I am trying to debug. Problem is that I can't get the error message to show in the browser. It always returns the generic error message telling me to set...
1
by: mattgarvin | last post by:
Hello, my company hosts many websites, and we want to add a Feedback Form (like "Contact Us") that can be re-used on all of them just by "dropping in" a new directory containing the code. My boss...
2
by: =?Utf-8?B?SmFzbWluZQ==?= | last post by:
Hi, I have a MyApp.exe.config file with some settings, but my program seems to IGNORE it. it looks for MyApp.config instead. changing the exe.config to .config is a bit complicated (windows...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.