ASP.NET 2.0: Writing configuration keys in SingleTagSection

N

Navin Mishra

Hi,

I'm using OpenWebConfiguration to open web.config of another ASP.NET
application in an admin app and, I could read/write other appSettings keys
just fine, but I can't access keys in SingleTagSectionHandler. Has somebody
done that or is it not possible ? I use GetSection to access the section but
when I cast to IDictionary(the way to access keys in SingleTagSection), the
casting fails with error "System.InvalidCastException: Unable to cast object
of type 'System.Configuration.DefaultSection' to type
'System.Collections.IDictionary". I'm really stuck on that and don't want to
read/write raw XML!

Thanks in advance and regards

Navin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top