Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I want to save some information in App.config, but there is some problem.

I defined a sectionGroup and defined a section, and I wrote the information like below:
//example 1
<mysectiongroup>
 <mysession>
  //some attribute
 </mysession>
 <mysession>
  //some attribute
 </mysession>
</mysectiongroup>


the app.config init fail, but if I wrote the information like below:
//example 2
<mysectiongroup>
 <mysession>
  //some attribute
 </mysession>
</mysectiongroup>


my application works.

My question is, how can I save my information like example 1?
Posted
Updated 15-May-11 22:13pm
v3
Comments
Sandeep Mewara 15-May-11 13:02pm    
Not very clear. Can you edit and try to be a little more elaborate?
Dalek Dave 16-May-11 4:13am    
Edited for Grammar and Readability.

If your application works then what problem are you getting?

Refer below lings for User define section groups.

Customizing SectionGroups and Sections in Web.config[^]

http://msdn.microsoft.com/en-us/library/ms228114.aspx[^]

Regards
Rushi
 
Share this answer
 
Comments
Dalek Dave 16-May-11 4:13am    
Useful links.
What sort of failure are you having?
 
Share this answer
 
Duplicate <session> section, you can use one section at once only within a
...
 
Share this answer
 
Hi, rahultandon1000

I think your answer is right, but I still need some proofs. Can I get the proofs from official documents?
 
Share this answer
 
Comments
Ra-one 27-May-11 3:37am    
check this http://msdn.microsoft.com/en-us/library/ms178684.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900