473,796 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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,My Assembly" />
</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 1644
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******@discu ssions.microsof t.com> wrote in message
news:40******** *************** ***********@mic rosoft.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,My Assembly" />
</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******@discu ssions.microsof t.com> wrote in message
news:40******** *************** ***********@mic rosoft.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,My Assembly" />
</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,My Assembly" />
</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******@discu ssions.microsof t.com> wrote in message
news:CB******** *************** ***********@mic rosoft.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******@discu ssions.microsof t.com> wrote in message
news:40******** *************** ***********@mic rosoft.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,My Assembly" />
> </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
3023
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 python datastructure (a dictionary?) 4) not requiring any heavy libraries needed (I am distributing my proggie as a py2exe executable and do not want to bloat the size) can you guys suggest some format for this? thanks, max
2
2615
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 .config file the settings in the config file are completely ignored. When I remove the manifest file the config file gets processed and vice versa. When both are present the config file looses the battle. To say it in front: The encoding of both...
3
4420
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 upgrading to framework 1.1 the setting seems to be ignored and the applications deadlocks at one hour. The user gets a page on their browser that says - Unable to display the page. The query is still running on the SQL Server. I am running IIS 5.0.
8
34672
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 web apps? Any help is greatly appreciated. Thanks,
3
6447
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 subsubfolder is completely ignored, regardless of the settings it defines. Any ideas what could cause this?
3
6031
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 things like access the Task Scheduler etc. Three of the machines are using IIS 5.1 and work fine. The 4th machine is using IIS 6.0, and also has ASP.NET 2.0 installed (but I've made sure that the IIS application in question is using ASP.NET 1.1). ...
13
5375
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 customErrors="Off". Problem is I have already done that. I have tried to activate tracing as well, by setting trace enabled="true", but accessing the trace.axd page returns a message instructing me to do just that. I have tried to figure out...
1
3038
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 told me to make it as modular as possible, and to make it a control we can just drag on to a page. Then he went on vacation for a week. :) I have been reading about web.config files, and thought I could utilize one to contain the few items...
2
1747
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 installer is involved...). any ideas as to WHY it happens or how to FIX it ?
0
9529
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10231
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9054
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5443
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5576
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.