In .Net 1.1, after adding a web refernce to a project, you have the option to
configure that web reference to be static or dynamic. If it is dynamic, it
adds the URL to the web.config.
In .Net 2.0, I do not see how to change this setting and the default
behavior in .Net 2.0 is to, apparently, make the reference dynamic because it
adds the URL to the web.config file. This is causing a lot of problems in a
joint development project I am working on because for either of the two
developers to update the web reference on their PC, they have to check out
the web.config file. That means that another developer who is developing the
UI cannot get the web.config file where it is really needed. Or, on the
other hand, the UI developer has the web.config file, I cannot update the web
reference as I work on the web service - and, other than updating the web
reference, I don't need or want the web.config at all.
Is there a way to keep VS2005 from adding the URL for the web reference to
the web.config file for a .net 2.0 web project?
Thanks,
Dale

Signature
Dale Preston
MCAD C#
MCSE, MCDBA
WenYuan Wang - 19 Mar 2007 11:30 GMT
Hi Dale,
Thanks for your post.
This is a known issue for ASP.net 2.0 Website. In Winform, you can switch
Web Reference URL between Dynamic mode and Static mode, but this feature is
not available in ASP.net 2.0 Website project. This is because, in ASP.net
Website 2.0, all pages are compiled dynamically. There is no .dll file for
website; also we will lose the ability to configure the static Website
Reference URL.
The solution is using Library. You can create a library project and add Web
Referece to this project, and then add this library into your website
project.
Another way to resolve this issue, you can create a web application project
rather than website project. This is a new feature in VS 2005 sp1. You can
create the web application as VS 2003.
Hope this will help. If you have anything unclear, please feel free to let
me know. I'm glad to assist you.
Have a great day,
Sincerely
Wen Yuan
Bryan Phillips - 19 Mar 2007 18:01 GMT
Also, look at using the web application add-in for Visual Studio instead
of using web site project:
http://webproject.scottgu.com/
It also works better with source control.
--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
> Hi Dale,
> Thanks for your post.
[quoted text clipped - 19 lines]
> Sincerely
> Wen Yuan
Dale - 19 Mar 2007 19:40 GMT
Thanks for the response, WenYuan. That answers my question. I suppose,
then, for this project we'll just have to live with the issue and perhaps
architect the next project a little differently.
Thanks again,
Dale

Signature
Dale Preston
MCAD C#
MCSE, MCDBA
> Hi Dale,
> Thanks for your post.
[quoted text clipped - 19 lines]
> Sincerely
> Wen Yuan