Conflicing My.MySettings sections in web.config files

C

cmay

I have an asp.net application at the root, and other applications
suchs as /WebApp1, /WebApp2.

By design, these web applications inherit the root application's
web.config file.

But, when you create a Web Reference, to a webservice, it creates a
section in your web.config file "My.MySettings" to hold the URL of the
webservice.

If your root application uses a webservice, and if one of your other
applications uses one, then asp.net has problems because both
web.config files try to define a My.MySettings section in the
web.config files.

This is not limited to webservices, this section is created if you try
to make use of the settings tab of the project.

Does anyone know of of anything that can be done about this?

If I am unclear I can post examples or more details.
 
J

Juan T. Llibre

re:
!> But, when you create a Web Reference, to a webservice, it creates a
!> section in your web.config file "My.MySettings" to hold the URL of the webservice.

Sounds like a bug.

My exposes only those objects required by a particular project type.

For example, the My.Forms object is available in a Windows Forms
application but not available in a console application.

My.Settings does not apply to web sites.

See a table with all the "My" objects exposed in project types :

http://msdn2.microsoft.com/en-us/library/ms172698(VS.80).aspx
 
C

cmay

"My.Settings does not apply to web sites. "

For web applications, you can add settings at the project level.

They are stored in the web.config and accessible from My.Settings.
 

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
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top