Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

yet another as allowDefinition='MachineToApplication' beyond application level; tried ALL other,good explanationg given

Posted on 2008-09-30
9
Medium Priority
?
1,069 Views
Last Modified: 2012-05-05
yet another as allowDefinition='MachineToApplication' beyond application level.
i have created apps in .net 2003 and .net 2005 and both frameworks are on my server 2003 / iis6 machine.

it always been a mission to get .net apps working on this classic asp setup and today i have spent more than 8 hours on this so far.

all the other googled solutions say:
check the web config in backup folder /
make sure the virtual directory is an application / etc.

now ive done it from scratch: i've "published" the website in 2005 VS to a folder.
my website is for e.g. abc.co.uk.
i now made a folder NewProg in the C:\Inetpub\wwwroot\abc folder. (this root folder does not have an app.config).
now i just make the abc folder a virtual directory (haven't set the app yet).

i now make the folder an application [create button].
i now have this setup in IIS:
-abc
   -oldprog [App]
   -oldprog2 [App]
   -newprog [App]

i now go to abc.co.uk/newprog/login.aspx on local browser:
Parser 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.

i now go to abc.co.uk/newprog/login.aspx on remote PCbrowser:
custom error etc

i again metion there is no web.config in abc root, and no web.config in any subfolder of newprogram

i now remove the web.config file in newprogram. now for the first time, the login page actually displays, but when i try to login, i get the error that the password is incorrect [im using forms authentication with the username/passwords in the web.config] obviously because the web.config isn't there.
but still the page actually loaded now. if i try another page, i get the error:
Could not load the assembly 'App_Web_vxxxx'. Make sure that it is compiled before accessing the page. This is because the app.config isnt there.


i searched for other web.configs. there are only in the oldprog and oldprog2 folders.
 the version of .net is 2.0xxxx which is correct and the problem is not there.

like i said : when i remove the web.config i can actually view a page (that doesnt refer to files in app_data). when i put it back, i get the error.
this would tell me that i have another web.config in the parent of newprogram.
i dont.
the default web site [under IIS-> Websites] has wwwroot set as an app, but that doesnt bother oldprogram to work, so it shouldn;t bother newprogram to work either.

i cannot for the love of programming get this, please help, theres a lot at stake.




0
Comment
Question by:jxharding
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 51

Accepted Solution

by:
Ted Bouskill earned 2000 total points
ID: 22611475
If you right click on the web site or the virtual folder for the web application is the 'Application Name' disabled (greyed out)?  If yes, you didn't designate the folder as an application just like the message says.

Select the [Create] button to make it an application which assigns a application pool to the folder so that it can run as a web application.
0
 

Author Comment

by:jxharding
ID: 22611899
The application name is valid, i can remove it, i can add it, it is not greyed out.
0
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 22611940
Sorry I didn't make it clear.  I know you mentioned doing it at the root, I meant each individual virtual folder if each is it's own web application.

So in other words use the [Create] button on
   -oldprog [App]
   -oldprog2 [App]
   -newprog [App]
0
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 

Author Comment

by:jxharding
ID: 22611989
yeah, all of them are apps, they are all on the same application pool as well, i tried different app pools as well
0
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 22612012
Have you tried them as multiple websites instead?
0
 

Author Comment

by:jxharding
ID: 22612078
we have another website, using the same file system, e.g. abcd.co.uk.
i have now tried adding the newprogram virtual directory to it, and making it an app, this works fine, but it still shows the same error when i try to run it.
0
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 22618804
Sorry, don't even use a virtual directly.  Point the root website at the folder and try it.
0
 

Author Comment

by:jxharding
ID: 22621763
hi, i copied oldprogram's files into newprogram folder
now everything worked.

thus, it had to be the program itself.

i then compared the web.configs.
in the faulty version, i took out this line :
<compilation debug="true">
<assemblies>
<add assembly="WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>

now everything (almost everything) works. really funny stuff, the only part that i still get the error on is on a page where i create .docx files with MemoryStream & Package & PackageRelationshipCollection. i must prob install .net 3.5 on the webserver

thanks for the help.
0
 

Author Comment

by:jxharding
ID: 22676638
well, just for reference sake, i got this error again.
what happened was that i put a link button onto a page, and then , without recompiling it, published it to the webserver.

now this thing published, but there was an error on it, that Visual Studio would have picked up. Its a really kak idea not to do error checking when the "publish to web site" button is pressed.

im just documenting this because this is a horrid message to get and can mean anything, its worse than classic asp's messages.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question