Opening ASP.NET examples in Developer Studio .NET

I'm just getting started with ASP.NET and have been downloading example ASP.NET projects from sites such as http://authors.aspalliance.com. When I unzipped these projects and tried to open them in Visual Studio .NET I get the following really helpful message:

---------------------------
Microsoft Development Environment
---------------------------
Visual Studio .NET cannot create or open the application.
The likeliest problem is that required components are not installed on the local Web server.
Run Visual Studio .NET setup and add the Web Development component.
---------------------------
OK Help
---------------------------
I'd already got ASP.NET project up and running so luckily didn't take much notice of the error message.

It turned out that all I needed to do was define a new virtual directory in IIS that matches the one the project was configured for. The expected virtual directory can be found in the project's .csproj.webinfo file. Here's an example one:

<VisualStudioUNCWeb>
<Web URLPath = "http://localhost/WilsonTemplatesIntro/WilsonTemplatesIntro.csproj" />
</VisualStudioUNCWeb>
So all that's needed in this case is to create a virtual directory in IIS called WilsonTemplatesIntro that maps to the extracted source directory. Once the virtual directory is created then Visual Studio .NET opens the project without any complaints!

I hate lazy vague error messages that pretend they know what they're talking about.

Comments

Popular posts from this blog

Using Python to Automate Visio

Microsoft accounts for children - Verify that you're an adult error

The computer says no