It is an error to use a section registered as allowDefinition='MachineToApplication' beyond applicat

Stephen Price asked on October 6, 2016 23:33

I've brought this same problem to the folks over in support, but I thought I'd submit it to the hive-mind as well. I just upgraded to my local dev instance Kentico 9 and upon my first attempt to build my solution in VS, I came across this gem of an 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.

Dang thing was working/building just fine before in 8.2. Any thoughts?

Correct Answer

Stephen Price answered on October 7, 2016 18:08

So, with the help of the support team, I was able to figure out that my .sln file had become reeeealy screwed up. Dunno how that happened. Best guess is when I followed the erroneous advice of the upgrade guide to remove the 8.2 MVC project wires got crossed. I re-added my CMS website and deleted the messed up project in the solution.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on October 6, 2016 23:48

What is your environment setup? Are you using IIS Express and a local database in c:\users<username>\kentico.mdb directory? This can cause problems I've found because the way IIS Express runs. Should probably just use regular IIS on your machine and a SQL Server db.

2 votesVote for this answer Mark as a Correct answer

Stephen Price answered on October 6, 2016 23:56 (last edited on October 7, 2016 00:01)

Thanks for prompting me on this. I've been over the details so many times today that I totally neglected them above.

I'm running full IIS and SQL Server. The application lives in inetpub/wwwroot/devkentico.local (my supervisor's naming convention :P).

Also, my application is definitely an application in IIS, not a web directory, so I think that part of the message is a red herring. My research has shown most ppl that aren't seeing the directory problem have some sort of directory mismatch related to the top-level web.config file and the solution's top level directory. But those are left over from 8.2 and things were fine.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.