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=="") { ......
从数据库中查询一张表的数据 select 部门,姓名 from tb 如何才能生成下面的xml格式文件 <folder state="unchecked" label="全部"> <folder state="unchecked" isBra ......
asp.net批量上传图片最好有源码,在线等!!!!!!! 源码很长的。 参考 C# code: HttpFileCollection files = HttpContext.Current.Request.Files; if (files.Count <= 1) { ......
Microsoft JET Database Engine '80040e07' 标准表达式中数据类型不匹配。 \wwwroot\update.asp, line 20 -------------------------------------------------------------------------------- Ho ......
大家好!我是一个学生,现在是学ASP的不知道怎么回事,我自己是用CMS做过网站 代码也能看懂一点 现在想买本书,想法有很多,就是想买ASP的 又看到大家说ASP以后没有NET前景好,我又想再去买本ASP.NET的 我知道有这样的想法 ......