简体   繁体   English

使用Powershell脚本或其他方式发布后如何启动Web服务

[英]How to kick start web services after publishing using powershell script or any other way

I am currently using Octopus to publish web services. 我目前正在使用Octopus发布Web服务。 Is there any way to start the services after publishing it automatically using power shell script or any other way. 使用Power Shell脚本或其他任何方式自动发布服务之后,有什么方法可以启动服务。

Thanks 谢谢

If your aim is to spin up your app pool so that the first request doesn't take longer than normal, you can issue the following in your post-deploy.ps1 如果您的目标是增加应用程序池的数量,以使第一个请求的时间不会比正常时间长,则可以在post-deploy.ps1中发出以下命令

Invoke-WebRequest -Uri "http://localhost/SomeTestPage"

Of if you have .NET 4: 如果您拥有.NET 4:

http://weblogs.asp.net/scottgu/auto-start-asp-net-applications-vs-2010-and-net-4-0-series http://weblogs.asp.net/scottgu/auto-start-asp-net-applications-vs-2010-and-net-4-0-series

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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