RSS 2.0 Feed
2004-08 Entries
摘要:如果你要在一个ASP.NET页面之上执行大数据的读取和显示,那么你就很可能接收到如下错误信息: Server Error in '/' Application.Request timed out.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Request timed out.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.Stack Trace: [HttpException (0x80004005): Request timed out.] 解决方法: 修改Web.Config或者Machine.Config文件中的配置即可! <configuration> <system.web> <httpRuntime=20   executionTimeout="36000"  /> </system.web></configuration> 好像最大值就是1小时左右,如果太长了,你就要想办法优化你的叶面程序了。...[阅读全文]

posted @ | Feedback (5) | Filed Under [ 程序人生 ]

摘要:有的时候我们需要得到系统所有的进程列表,以便进行一定的操作,比如杀死指定的进程,但是如果你将这段程序部署到Windows 2000 Server / AD Server的时候就会发现.NET提示我们:“进程性能计数器被禁用”的错误,那么如何在Windows 2000 AD Server上面打开这个计数器呢? 方法如下: 将注册表:HKLM\SYSTEM\CurrentControlSet\Services\PerfProc\Performance\ 下面的键值Disable Performance Counters 设置为  0 。 重新启动即可! PS:  范例代码大致如下: System.Diagnostics.Process myproc= new System.Diagnostics.Process(); foreach (Process thisproc in Process.GetProcessesByName(processName)) {  //do something}...[阅读全文]

posted @ | Feedback (6) | Filed Under [ 程序人生 ]