web.config has too much junk in it!

A

Andy B

Is there a way to cut down on the junk that is automatically put in
web.config? I have a default one with 128 lines in it and over 80% of it I
will never use. Besides, when I run my web applications with the default
web.config, I get errors all over the place. Is there any way to fix
something like this?
 
G

Gregory A. Beamer

You can edit the templates. I n VS 2008, this means unzipping and editing,
although you can use the export feature. I would make a backup of the
original prior to editing, however, as you may find you do use this junk one
day.
 
A

Andy B

I found the problem. The web.config that was in a sub application was
inheriting settings from the root applications web.config file. Since their
paths crossed and created errors, I had to use the <location
inheritInChildApplications="false"> element around system.web. I tried just
to block inheriting <httpHandlers> in system.web, but apparently <location>
isn't allowed inside of anything other than <configuration> tag. Go figure.
 

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,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top