views:

20

answers:

1

I had an ASP.net project and I've copied and pasted the source files to another computer, but when I try and run them on this computers localhost:

    Error Summary
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information
Module  IIS Web Core
Notification    BeginRequest
Handler Not yet determined
Error Code  0x80070021
Config Error    This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
Config File \\?\C:\inetpub\wwwroot\myproj\myproj\web.config
Requested URL   http://localhost:80/myproj/myproj/default.aspx
Physical Path   C:\inetpub\wwwroot\myproj\myproj\default.aspx
Logon Method    Not yet determined
Logon User  Not yet determined
Config Source
   96:      </modules>
   97:      <handlers>
   98:          <remove name="WebServiceHandlerFactory-Integrated"/>

I'm moving it from IIS6 to IIS7 if that helps at all.

+3  A: 

It looks like you haven't used the IIS Management tool to make the folder into an Application / Virtual Directory. There's step-by-step instructions on Technet, and an overview of Sites, Applications and Virtual Directories on iis.net.

The part of the message:

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

Does seem to indicate that the folder isn't setup as a virtual directory / application as the <handlers> section should be changeable.

Rob
Can;'t seem to find this tool anywhere, I'm on windows 7
Tom Gullen
@Tom Gullen, Start > optionalfeatures > Internet Information Services > Web Management Tools > IIS Management Console
Rob
I've created a virtual directory to the site but it hasn't changed anything
Tom Gullen
It's doing it for every file, or every request not just for aspx pages
Tom Gullen
Are you still getting the exact same error message now? If yes, try using the "Convert To Application" right-click menu option in the treeview for `Sites > Default Web Site > myproj > myproj` and see where that gets you... It's likely that any issue is now related to permissions/security if the error message differs
Rob