[英]How do I change the default Virtual Directory name during a web service install?
I have a C# web service, created using VS2008. 我有一个使用VS2008创建的C#Web服务。
I have a deployment project that creates the MSI I use for deployment. 我有一个部署项目,用于创建我用于部署的MSI。
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. 我宁愿不更改Web服务的名称来执行此操作。
But isn´t this a simple case of right-clicking the setup project: 但这不是右键单击安装项目的简单情况:
select View
-> File System
. 选择View
- > File System
。
From the File system explorer , click the Web Application Folder
. 从文件系统资源管理器中 ,单击“ Web Application Folder
。 Press F4
to bring up the properties window (if it isn´t already visible). 按F4
打开属性窗口(如果它不可见)。
In the properties window, scroll down to VirtualDirectory
and change it to whatever you want. 在属性窗口中,向下滚动到VirtualDirectory
并将其更改为您想要的任何内容。
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. 我无法通过VS UI找到修复程序,因此您需要找到您的部署项目(文件扩展名为.vdproj)并在记事本中打开。
Search for "VirtualDirectory" 搜索“VirtualDirectory”
You'll find a line similar to this: 你会发现一个类似于这样的行:
"VirtualDirectory" = "8:OldName" “VirtualDirectory”=“8:OldName”
Where OldName is the current default you're seeing during installation. 其中OldName是您在安装期间看到的当前默认值。
Change "OldName" to whatever you want for a default. 将“OldName”更改为您想要的默认值。 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. 如果有办法通过用户界面执行此操作,那将更好,我找不到它,这是有效的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.