473,625 Members | 3,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

custom virtual directory mapping for web project?

Hi there,

I'm facing a problem that is driving me nuts. The scenario is as follows:

1) Create an empty directory structure e.g. C:\Dev1\TestWeb App

2) Map a virtual directory e.g. TestWebApp to this new directory

3) Under C:\Dev1 create a blank visual studio solution and add a new web
project called TestWebApp (which will be created in C:\Dev1\TestWeb App and
mapped to http://localhost/TestWebApp)

4) Everything runs smoothly, visual studio maps the url that you created in
1) to new web project created in 2). The web app can be accessed at
http://localhost/TestWebApp

5) Check all this into SourceSafe

6) Go to a clean machine and get the project created in 4) to anywhere, say
C:\Dev2\TestWeb App

7) On the clean machine, create a new virtual directory mapping for
TestWebApp to C:\Dev2\TestWeb App

8) If you try to open the solution now on this new machine, even with the
virtual directory mapped, visual studio prompts you to set the project
location and defaults the working directory to something like
http://localhost/TestWebApp_1 which it creates under inetput\wwwroot

This will not work for me - I'm trying to automate my build process by
calling devenv.exe and hence need to be able to set the virtual directory to
whatever I want.

Has anyone experienced this problem and found a solution?

Regards,

Danny
Nov 19 '05 #1
2 2778
Hey Danny,
I've been trying a similar thing for a while, and have had nothing but
pain. A couple things I've found that might help:

1 - Each web project has a *.webinfo file, like "TestWebApp.csp roj.webinfo".
This is contained in the project directory with the *.csproj file. This
contains a mapping to the virtual directory like:
<VisualStudioUN CWeb>
<Web URLPath = "http://localhost/myFolder/TestWebApp.cspr oj" />
</VisualStudioUNC Web>

If you switch the directory, you'll need to update this as well.

2 - I've noticed that I can get this exact situation to work - if VSS
information is removed. So if I purge all VSS info from the solution, then it
works. If VSS info remains, then it fails. I think I've narrowed it down to
the soln file containing the "GlobalSection( SourceCodeContr ol)" section. This
has a mapping for the Virtual Directory. Although I'm not sure why this
causes a problem.


"Danny Miller" wrote:
Hi there,

I'm facing a problem that is driving me nuts. The scenario is as follows:

1) Create an empty directory structure e.g. C:\Dev1\TestWeb App

2) Map a virtual directory e.g. TestWebApp to this new directory

3) Under C:\Dev1 create a blank visual studio solution and add a new web
project called TestWebApp (which will be created in C:\Dev1\TestWeb App and
mapped to http://localhost/TestWebApp)

4) Everything runs smoothly, visual studio maps the url that you created in
1) to new web project created in 2). The web app can be accessed at
http://localhost/TestWebApp

5) Check all this into SourceSafe

6) Go to a clean machine and get the project created in 4) to anywhere, say
C:\Dev2\TestWeb App

7) On the clean machine, create a new virtual directory mapping for
TestWebApp to C:\Dev2\TestWeb App

8) If you try to open the solution now on this new machine, even with the
virtual directory mapped, visual studio prompts you to set the project
location and defaults the working directory to something like
http://localhost/TestWebApp_1 which it creates under inetput\wwwroot

This will not work for me - I'm trying to automate my build process by
calling devenv.exe and hence need to be able to set the virtual directory to
whatever I want.

Has anyone experienced this problem and found a solution?

Regards,

Danny

Nov 19 '05 #2
Thanks for replying Tim,

I was aware of the mapping in .webinfo but unfortunately that doesn't seem
to have an effect. As a base example, all I was trying to do was get the
source from VSS and open the solution using the same settings that it was
originally created with. Even when the .webinfo information was correctly set
the 'Set project location' dialog still appears the first time you open the
web application after getting it from VSS.

I also noticed the VSS info and found that it was possible to remove this
but I'd rather not have to parse and clean all VSS information from files for
an automated build. The web app is the only project giving me grief in the
automated build.
"Tim Stall" wrote:
Hey Danny,
I've been trying a similar thing for a while, and have had nothing but
pain. A couple things I've found that might help:

1 - Each web project has a *.webinfo file, like "TestWebApp.csp roj.webinfo".
This is contained in the project directory with the *.csproj file. This
contains a mapping to the virtual directory like:
<VisualStudioUN CWeb>
<Web URLPath = "http://localhost/myFolder/TestWebApp.cspr oj" />
</VisualStudioUNC Web>

If you switch the directory, you'll need to update this as well.

2 - I've noticed that I can get this exact situation to work - if VSS
information is removed. So if I purge all VSS info from the solution, then it
works. If VSS info remains, then it fails. I think I've narrowed it down to
the soln file containing the "GlobalSection( SourceCodeContr ol)" section. This
has a mapping for the Virtual Directory. Although I'm not sure why this
causes a problem.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5881
by: | last post by:
I have created a web setup project for my ASP.NET application that works fine. Also, I have followed the instructions for using a custom action to launch a web page after the installation is complete. This works great too, for web pages not associated with my new application. I would like to launch a web page that is part of the application that was just installed. The sample in MSDN shows using the following syntax:
10
3638
by: Wm. Scott Miller | last post by:
We have a intranet site that allows one of our departments to search a set of pdfs and then look at them. Only problem is that only they and us geeks should be allowed to see the pdfs. We have it locked down except for when a person directly types in the url to a pdf. Currently, the PDFs are in a virtual directory off the root of the server. Putting it under the search site also doesn't work. My understanding is that IIS looks as the...
8
3382
by: nick | last post by:
I have a problem and I've been using a cheezy work around and was wondering if anyone else out there has a better solution. The problem: Let's say I have a web application appA. Locally, I set it up as C:\domains\appA. Locally, my IIS root points to C:\domains. I don't point it to C:\domains\appA since if I have an appB under C:\domains I wouldn't be able to get to it. So to access it via my browser I go to localhost/appA.
7
2911
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*" path="*.sgf" type="CustomExtensionHandler, Extenders.CustomExtensionHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d831d925597c1031" validate="True"/> </httpHandlers>
2
2675
by: §iD` | last post by:
Hi! I would like to create a virtual folder (which I want to mount) and populate managing his content by a DLL or something like that in VB.NET (2.0). How can I acomplish this? Thanks to all!
4
2219
by: Chuck P | last post by:
Using vs05 and making an asp.net 2.0 website. We use VSS and have everything organized like this SolutionName Documents Code WebProjectName1 WebServiceProjectName1
2
3583
by: Paulo Canavezi | last post by:
Good Afternoon! I am having problems with the display of files in a virtual directory. At my "server1" I created a logical mapping on IIS appoint to a image directory on "server2". At "server1" I can browser the files on "server2", but if I'm using Internet explorer, I got this error: ######################################### Unable to display the page
5
7228
by: Ned White | last post by:
I have set up a virtual directory on ISS 6.0 to store the all .jpg and .swf files which i use in my project It is alias name is "OutSrc" Is it possible to acquire a list of files which exist in that virtual directory ? For my default project directory, i can get list of the specific files like that; *******************
6
3514
by: Scott M. | last post by:
I didn't get a resolution to this in my earlier post, so I'll try again: System: Windows XP Pro. (SP2) with IIS installed and running PRIOR to VS 2008 Pro. installation. VS 2008 Pro. (full installation). Installations and testing is all done via an Administrator account. If I simply create a new ASP .NET Web Application Project (WAP) on my local
0
8256
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8694
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.