Solved

How to setup IIS to run my Visual Studio 2008 ASP.NET development project?

Posted on 2009-05-07
3
508 Views
Last Modified: 2012-05-06
I've been testing my project in the asp.net development studio site, but I want to integrate windows security (and eventually I want to use IIS to host the pages), so I've tried to install IIS on my XP box to host my site..  But when I erase the default files in the IIS web site inetpub\wwwroot folder, and replace with my vs2008 project folder files in there, it gives me the attached error in the application event log when I try to access the site..  

I DID make sure to replace permissions on all of the child items in the wwwroot folder to reflect IIS/ASP service account permissions necessary to access them.  



Failed to initialize the AppDomain:/LM/W3SVC/1/ROOT
 

Exception: System.Configuration.ConfigurationErrorsException
 

Message: Exception of type 'System.Configuration.ConfigurationErrorsException' was thrown.
 

StackTrace:    at System.Web.Configuration.ErrorRuntimeConfig.ErrorConfigRecord.System.Configuration.Internal.IInternalConfigRecord.GetLkgSection(String configKey)

   at System.Web.Configuration.RuntimeConfigLKG.GetSectionObject(String sectionName)

   at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index)

   at System.Web.Configuration.RuntimeConfig.get_HostingEnvironment()

   at System.Web.Hosting.HostingEnvironment.StartMonitoringForIdleTimeout()

   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)

   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)

   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

Open in new window

0
Comment
Question by:CantonIT
  • 2
3 Comments
 
LVL 11

Expert Comment

by:b_levitt
ID: 24332882
Go into the IIS manager, right click your site or virtual directory and select properties.

Go to the asp.net tab and select the 2.0 version.  It's probably running under 1.x and there are new things in a 2.0 (or 3.5) config.
0
 

Accepted Solution

by:
CantonIT earned 0 total points
ID: 24349259
I had already done that.. (control panel -> admin tools -> comp management -> IIS properties on default web site -> asp.net tab -> selected version 2.0.whateva)

For whatever reason it wasn't working.  What I did to correct it was this...

command prompt ->
C:\windows\microsoft.net\framework\<version 2.0.whateva folder>\aspnet_regiis.exe -i

Which reinstalled IIS for asp.net

Additionally..  VS2008 does some crazy stuff compiling assembly info for asp.net projects, and you cant just copy the project folder to another path and expect it to work.  The easiest way for me to get it to work properly in my wwwroot folder was to 'publish' it to that folder from vs2008's publish site tool.
0
 
LVL 11

Expert Comment

by:b_levitt
ID: 24391834
"Comp Management"??  I assume you mean the IIS manager?

VS2008 doesn't do any crazy stuff compiling the assembly unless you did a "Web Application Project" in which case the code behind is compiled into a dll.  If this is a regular website, publishing it isn't necessary.

In any case it sounds it sounds like you fixed it.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now