我的用户在哪里安装了我的 Web 设置项目?

发布于 2024-07-16 01:24:50 字数 529 浏览 4 评论 0原文

我有一个 Web 设置项目,以及 Visual Studio 08 中的一个 Web 服务项目 在

我的 Web 设置项目中,我允许用户选择他的虚拟目录名称,在安装结束时,我的 Web 服务项目中有一个安装程序类“想要”做一些事情,例如打开安装了 Web 服务主页的网页。

问题是我知道如何从 Web 安装项目(例如安装程序类中的 TARGETDIR)传递参数,但我无法弄清楚他安装的内容的 URL。 IE 如果他安装了一个名为 foo 的虚拟目录,我可以假设他位于 http://localhost/foo 但是如果我错过了 IIS 的某些配置,并且该网站可能位于 http://localhost/whatever/foo ?

因此,为了保持相对简短,在安装结束时我需要在安装程序类中知道我的 Web 服务的 URL。

I have a web setup project, and a web service project in visual studio 08

In my web setup project i allow the user to choose his virtual directory name and by the end of the installation i have an installer class in my web service project that "wants" to do some stuff such as opening a web page with the web service home page installed.

The thing is that i know how to pass parameters from the web setup project such as TARGETDIR in my installer class but i can't figure out the URL of what he installed. IE if he installed a virtual directory named foo i can assume that he it is located at http://localhost/foo but what if i miss some configuration of the IIS and maybe the website is located under http://localhost/whatever/foo ?

So, to keep it relatively short, by the end of the installation i need to know in my installer class my web service's URL.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

狠疯拽 2024-07-23 01:24:50

虚拟目录的安装程序变量是TARGETVDIR。

The installer variable for the Virtual Directory is TARGETVDIR.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文