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
Solved

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

Posted on 2008-09-30
9
1,064 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
  • 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Http hosting redirect issue 2 47
Mac users not seeing updated files on web site 3 38
Output Caching in IIS 2 35
IIS 8.5 WebDav Shared Handler Mappings 6 42
Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

861 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