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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:02:16+00:00 2026-05-17T17:02:16+00:00

I want to run my new web application with forms authentication under the ASP.NET

  • 0

I want to run my new web application with forms authentication under the ASP.NET Development WebServer (Cassini), but not at site root “/” (rather, at the path it will reside in production; “/New”).

However, the build process gives the error:

“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.
New.MvcWeb\obj\debug\csautoparameterize\original\web.config”

Now, I understand what it is saying. I have forms authentication enabled in my web.config in a virtual directory. The error goes away when I remove the web.config, or remove the “virtual path: /New” debugger configuration, or move debugging from Cassini to IIS and manually create an application at “/New”.

But it is only a ‘virtual’ directory in the mind of the Build System. The path IS application-enabled in a production IIS setting. Also, if I remove the web.config, Cassini will happily publish “http://localhost/New” as an application (for example, Server.MapPath(“~”) returns my project directory without the “/New” suffix); however I need forms authentication (an application-level web.config parameter) enabled in it.

How I can avoid this build error while retaining my desired features?

More Details

The project is currently configured for “file-system” site development. This and Cassini are supposed to make it easier for my content creators to participate in development and testing with their local copy of VS2010, without having to install IIS on their Windows PCs. I will also one-click publish to my local IIS for testing, then package/publish/deploy to public test, then finally publish to production. In my mind I imagine Cassini being a very helpful part of this whole process.

VS2010, MVC application, file-system site project

Project Settings:
 * ASP.NET 4.0
 * Use Visual Studio Development Server  
 * Virtual Path: /New

web.config snippet:
 <authentication mode="Forms">
   <forms loginUrl="~/../login.html" timeout="30"/>
 </authentication>
  • 1 1 Answer
  • 2 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-17T17:02:16+00:00Added an answer on May 17, 2026 at 5:02 pm

    So, having learned that Cassini actually does run paths as applications [i.e. Server.MapPath(“~”) returns the project root folder, and Server.MapPath(“/”) may not exist], it really becomes strictly a build error.

    With a better problem definition, I now see other people also have this error in MVC projects with MvcBuildViews and One-Click-Publish. Here are some articles on how to avoid it:

    allowDefinition='MachineToApplication' error when publishing from VS2010 (but only after a previous build)

    http://connect.microsoft.com/VisualStudio/feedback/details/556312/mvcbuildviews-does-not-play-well-with-one-click-publish

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

Sidebar

Related Questions

I want to display font dialog box in my web application(asp.net). Im using the
How Many Times Does an ASP .NET Application Start? I want to run something
I have an ASP.NET Web Forms APP, I want to migrate it to ASP.NET
I work on a fairly large ASP .NET Web Forms application that is currently
I am new in windows application development. basically i am web developer. but though
Im new to Android and Google chrome web application development. I want to create
I have developed an ASP.NET web application in Visual Studio 2008. I have an
I'm trying to refactor an existing asp.net-mvc web application and introduce mvc-turbine. The application
i have created a new web forms application in visual studio 2010 with just
I am developing a new web application, but just found out I am required

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.