473,503 Members | 10,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

web.config does not allow section names with dots

Our .NET applications and Web sites use configuration files with custom
sections. It's no problem to read a section with dots in its name from a
Windows .NET application, e.g. "MyCompany.Product.Feature". However an
attempt to read such section from Web site's web.config file raises
exception ("Can not create section handler"). Once the dots are removed,
everything works fine. I have not found any documentation that describes
such behavior. Can anybody confirm this?

TIA

Vagif Abilov
Oslo Norway
vagif
@
online.no
Nov 19 '05 #1
4 1243
Hi Vagif,

I tried to create a dotted config section in web.config, using a custon
configuration handler.

Everything is OK. I've not that error.

Can you paste the code you're using for the config handler?

Bye

Stefano

"Vagif Abilov" <va***@online.no> ha scritto nel messaggio
news:eT**************@tk2msftngp13.phx.gbl...
Our .NET applications and Web sites use configuration files with custom
sections. It's no problem to read a section with dots in its name from a
Windows .NET application, e.g. "MyCompany.Product.Feature". However an
attempt to read such section from Web site's web.config file raises
exception ("Can not create section handler"). Once the dots are removed,
everything works fine. I have not found any documentation that describes
such behavior. Can anybody confirm this?

TIA

Vagif Abilov
Oslo Norway
vagif
@
online.no

Nov 19 '05 #2
Hi Stefano,

Did you try it in a Web project? My section looks like this:

<configSections>
<section name="MyCompany.Workflow"
type="System.Configuration.NameValueSectionHandler " />
</configSections>

<appSettings>
<add key="Some key" value="Some value" />
</appSettings>

<MyCompany.Workflow>
<add key="MyKey" value="MyValue" />
</MyCompany.Workflow>

It works OK when I try to read configuration values from section
"MyCompany.Workflow" from Windows .NET application, but fails if I do the
same from ASP.NET application. However removing "." from the section name
helps.

Vagif

"Stefano" <st****************@giasoft.it> wrote in message
news:eu**************@TK2MSFTNGP12.phx.gbl...
Hi Vagif,

I tried to create a dotted config section in web.config, using a custon
configuration handler.

Everything is OK. I've not that error.

Can you paste the code you're using for the config handler?

Bye

Stefano

"Vagif Abilov" <va***@online.no> ha scritto nel messaggio
news:eT**************@tk2msftngp13.phx.gbl...
Our .NET applications and Web sites use configuration files with custom
sections. It's no problem to read a section with dots in its name from a
Windows .NET application, e.g. "MyCompany.Product.Feature". However an
attempt to read such section from Web site's web.config file raises
exception ("Can not create section handler"). Once the dots are removed,
everything works fine. I have not found any documentation that describes
such behavior. Can anybody confirm this?

TIA

Vagif Abilov
Oslo Norway
vagif
@
online.no


Nov 19 '05 #3
> Hi Stefano,

Hi Vagif
Did you try it in a Web project?
Yes, sure.
My section looks like this:
<configSections>
<section name="MyCompany.Workflow"
type="System.Configuration.NameValueSectionHandler " />
</configSections>


I'm using my own custom handler, not the NameValueSectionHandler directly.
So, maybe this is the difference.

Check out:
http://support.microsoft.com/kb/309045/en-us

HTH

Bye

Stefano
Nov 19 '05 #4
OK, I see. I will try with custom section handlers then.

Thanks!

"Stefano" <st****************@giasoft.it> wrote in message
news:OC**************@TK2MSFTNGP15.phx.gbl...
Hi Stefano,


Hi Vagif
Did you try it in a Web project?


Yes, sure.
My section looks like this:
<configSections>
<section name="MyCompany.Workflow"
type="System.Configuration.NameValueSectionHandler " />
</configSections>


I'm using my own custom handler, not the NameValueSectionHandler directly.
So, maybe this is the difference.

Check out:
http://support.microsoft.com/kb/309045/en-us

HTH

Bye

Stefano

Nov 19 '05 #5

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

Similar topics

6
2651
by: Klaus Jensen | last post by:
Hi! I have a pretty traditional setup where I develop on my local PC and the use "Copy Project" to deploy to the production enviroment.. In web.config I need different values for...
4
5374
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
0
5886
by: Adam Getchell | last post by:
I'm attempting to write a custom Authentication module using http://www.15seconds.com/Issue/020417.htm I looked at http://support.microsoft.com/default.aspx?scid=kb;EN-US;307996, but it doesn't...
3
1518
by: Dan | last post by:
hi ng, i'd like to add control elements on a page, but only for users that are authotized to access a certain location, defined in web.config. my question: is it possible to read the <allow...
9
6297
by: Benny Ng | last post by:
Hi,all, How to let the sub-directory to avoid the authentication control from Root's webconfig? I heard that we can add a new web.config to the sub-directory. And then we can slove the problem....
4
2877
by: WB | last post by:
I'm just starting out with C# after many years with VB 6.0. I'm trying to fill a listbox with a list of computer names (almost 100) from app.config. First, is app.config the place to store and...
8
1891
by: aabdis | last post by:
Hello All.... I have a question... i have two Windows apps (one UI, and one service) which use a common DLL that hands out database results and such to the two apps. The DLL always connects to...
3
6019
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...
0
2890
by: j | last post by:
I'm trying to write a section of code so that several applications that all share some configuration options can load those options from a single .config file. This code compiles and executes w/o...
0
7095
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...
0
7361
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...
1
7015
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5602
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,...
1
5026
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...
0
4693
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...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.