asp.net如何重启网站? - .NET技术 / ASP.NET
我用的是Godaddy的服务,使用 C# code: HttpRuntime.UnloadAppDomain(); 来重启程序会抛出异常,应该是权限不够,请教大家还有没有其他的办法?
using System.ServiceProcess; public void ResetAspNetService() { ServiceController sc = new ServiceController("aspnet_state"); if (sc.Status == ServiceControllerStatus.Running) { sc.Stop(); sc.WaitForStatus(ServiceControllerStatus.Stopped); //等待服务停止 if (sc.Status == ServiceControllerStatus.Stopped) { sc.Start(); } } else { sc.Start(); } } 注意添加引用:system.serviceprocess.dll 引用 using System.ServiceProcess; public void ResetAspNetService() { ServiceController sc = new ServiceController("aspnet_state"); if (sc.Status == ServiceCon…… 支持 学习一把。。。。引用 using System.Serv
相关问答:
function CheckOpwd(){//验证用户名 var pwd=document.all.txtOpwd; var div1=document.getElementById("divPwd"); if (pwd.value=="") { ......
C# code: SqlConnection conn = CsDB.sqlcon(); SqlDataAdapter da = new SqlDataAdapter("select fwCoding from bjmuma_fwCoding where OrderNumber='" + Order + & ......
万网的服务器支持伪静态的,直接用rewrite在web.config文件写规则,也不用安装组件就可以实现伪静态,但是在时代互联服务器就用不了了,咨询它的客服,他说他们服务器(基本型C)不支持伪静态的.请问一下各位我该用什么方法 ......
asp.net批量上传图片最好有源码,在线等!!!!!!! 源码很长的。 参考 C# code: HttpFileCollection files = HttpContext.Current.Request.Files; if (files.Count <= 1) { ......
1.asp.net做的一个答题页面,如何实时限时后自动提交,请大家给点思路 限时的时间信息存放在数据库中 2.如果答题时间设置的较长,如何方式session超时后页面无效 谢谢 用js方法来控制 回复内容太短了。。 js ......