浅谈用C#开发语言编写IIS程序池自动重启程序

在我确认了程序没有死循环代码,权限配置无误,本地服务器配置网站从没有出现过程序池自动停止的现象,万般无奈之下 只能从另外一个角度来解决问题了,既然IIS程序池自动停止,那我只有让IIS自动停止的程序池又自动重启不就解决问题了吗?有了思路以后就好办了,然后根据这个思路在网上找到了C#编写让IIS程序池自动重启的代码,具体编写流程如下:
一. 先创建一个windows窗体应用程序项目




六.将setup.exe进行安装,并使其能随电脑开启而自动开启.
安装完之后会自动生成exe程序,并启动。

只剩最后一步就是让程序能随着服务器重启之后也能自动开启运行,操作如下。
找到程序的安装目录,将这个都复制,然后将文件黏贴到windows自动运行的文件夹。
右击可以找到安装目录,复制放到一下目录,点击iisAuto.application。

最后总结下,这个方法只是暂时的解决了自动停止的问题,最终我们还是要找到自动停止的原因才是上策.(现在的关键是怎么百度也找不到原因所在)