网站运行一段时间后报错, 只要刷新马上就好, 请教各位大侠这是怎么回事,谢谢!
未能找到文件“D:\Code\Aspx\Test\Aspx\UserCenter\Solution\Count.txt”。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.IO.FileNotFoundException: 未能找到文件“D:\Code\Aspx\Test\Aspx\UserCenter\Solution\Count.txt”。
源错误:
行 11: uint nCount = 0;
行 12: string strFilePath = Server.MapPath("Count.txt");
行 13: System.IO.StreamReader srInfo = System.IO.File.OpenText(strFilePath);
行 14: while (srInfo.Peek() != -1)
行 15: {
源文件: d:\Code\Aspx\Test\Global.asax 行: 13
堆栈跟踪:
[FileNotFoundException: 未能找到文件“D:\Code\Aspx\Test\Aspx\UserCenter\Solution\Count.txt”。]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +328
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1038
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +115
System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) +88
System.IO.StreamReader..ctor(String path) +112
System.IO.File.OpenText(String path) +32
ASP.global_asax.Application_Start(Object sender, EventArgs e) in d:\Code\Aspx\Test\Global.asax:13
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.1433; ASP.NET 版本:2.0.50727.1433
Count.txt这个文件其实是在d:\Code\Aspx\Test\下面,并且只有Global.asax文件中使用,用来网站访问计数的,但登陆后台不用计数,请问有没有什么好的解决方案?
相关推荐
加载MNIST报错:[WinError 10060] 由于连接方在一段时间后没有正确答复解决办法-附件资源
加载MNIST报错:[WinError 10060] 由于连接方在一段时间后没有正确答复解决办法-附件资源
解决vue打包后刷新页面报错:Unexpected token <
主要介绍了解决vue打包后刷新页面报错:Unexpected token <相关知识点,需要的朋友们参考下。
解决JSTL foEach标签 刷新报错的方法
本篇文章是对JSTL foEach标签刷新报错的方法进行了详细的分析介绍,需要的朋友参考下
解决vue打包后刷新页面报错:Unexpected token
前言 今天遇到了一个很怪的问题,在vue-cli+webpack的项目中,刷新特定页面后页面会变空白,报错为index.html文件中Unexpected token <。 怪点一是开发环境没有问题,只有生产环境有问题,怪点二是只有一个页面有问题,其他页面完全正常 正文 报错截图: 根据上面的情况和以往经验,应该在index.html页面及发生错误的页面定位问题,但均解决不了问题。 最后找到此项目的路由处,经过多次测试,解决问题,也确定了问题原由,原来是:路由中path的值不能以小写m开头,否则就会报上面的错误。 在此写下报错环境及条件: vue版本:2.5.2 vue-router:3.0
运行 npm run dev 报错
1.报错: 刚刚创建好vue项目的时候,运行 npm run dev 会报错,如下: C:\Users\未来\Desktop\新建文件夹 (2)>npm run dev npm ERR! path C:\Users\未来\Desktop\新建文件夹 (2)\package.json npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\未来\Desktop\新建文件夹 (2)\package


