Already deployed asp.net web application wont run in different machine - asp.net

I am trying to run an already-deployed ASP.NET web application on a different machine, but I am getting a machine-to-application error. I am a beginner to ASP so please help me out with this.
This is the error which I get:
"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."

This is an error that is received when you deploy the application to a folder that is not marked as an application in IIS and you have a configuration setting that only works at the root application level. You don't have to do anything with the application, this should completely be an IIS setting. Right-click on the folder in IIS and select Convert to Application and choose the Application Pool appropriate for your application's framework version.

Turns out that the VS was complaining about a configuration section within the web.config file in the Backup folder application...just remove the backup folder so it doesn't have a web.config file under the Virtual directory that your ASP.NET application is running in.
Hope this will help you,
for more detail go through
http://forums.asp.net/t/1031775.aspx?Configuration+Error+allowDefinition+MachineToApplication+beyond+application+level

Related

IIS Application Configuration Error

Error Message: "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."
This is the error I get with an application I build in Visual Studios Express 2012 (for Web). It is using .Net Framework 4.5 which I recently installed onto the computer. I first created a Virtual Directory and got this error. So, I looked up possible solutions and have done the following:
I cleaned the application in VS. No change.
I deleted the obj folder. No change.
I converted the Virtual Directory to an Application. No change.
So far, these are the only solutions I have managed to find and none of them worked for me. Could anyone give me some other ideas?
This happens when a web.config file defines a value for which the parent has already defined and children are not allowed to define themselves. For example, you could have in your application's web.config an authentication value of 'mode="Windows"' but the parent has already defined the value as 'Forms'. Comment out all web.config values except for your appSettings and connectionStrings and see if the site works. If it does, start uncommenting the lines you've commented out one by one to figure out which section is causing the problem.
Edit for comment
Your IIS setup is the problem. You need to double check where the application directory is and whether an application (not virtual directory) has been properly set up in IIS. IIS 7 now has websites, applications, and virtual directories. You have a directory that is under a site but is not set up properly as an application. And just creating a virtual directory out of the site's directory does not make it run in its own process space, ala websites and applications.

Error: allowDefinition='MachineToApplication' beyond application level. Running in IIS

I have build a web application that runs fine though Visual studio, but now i have it test it in IIS and receive the following errors.
An error occurred during the processing of a configuration file
required to service this request
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
What changes should i make in web.config or elsewhere to make this work?
This error can means two thinks
You have a web.config on a sub-directory of your web application, that contains definitions that is not allowed for sub-directory
You try to run your site in a sub-directory of your web application with out first make it runable-application
In my case deleting the obj folder fixed the problem

I encountered an error that "authentication mode= windows" error .

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.
My error is above. How to solve this problem.
You need to configure the application in IIS.
IIS7 and IIS6 instructions: http://www.affiliatewiz.com/support/appstartpoint.asp
More complete IIS7 instructions: http://msdn.microsoft.com/en-us/library/bb763173.aspx
And more complete IIS5/IIS6 instructions: http://msdn.microsoft.com/en-us/library/zwk103ab.aspx
Technically this crosses the line between programmer and Server Admin duties, but as a .NET web developer, you do need to know that any web site or web app you create in Visual Studio needs to be set up as its own IIS Applicaiton on the web server it's deployed to.
There's a lot of good-to-know info here, particularly if you're doing it all on your own, or the server admins aren't familiar with the relationship between IIS apps and .NET web apps. http://msdn.microsoft.com/en-us/library/6hy1xzbw.aspx
(It's not all that uncommon for admins to not know what we need)
Either more the registration to the appropriate place or correctly configure your virtual directory as an application in IIS.

Web Deploy and Asp.Net MVC 3 Error (Error to Use Section Beyond Application Level)

I've got a Visual Studio 2010 MVC 3 Project that I'm trying to deploy using the Web Deploy Publish option from within Visual Studio. Whenever I try to deploy I get the following 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.
When I google the above error I find that people say to either configure the virtual directory as an application, or to check for nested web.config files.
The site runs fine when I deploy the project to it manually, so I believe the site is configured properly. I don't have an application below the site tho, as the site itself is set up as the application.
Also while MVC projects do have nested web.config files (one in the root and one in the views folder) renaming the views web.config file didn't fix the error.
Have you tried deleting your complied code in the obj folder and re-compiling?

Issues within an ASP.NET 2.0 Web Application to Look for When Running on Linux with Mono

My IT department and I are trying to get an ASP.NET web application to run on a Linux with Mono. We have been working on this for about a month to no avail. The Mono setup on the Linux server seems to be good. We are able to run the demo ASP.NET pages on the server and they work fine.
I developed my ASP.NET web application with Visual Studio 2008, and I recently downgraded the application to ASP.NET 2.0. Originally it was in ASP.NET 3.5, which might be the problem. After publishing the web app, I received the following files: Default.aspx, Web.config, bin (with a .dll and a .pdb file), and an empty App_Data file. So far, the error that keeps occuring is an appication error on the server.
For a simple test, I made a simple ASP.NET web app that had a label and a button. We tried that app and it did not work either. Does anyone know of things that I should look for within my ASP.NET web application that would inhibit the application to work?
Application error:
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. this tag should then have its "mode" attribute set to "Off".
!--web.COnfig Configuration File--
configuration
system.web
customErros mode+"Off"/
/system.web
/configuration
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.
!--Web.Config Configuration File--
configuration
system.web
customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/
/system.web
/configuration
Thank you,
DFM
Just for a resolution, I finally figured out what the problem was. The ASP.NET web app has an onload event that enables the web app to read an Access Db. For testing purposes, I did not update the ADO.NET Db path for the web app to read the Db so every time it was loaded through Mono, the generalized error in question would occur. After deleting the onload event, the web app functioned perfectly. Additionally, I had to downgrade the web app to ASP.NET 2.0, instead of 3.5, and delete the LINQ namespaces, which were not being used.
All I have to do is change the path(s) to point to the App_Data folder and place the Db in the folder, as well.

Resources