IIS - regarding simple web portal using asp - Asked By Amar on 25-Aug-11 05:26 AM

hi, while running my .aspx file using IIS, i come through this error. pls provide me a solution..

 

Server Error in '/6030' Application.

Failed to access IIS metabase.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HostingEnvironmentException: Failed to access IIS metabase.]
   System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path) +3492154
   System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath.MapPath(String siteID, VirtualPath vpath) +9
   System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +163
   System.Web.CachedPathData.GetConfigPathData(String configPath) +382
   System.Web.CachedPathData.GetConfigPathData(String configPath) +243
   System.Web.CachedPathData.GetApplicationPathData() +68
   System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +3385663
   System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path) +189


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Cos mos replied to Amar on 25-Aug-11 05:32 AM
Hi,

This error occurs when

1. Permissions to the metabase are insufficient
2. because the permissions are set incorrectly

Use MetaAcl tool to modify the metabase permissions.

Please refer this article : http://support.microsoft.com/kb/326902
Venkat K replied to Amar on 25-Aug-11 05:34 AM
Try to follow the following steps:
  1. Click Start, click Run, type cmd in the Open box, and then click OK.
  2. Switch to the Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 folder. In this folder, Drive is the drive where Windows is installed. To do this, type the following line at the command prompt, and then press ENTER:
    cd Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
  3. Add the appropriate permissions to the Network Service group for the Temporary ASP.NET Files folder. To do this, type the following line, and then press ENTER:
    aspnet_regiis -ir

Reference: http://support.microsoft.com/kb/823379

Thanks

Sreekumar P replied to Amar on 25-Aug-11 05:43 AM
Hi,

here is might bcoz of .... When you install IIS AFTER .NET 2.0 framework, the rights of the ASPNET user had not been set correctly.

Resolution
     Repair (Uninstall if repair does not work for you)  .NET Framework 2.0

Simply run the following from command line to reset the IIS registry settings for aspnet user. Usually framework directory for .Net Framework 2.0 resides under C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727


References:-

Reena Jain replied to Amar on 25-Aug-11 05:51 AM
Hi,

When you install IIs after .Net 2.0 Framework,the right of asp.net user has not been set correctly.

Resolution:-

Repair(uninstall if repair does not work, .Net Framework2.0)

Run the following from your command line to reset IIS registry settings for aspnet user.

C:\WINDOWS\Microsoft.Net\Framework\v2.0.50727>aspnet_ regiis -i

As well
reset your IIS and .Net register setings so that it will work. 



Anoop S replied to Amar on 25-Aug-11 06:09 AM

entering the following lines into the Visual Studio command prompt:

aspnet_regiis -i
aspnet_regiis -ga <THEUSERNAMEINUPPERCASE>

if it didn't solve then

1. Ran cscript metaacl.vbs IIS://localhost/w3svc "machinename\ASPNET" R. This did not fix the problem. We verified that our ASPNET account had RWSUED and moved to step 2.
 

2. Ran aspnet_regiis –ga <WindowsUserAccount>. This did not fix the problem either. We then “guessed” that the developer who was experiencing this issue probably installed IIS on top of Visual Studio 2005. So we decided to repair the framework. (step 3)  


3. Ran dotnetfx.exe /t:c:\temp /c:"msiexec.exe /fvecms c:\temp\netfx.msi"

 
Amar replied to Reena Jain on 25-Aug-11 07:03 AM
its working nw.. thanQ
Amar replied to Venkat K on 25-Aug-11 07:04 AM
ya.. its working nw tanQ
Amar replied to Sreekumar P on 25-Aug-11 07:04 AM
ya.. its working nw ...tanQ