Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8969365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:34:52+00:00 2026-06-15T17:34:52+00:00

I have a MVC3 Web Application project that I develop and publish from Visual

  • 0

I have a MVC3 Web Application project that I develop and publish from Visual Studio 2012. This was recently a VS2010 project that was migrated.

My web.config is setup using a <location inheritInChildApplications="false"> tag so that a child application running in a virtual directory does not take on the settings.

I have setup a WebDeploy publish profile, which worked flawlessly in VS2010, but breaks my application when published from VS2012. It adds a <connectionStrings> node after the closing aforementioned </location> tag, even though I already have a <connectionStrings> node inside my <location> node. This breaks the app due to an invalid configuration file.

I’ve tried re-creating the profile from scratch which didn’t solve the problem.

Based on what I have read here, http://msdn.microsoft.com/en-us/library/dd465337.aspx, unchecking the “Use this connection string at runtime” checkbox should instruct the publish process to NOT add the connection string, but it does anyway.

I’m thinking that this would not be an issue if I wasn’t using the <location inheritInChildApplications="false">, because the connection string would get added to the right spot.

Also, note that if I publish to the File System instead of using WebDeploy, the published Web.Config is created correctly and does NOT have the extra connection string node added.

Are there any known workarounds for this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:34:53+00:00Added an answer on June 15, 2026 at 5:34 pm

    As I suspected, this issue is related to the inheritInChildApplications attribute. It is likely a bug in the Visual Studio 2012 Web Deploy whereby the deploy process always adds the connection string to the configuration file, even if you tell it not to. In my case, it was also adding in the wrong spot, which broke my application.

    To fix the issue, I simply stopped using the attribute and turned off configuration inheritance using one of the options listed here.

    I can now publish without errors, but the process still adds the connection string to the deployed configuration file. Annoying but not a show stopper.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created an mvc3 web application that uses forms based authentication. one part
I have written an ASP.NET MVC3 Web application which runs perfectly inside the Visual
This is about asp.net mvc3 web application. We have used Object cache to store
I have a web application (MVC3) that is an Intranet, Main app. The solution
I am working on a web application (asp.net mvc3) I have a Main div.
I am writing a web application on Asp.Net MVC 3. Assume that we have
Assuming I have a ASP.NET MVC 3 application that runs in a web farm
I have built an ASP.NET MVC 3 web application (with exlusively Razor/cshtml pages) that
I'm working on a web application project using ASP.NET MVC3 and database in SQL
I have been publishing my MVC3 project to IIS including All Project Files, this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.