本地运行没事,一传到服务器就出错

kmiaoer 2007-12-29 08:43:12
Server Error in '/' Application.
--------------------------------------------------------------------------------

The network location cannot be reached. For information about network troubleshooting, see Windows Help.
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.IO.IOException: The network location cannot be reached. For information about network troubleshooting, see Windows Help.

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:


[IOException: The network location cannot be reached. For information about network troubleshooting, see Windows Help.
]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +667
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +852
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) +43
System.IO.StreamWriter.CreateFile(String path, Boolean append) +54
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +49
System.IO.StreamWriter..ctor(String path, Boolean append) +66
System.IO.File.CreateText(String path) +31
comment.SystemLog.SysLog(String message) in C:\Inetpub\wwwroot\www\components\SystemLog.cs:23
comment.Database.Open() in C:\Inetpub\wwwroot\www\components\Database.cs:30
comment.Database.Operate(String SqlStr) in C:\Inetpub\wwwroot\www\components\Database.cs:70
comment.home.BDnew() in c:\inetpub\wwwroot\www\home.aspx.cs:98
comment.home.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\www\home.aspx.cs:29
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407


各位大哥,大姐 棒我看看
...全文
130 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
WNASP 2007-12-29
  • 打赏
  • 举报
回复
是文件访问的权限问题,看看你的程序中有没有读写文件的?
爱鱼的浩子 2007-12-29
  • 打赏
  • 举报
回复
server.mappath获取路径
deepinnet 2007-12-29
  • 打赏
  • 举报
回复
有服务器权限的可以看看系统日志,可以根据日志找错,如果磁盘是NTFS还的看是不有相关权限。
xierfly 2007-12-29
  • 打赏
  • 举报
回复
c:\inetpub\wwwroot

=========
你服务器上确定存在这么些个路径吗?
用server.mappath获取路径应该对的吧。
kmiaoer 2007-12-29
  • 打赏
  • 举报
回复
哦。。楼上的你能告诉我 。。你们是怎么看出来的不。我是新手。。
bat800 2007-12-29
  • 打赏
  • 举报
回复
对,检查一下文件。
九章落地 2007-12-29
  • 打赏
  • 举报
回复
楼主你检查你的这些文件SystemLog.cs/Database.cs...里是否读取了外部文件,也许是路径写错了,Web的路径和Window的路径方式不同.

62,254

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧