WDP for VS2008 still doesn't allow web.config file section replacement of 'System.Net'

Last post 03-10-2008 5:52 PM by jmslaby. 3 replies.

Sort Posts:

  • WDP for VS2008 still doesn't allow web.config file section replacement of 'System.Net'

    02-07-2008, 10:20 AM
    • Loading...
    • jmslaby
    • Joined on 11-25-2003, 3:41 PM
    • Posts 4

    There were a series of posts on various blogs about the VS 2005 version of the WDP not allowing replacement of the 'System.Net' section. This was a rather significant oversight, in my opinion, as the three parts of web.config you would most likely want to replace would be appSettings for site specific attributes, connectionStrings for the proper database configuration, and System.Net to set up site-generated email. That being said, there was talk in the forums about fixing for the next release. Indeed, in the release notes for WDP for 2008 there was mention of fixes for config file updates.

    I installed VS 2008, the new WDP and created a new deployment project for my website. In the 'web.config file section replacements' section, I included

     System.Net=system.net.config;

    And in 'system.net.config', I have:

     <system.net>
      <mailSettings>
        <smtp from="webmaster@foo.net">
          <network host="relay-hosting.server.net" password="" userName=""/>
        </smtp>
      </mailSettings>
    </system.net>

     My source 'web.config' file has a nearly identical 'System.Net' section.
     

    I continue to get the 'missing section' error. What am I missing here? I can't seem to find anything that will help me get past this.

    John 

     

  • Re: WDP for VS2008 still doesn't allow web.config file section replacement of 'System.Net'

    02-11-2008, 8:47 PM
    Answer

    Hi jmslaby,

    The replacement section you posted seems no problem. Please submit this issue to our Connect site. Actually we have public that feedback portal in the Visual Studio 2008 Web Deployment Projects downloading page:

    Visual Studio® 2008 Web Deployment Projects – RTW
    http://www.microsoft.com/downloads/details.aspx?FamilyID=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&displaylang=en

    Additional Information
        We are interested in your feedback! Here are instructions on how you can provide it.

            1. Click here to submit feedback.

    Sincerely,
    Benson Yu
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
  • Re: WDP for VS2008 still doesn't allow web.config file section replacement of 'System.Net'

    03-10-2008, 3:57 PM
    • Loading...
    • Shazam999
    • Joined on 06-17-2003, 12:11 AM
    • Posts 34

    You need to this:

    system.net/mailSettings/smtp=system.net.config

    Within 'system.net.config', have this:

    <smtp from="webmaster@foo.net">
          <network host="relay-hosting.server.net" password="" userName=""/>
    </smtp>
     

  • Re: WDP for VS2008 still doesn't allow web.config file section replacement of 'System.Net'

    03-10-2008, 5:52 PM
    • Loading...
    • jmslaby
    • Joined on 11-25-2003, 3:41 PM
    • Posts 4

    Thanks, that did the trick.

Page 1 of 1 (4 items)
Microsoft Communities
Page view counter