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
Related
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
I have existing silverlight app which works as IIS application. And i need to deploy ASP MVC app as a part of this (don't ask me why) in virtual directory, not like new IIS application.
I use IIS 6.
I create new virtual directory in existing iis application and use path to ASP project folder as physical path of this virtual directory. But i get error
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: An error occurred loading a configuration file: Failed to
start monitoring changes to 'C:\Users\Alina\Desktop\MVCApp' because
access is denied.
Source Error:
[No relevant source lines]
Is it possible to deploy ASP MVC application in virtual directory?
How to do this right?
Yeah, that should be possible. I'm guessing whatever service account your deployment process is running as doesn't have permission to write to C:\Users\Alina\Desktop\MVCApp.
To prove that out, you could modify permissions on that folder to allow 'Everyone' write access. If that works, figure out what account your process is running as, and grant that read/write/whatever, and remove the 'Everyone' access.
That should get your deployment situation fixed. I can't speak to how the two apps will run side by side. I'd need more info.
I moved my site off of a 2k3 server over to a 2k8 server. The site has a virtual directory pointed to a network share which has different credentials than the one used by the site. I set the virtual directory to use the correct credentials and it can browse the share fine through explorer, but when I try to load files (images, etc) through a browser I get the following asp.net error:
Server Error in '/' Application.
Configuration Error Description: An error occurred during the
processing of a configuration file required to service this request.
Please review the specific error details below and modify your
configuration file appropriately.
Parser Error Message: An error occurred loading a configuration file:
Failed to start monitoring changes to '\\networkshare'.
Source Error:
[No relevant source lines]
Source File: \\networkshare\web.config Line: 0
Version Information: Microsoft .NET Framework Version:2.0.50727.5456;
ASP.NET Version:2.0.50727.5456
The network share does not have a web.config.
I tried the solution provided here, but that did not solve the issue and this site isn't using impersonation. Do I need to enable impersonation? This was working correctly on win2k3.
OK, so based on our comments it sounds like this is either a share permissions problem or an NTFS permissions problem (same resolution, different dialog).
In IIS6 you typically had the worker process running as NETWORK SERVICE and that's what you would give permissions to to access shares and files on the network.
In IIS7.5 the application pools now run under an AppPool identity, one specific to the application pool that the website is running under. This link should be helpful: http://learn.iis.net/page.aspx/624/application-pool-identities/
As a quick fix (although I recommend reading up on it) though, you can go into the application pool, go to advanced properties, and set the identity back to NETWORK SERVICE.
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.
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?