简体   繁体   中英

How do I change the default Virtual Directory name during a web service install?

I have a C# web service, created using VS2008.

I have a deployment project that creates the MSI I use for deployment.

Is there a setting somewhere to change the default virtual directory that the user is prompted with during the installation?

I'd prefer to not change the name of the webservice to do this.

But isn´t this a simple case of right-clicking the setup project:

select View -> File System .

From the File system explorer , click the Web Application Folder . Press F4 to bring up the properties window (if it isn´t already visible).

In the properties window, scroll down to VirtualDirectory and change it to whatever you want.

Does that work for you?

Visual Studio 2015.可以在Web应用程序的Web.ApplicationFolder属性上更改虚拟目录

I think I have the fix.

I couldn't find a fix thru the VS UI, so you'll need to locate your deployment project (file extention is .vdproj) and open in notepad.

Search for "VirtualDirectory"

You'll find a line similar to this:

"VirtualDirectory" = "8:OldName"

Where OldName is the current default you're seeing during installation.

Change "OldName" to whatever you want for a default. Save and build.

If there's a way to do this thru the UI, that would be even better, I couldn't find it and this works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM