troubleshooting Question

setting up an existing application in iis7.5 windows 7 ultimate

Avatar of cyborama
cyboramaFlag for United States of America asked on
ASP.NETMicrosoft IIS Web ServerWindows 7
6 Comments1 Solution469 ViewsLast Modified:
Hello There,

I have been trying to get an existing application I have on a hosting service to work correctly on my windows 7 ultimate under iis7.5.  I had a very easy time of it when I was using iis 5 under windows xp but have run into several snags trying to set this up under integrated asp net 4.0

The first problem that occured was when I left the default website pointing to inetpub\wwwroot and had my application pointed to a different subfolder outside the wwwroot. In this case the application came up under localhost but all the relative links were broken which I found was do to the fact that in iis you never can specify something should be relative to an application root only to the site root.

The second problem came when I tried to make the site root point to point to either a subfolder in wwwroot which contained the application files including the web.config file or when I pointed to a subfolder outside wwwroot.  In either case I got the same error even though correct permissions were granted on both these folders for the respective apppool inet users, etc..

The error message I got is listed below:
--------------------------------------------------------------------------------------------------------------------------
""The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

The Module is IIS Web Core
Notification: MapRequestHandler
Handler: StaticFile
Error Code:0x80070002
Requested URL: http://localhost:80/berkshires/
Physical Path c:\inetpub\wwwroot\berkshires\berkshires\
----------------------------------------------------------------------------------------------

Now the first thing I notice here is that the physical Path is certainly not the path that I pointed the default website to as it was inetpub\wwwroot\berkshires and not a subfolder berkshires inside of a folder berkshires. Not sure why this happens when I declare the web site root in IIS7.5 as a subfolder but it does.

The next thing I tried to do is create an application inside my default website and point that application to a folder call berkshires outside of the wwwroot as well as folder contained inside of it while my default website pointed to the berkshires folder inside the wwwroot and I got the server error 500.19 in regards to not being able to add cuplicate entry types which is logical given that the application also inherits from the website and since they are both pointing to folders containing the same web.config file with the same details it makes sense that it would detect duplicates.

In my last attempt to get this site to work properly on my localhost with relative links starting at the subfolder that I wanted the root to start in was to try to follow that maphandler problem by actually creating a folder called berkshires inside of a parent folder berkshires and point the default website to the parent folder berkshires and go to the site and see if I could get it to render properly.

In other words I pointed the default web site to go to inetpub\wwwroot\berkshires while I put the application files in inetpub\wwwroot\berkshires\berkshires since this was where the maprequesthandler was telling me the physical path was.

In this case I got a configuration error that stated the following:
--------------------------------------------------------------------------------------------------------------------------
"It is an error to use a section registered as allowDefiniton="MachineToApplication" beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
---------------------------------------------------------------------------------------------------------------------

The line that was singled out as a response to this error in my webconfig file was the line where their was a <machinekey tag with attributes validationKey, decryptionKey, dectryption, validation.

Not sure why this was thought to be problematic under this trial set up but it was.

To sum it all up the only way I could remotely even get my application to run on my localhost under windows 7 ultimate was to point the default website to inetpub\wwwroot while pointing the application to a subfolder either in the wwwroot folder or somewhere outside of this folder.

Of course as mentioned the problem here was broken relative links so I am not sure what I am doing wrong as to why when I try to point the default website root to where the web.config file actually is I get this machinerequesthandler error under statichandler and when I try not to point it to the directory that contains my web.config file I simply get an application that is starting at the sites root as the starting path hence breaking all my links.  So instead of wiring relative links to localhost/subfolder as the starting point it has to start the wiring from localhost/ hence breaking the links and again when I fix that by making the website root the subfolder I want the wiring to start from I get these other iis errors.

So any help in trying to get this application running in my localhost with links that are not breaking would be great.

By the way sometimes I found that is I have the application working with the method dexcribed above that allows it to work with broken relative links I find that I can go to the iis and than change the path of my default site root to the same folder that the application within this default site root was pointing too than if I delete the application inside the default website and refresh my website I can for a time get relative links to resolve properly but just as soon as I either recycle the apppool this application is using or close the browser and revisit this localhost site than I am back to square one with the maprequesthandler syndrome.

So thanks again for your help in this regard,

Bo
ASKER CERTIFIED SOLUTION
strickdd

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 6 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 6 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004