Link to home
Start Free TrialLog in
Avatar of M.L. Martin
M.L. MartinFlag for United States of America

asked on

Recieving error: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

I own a website. The parent site work great. However, I need to create a folder or site within the parent site. The site within the main site needs to have it own login and webconfig file. I created the new site using Visual Studio 2010. So what I have is site 1 and then I used Visual Studio to create site 1a within site 1. The layout works without any problems on my laptop locally but when I upload my folder to my host provider, Discount ASP, and I try to hit one of the pages within site 1a I receive the following error:  It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level..........

Is there a way around this. I do not want to create a new site in a different scripting language. The following is also part of the error:

Line 28:     <compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
Line 29:
Line 30:     <authentication mode="Forms">
Line 31:       <forms loginUrl="~/Login.aspx" timeout="2880" />
Line 32:     </authentication>
Avatar of n_vijay
n_vijay
Flag of India image

HI,

You have 2 web.config files in the same site, according to you site 1, so just delete the web.config from 1a, it will be working fine, if not just remove the files from 1a folder and add a test.html file and check its working fine or not.

good luck
I think you have to create a Virtual Directory of inner site inside your main side, To do this go to IIS open your site , right click on inner site, click properties and click Create button.
ASKER CERTIFIED SOLUTION
Avatar of BuggyCoder
BuggyCoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rick
Rick

Yes. Use a virtual directory.