IIS - error... - Asked By shah zeb on 06-Nov-11 12:33 AM

HI,
I am converting an application which is  built in visual studio 2008 .net framework 3.5. to
vs 2010(.net frame work 4.0).
Old iis was iis 6.
New is iis 7.5.
I am getting an error which shown in the gif below
Suchit shah replied to shah zeb on 06-Nov-11 12:59 AM
Looks like the user account you're using for your app pool doesn't have rights to the web site directory, so it can't read config from there. Check the app pool and see what user it is configured to run as. Check the directory and see if that user has appropriate rights to it. While you're at it, check the event log and see if IIS logged any more detailed diagnostic information there.
Open IIS Manager, select root node( the hosting server), in the middle panel double clickFeature Delegation. In right panel select Custom Site Delegation..., In upper part of middle panel, click the drop down list and select your site. In Action panel click Reset All Delegation. 


Venkat K replied to shah zeb on 06-Nov-11 02:34 AM

Change the applicationHost.Config file to this;

<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />

Is till you are facing the problem, this definitely should be a permission issues.
Check the web application folder permission and make sure the following users and groups are included \ASPNET and \IIS_IUSRS and \IUSR.

Thanks

dipa ahuja replied to shah zeb on 06-Nov-11 06:45 AM

Reason:

ERROR CODE: 0x80070021 is

ERROR_LOCK_VIOLATION The process cannot access the file because another process has locked a portion of the file.

Solution:

There are usually a few more lines in that error response that points to the exact line in the config file (and hence the locked section) that has the problem. You will either have to unlock that section or not use it in your application’s web.config file.

For e.g., one can lock/unlock handlers/modules sections by either

Ø use appcmd.exe

%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/handlers

%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/modules

OR

Ø manually change value from "Deny" to "Allow" for below settings in %windir%\system32\inetsrv\config\ applicationHost.config

<section name="handlers" overrideModeDefault="Deny" />

<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny"/>

You can also configure the locking via IIS manager UI.

http://blogs.iis.net/webtopics/archive/2010/03/08/troubleshooting-http-500-19-errors-in-iis-7.aspx