Solved

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

Posted on 2009-05-07
3
516 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I came across an interesting issue that had me pulling my hair out.  I was troubleshooting a new internal web site which uses integrated security instead of anonymous.  When browsing the site from my laptop, I was able to access it with no iss…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 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

20 Experts available now in Live!

Get 1:1 Help Now