Solved

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

Posted on 2008-09-30
9
1,067 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 500 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
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 

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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Today I came across an interesting issue that had me pulling my hair out.  I was troubleshooting a new internal web site which uses integrated security instead of anonymous.  When browsing the site from my laptop, I was able to access it with no iss…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
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…

636 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