使用 Click Once 部署 Cassini 应用程序。如何将 Web 应用程序复制到输出?
有没有一种简单的方法可以在 VS2010 中包含 Web 应用程序的输出。
我的目标是通过 Click Once 部署基于 Cassini 的 Web 应用程序。为此,我想要获取 Web 应用程序的已发布版本,并将其放入一个目录中,用作 Click Once 部署的内容。
谢谢!
Is there an easy way to include the output of a Web Application in VS2010.
My goal is to deploy a Cassini based web application with Click Once. To do this I want to take the published version of the Web Application and put it in a directory to be used as content for the Click Once deployment.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
ClickOnce 部署适用于客户端应用程序,例如 WPF、Windows 窗体或控制台应用程序。
话虽如此,我会告诉你,我曾经编写过一个 WinForms 应用程序,其唯一目的是部署一些文件。该应用程序会将文件安装在 ClickOnce 缓存下,然后它所做的就是将文件复制到它们应该真正去的地方(MyDocuments\content 或类似的东西),然后它就会关闭。该内容已被另一个应用程序使用,因此主应用程序将定期调用内容应用程序的 url,并更新内容。
我不知道您为什么要使用 ClickOnce 部署 Web 应用程序。似乎最好使用 Visual Studio for Web 应用程序/网站内置的一键发布功能。您可以尝试我上面提到的方法,但请注意,ClickOnce 应用程序必须为特定用户运行,您必须运行该应用程序才能获得更新,并且它们没有管理权限,因此如果您认为可以复制将文件复制到服务器上的 C:\inetpub 文件夹,您可能在做梦。
ClickOnce deployment is for client applications, such as WPF, Windows Forms, or console appications.
Having said that, I will tell you that I once wrote a WinForms app for the sole purpose of deploying some files. The app would install the files under the ClickOnce cache and then all it did was copy the files to where they were supposed to really go (MyDocuments\content or something like that), and then it would close. This content was used by another application, so the main application would invoke the url to the content application periodically, and update the content.
I don't know why you would want to deploy a web application with ClickOnce. Seems like it would be better to use the one-click publishing that is built in to Visual Studio for web applications/web sites. You can try the method I've mentioned above, but note that ClickOnce applications must run for a specific user, you have to run the application in order to get an update, and they have no administrative privileges, so if you think it can copy files to the C:\inetpub folder on a server, you're probably dreaming.
目标系统需要一个 Web 服务器来运行您的 Web 应用程序。因此,您可能需要一个真正可再发行的Web服务器和 在您的应用程序的安装程序中创建< /a> 将包含 Web 服务器,并具有自定义安装操作以将您的应用程序注册到 Web 服务器。
Target system will need a web server to run your web application. Therefore you are likely to need a truly redistributable web server and create at installer for your app that will include the web server and will have custom install actions to register your application with the web server.
我最终不得不将网站发布到我的桌面应用程序项目中,将每个项目的构建操作设置为内容。
然后,当单击部署时,它会使用 Cassini Web 服务器复制整个站点。
I ended up having to publish the website into my desktop application project, set the build action for every item to Content.
Then when deploying with click once it copied the whole site over with the Cassini web server.