简体   繁体   English

asp.net网站可在localhost上运行,但不能在IIS上运行

[英]asp.net website working on localhost but not on IIS

I have built an asp.net website using visual studio 2012. My website contains various webforms(aspx). 我使用Visual Studio 2012建立了一个asp.net网站。我的网站包含各种webforms(aspx)。 The purpose of my website is to monitor few processes on different machines on my network, i am gathering all the required information in code behind files (aspx.cs) using System.Management Class. 我网站的目的是监视网络上不同计算机上的几个进程,我正在使用System.Management Class在文件(aspx.cs)中的代码后面收集所有必需的信息。

The website is working fine on visual studio development server, but when create a virtual directory on my IIS, I didn't get any errors but i am unable to fetch the information of the machines on my network. 该网站在Visual Studio开发服务器上运行良好,但是在IIS上创建虚拟目录时,没有出现任何错误,但无法获取网络上计算机的信息。 The information i am fetching include the couple of processes and their start time, The machine name, machine uptime. 我获取的信息包括几个过程及其启动时间,计算机名称,计算机正常运行时间。

When you are running the process in visual studio in debug, it's running under your username. 当您在Visual Studio中以调试方式运行该进程时,该进程将以您的用户名运行。 Whereas when running on IIS, it's running as AppPoolIdentity. 在IIS上运行时,它以AppPoolIdentity运行。 Check to see if the user that app pool is using has proper permissions to query processes on those machines. 检查应用程序池正在使用的用户是否具有查询这些计算机上的进程的适当权限。

转到应用程序池,并将您的应用程序池设置为使用本地系统帐户

You need to verify IIS_IUSRS & IUSR permissions for your site & other resources. 您需要验证您的网站和其他资源的IIS_IUSRS和IUSR权限。

read more 阅读更多

在此处输入图片说明

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

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