易截截图软件、单文件、免安装、纯绿色、仅160KB

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


相关问答:

在asp.net里面脚本出错 - .NET技术 / ASP.NET

function CheckOpwd(){//验证用户名
var pwd=document.all.txtOpwd;

var div1=document.getElementById("divPwd");

if (pwd.value=="")
{
......

asp.net导出EXCEL问题! - .NET技术 / ASP.NET

C# code:

SqlConnection conn = CsDB.sqlcon();
SqlDataAdapter da = new SqlDataAdapter("select fwCoding from bjmuma_fwCoding where OrderNumber='" + Order + & ......

asp网站的伪静态问题. - Web 开发 / ASP

万网的服务器支持伪静态的,直接用rewrite在web.config文件写规则,也不用安装组件就可以实现伪静态,但是在时代互联服务器就用不了了,咨询它的客服,他说他们服务器(基本型C)不支持伪静态的.请问一下各位我该用什么方法 ......

asp.net批量上传图片 - .NET技术 / ASP.NET

asp.net批量上传图片最好有源码,在线等!!!!!!!
源码很长的。

参考

C# code:
HttpFileCollection files = HttpContext.Current.Request.Files;
if (files.Count <= 1)
{
......

asp.net 页面限时提交 如何实现 - .NET技术 / ASP.NET

1.asp.net做的一个答题页面,如何实时限时后自动提交,请大家给点思路
限时的时间信息存放在数据库中
2.如果答题时间设置的较长,如何方式session超时后页面无效
谢谢
用js方法来控制
回复内容太短了。。

js ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号