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 6816419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:55:25+00:00 2026-05-26T20:55:25+00:00

We have a ASP.NET MVC with 4-5 different build configurations. Whenever we change the

  • 0

We have a ASP.NET MVC with 4-5 different build configurations. Whenever we change the build configuration, we need to delete the obj folder for the web project, since we get the ‘allowDefinition=’MachineToApplication’ error. A pain, but we managed by deleting the folder in pre/post build events.
Now I need to configure our CI to build deployment packages. This means that I cannot delete the obj folder. Every time I compile e.g. with the following msbuild parameters

/p:CreatePackageOnPublish=true /p:DeployOnBuild=true

I recieve the error:

web.config(123): error ASPCONFIG: It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

As far as I understand, the problem is that there’s multiple .config files in the project – In our case, there’s not. I could really use some help to find an explanation and find a permanent (no- hack) fix.

Edit:
This question is marked as a duplicate, but the corresponding answers and cause(s) in the 2 threads, are clearly different from each other. Not sure what is intended with this tag – I’ve read that particular post before posting this question, as it didn’t answer my question. There’s multiple causes for this error message. It is ‘similar’, but definitely not a duplicate!

  • 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-05-26T20:55:26+00:00Added an answer on May 26, 2026 at 8:55 pm

    I too was deleting the obj folder until I had a conflict with a build script which required it. Catch-22, I used the accepted answer on the following SO link to move the location of the Obj folder to C:\Temp\BUILD. You have to do it per csproj file, but it is a great solution.

    Here is the link: VisualStudio: How to save the obj folder somewhere else

    Note that I am using a variable for the project name.
    R:\Temp\Build\Debug\$(MSBuildProjectName)

    I have the above line in both debug and release sections for all my projects, including class projects. My build path is a ram drive for speed. See this SO for more info: How to access macro variables within csproj file?

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

Sidebar

Related Questions

I have asp.net mvc website and in some pages i need a paging feature,
We recently added a new TeamCity build agent. Because it doesn't have ASP.NET MVC
I have an Asp.Net MVC 2 web application deployed on IIS 7.5 on .Net
I have an existing site build in c# 3.5 using asp.net mvc 1. There
i build a small application with asp.net mvc framework. I have one question. I
I have a web application built on ASP.NET MVC framework which requires a service
I have an ASP.NET MVC web app used to monitor the state of my
Is it possible to have an ASP.Net MVC Area use different authentication then the
Im new to WF and i'm trying to build an asp.net MVC web site
I have ASP.Net MVC project. Plus wordpress blog under a subfolder /Blog. Now, when

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.