ASP.NET_compiler error

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

Sometimes by using of ASP.NET_compiler following error can occur:

 

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.

 

After deep investigation, I found very simple solution. The problem is that the error message is just badly designed.

 

It seems that this error is caused by the argument with the parameter –v, which specifies the virtual directory.

 

Here is an example: 

 

aspnet_compiler.exe" -c -d -v /MyWebApplication -p

D:\\MyProjects\\MyWebApplication -f D:\\DestinationFolder

 

Usualy, the folder D:\\MyProjects\\MyWebApplication is the folder which contains the solution file MyWebApplication.sln.

However the argument –v has to specify the folder which contains the web application and not the solution file, as shown in the following example:

 

aspnet_compiler.exe" -c -d -v /MyWebApplication -p

D:\\MyProjects\\MyWebApplication\\MyWebApplication -f D:\\DestinationFolder

 


Posted Oct 25 2006, 08:48 AM by Damir Dobric
Filed under:

Comments

Marco Willimann wrote re: ASP.NET_compiler error
on 09-16-2008 8:51

Oh my gosh!! That's the solution for my problem! Searched a half day for that thing and found a lot of "solutions".. And now it's that simple :)

Thank you

Mylene wrote re: ASP.NET_compiler error
on 09-21-2011 7:08

This solution solves my problem! Thanks!

developers.de is a .Net Community Blog powered by daenet GmbH.