Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

virtual directories in visual studio and IIS7

Posted on 2011-03-01
6
Medium Priority
?
727 Views
Last Modified: 2013-11-26
I've been using ASP classic for years and have also dabbled with ASP.net, on and off.  However I'm really not brilliant at it and need a bit of help.


I have a server, running IIS7 and it has a website on there which has a load of virtual directories - the site seems to run fine and the virtual directories seem to do their job.  It's a development server - so stuff I do on there hasn't gone live.  My local computer has Visual Studio 2010 Professional.  I make edits to the development site using Visual Studio and I open the site using the File System method, (as opposed to Local IIS / FTP / Remote Site etc.)

The problem I'm having is that I can't see any of the virtual directories when I'm using Visual Studio from within the Solution Explorer.  Is it possible to? I hope I'm missing something obvious, but it's a bit of a pain because it means that when I look at the site in "Design" view in VS I don't get any of the images appearing, and I get a ton of errors because VS can't see the real site structure, even though when I look at the site with a browser it all works.  

First of all, does anyone have a clue what I'm talking about (if not I shall explain further) and more importantly, can someone point me towards what's going wrong with my set-up / or with the way I'm connecting / something!

Many thanks!
0
Comment
Question by:najh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 18

Accepted Solution

by:
ChetOS82 earned 2000 total points
ID: 35008686
If you are using virtual directories to create a site hierarchy that doesn't exist in the filesystem, which is sounds like, then you will continue to have this problem.  Visual studio doesn't understand virtual directories.

Ideally, the structure you have created with virtual directories would be mimiced in the file system, and then you could get rid of the virtual directory.
0
 
LVL 10

Author Comment

by:najh
ID: 35008768
Ahhh...

Yes, you're spot on - I'm creating a site hierarchy that doesn't exist in the file system.  Is this a BAD thing to do?  It feels bad so far because I can't edit the site very easily, and struggle with creating controls and things.  And in which case, how do people use virtual directories? Or do you avoid them where poss?

Originally I had a couple of virtual directories but then I realised there where two or more paths to each item in the website and thought, "oh that's bad - I'd better stop this from happening"  Maybe that was a wrong thought...
0
 
LVL 18

Expert Comment

by:ChetOS82
ID: 35008880
There are some good use cases for virtual directories, but they are usually for non-website related problems.  The problem you are having now is the main reason why they aren't used for website content or images.

Now, if you are combining several independent websites so they share a common root, then virtual directories are nice.  But you won't be attempting to share content across the sites in this case.

This would be something like:
http://domain.com/Sharepoint
http://domain.com/Extranet
http://domain.com/PartnerPortal

Where each site does something different but you want them all available under your primary domain.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 10

Author Comment

by:najh
ID: 35008928
This is good stuff - what would someone who was doing such sites do?  Would each virtual directory actually be a separate web app with all associated stuff separated off so that they could administer those sites properly?

I feel so stupid for not getting this concept before but I suppose I thought virtual directories sounded a wonderful way to structure a website until i realised how completely unmanagable it seemed to be...
0
 
LVL 18

Expert Comment

by:ChetOS82
ID: 35009008
Yes, each virtual directory would be a separate site, they just share the common root.

There are other, more obscure, uses that are not as important any more.  One example is storing executable scripts (like Perl or C) in a separate virtual directory with different permissions.  But that isn't needed with ASP.net.
0
 
LVL 10

Author Closing Comment

by:najh
ID: 35009034
Many thanks!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline

610 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