“/”应用程序中的服务器错误。 System.IO.DirectoryNotFoundException

博客指出“/”应用程序出现服务器错误,具体为未找到路径“G:\”的一部分,并给出了转载链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

“/”应用程序中的服务器错误。

未找到路径“G:\”的一部分。

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.IO.DirectoryNotFoundException: 未找到路径“G:\”的一部分。

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:

[DirectoryNotFoundException: 未找到路径“G:\”的一部分。]
   System.IO.__Error.WinIOError(Int32 errorCode, String str) +287
   System.IO.Directory.InternalCreateDirectory(String fullPath, String path) +489
   System.IO.Directory.CreateDirectory(String path) +195
   DvNews.Admin.BasePage.x7a42976890112af7(String xcc73173c60d9e1a3) +1166
   DvNews.Admin.MakeStatic.btSort_OnClick(Object xe0292b9ed559da7d, EventArgs x09164e3c6108269f) +318
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +1292


解决方法:

分析: 首先这是对该分区没有访问权限 需求给它分配权限

 方法:
  1.   找到IIS 选择网络服务   IIS1.GIF
 
2. 找该分区 选中属性--安全
G1.GIF
3.找到添加按钮
    选中SERVICE  并 确定
G2.GIF

4.加SERVICE后, 点高级 弹出以下画面
  然后对SERVICE 分配相就的权限 不要全选
G3.GIF
最后按确定 就这样解决

  请大家多支持  未经充许 不得转载

转载于:https://www.cnblogs.com/qiao198/archive/2005/11/12/274732.html

Framework 版本: v4.0.30319 说明: 由于未经处理的异常,进程终止。 异常信息: System.IO.DirectoryNotFoundExceptionSystem.IO.__Error.WinIOError(Int32, System.String) 在 System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean, Boolean) 在 System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, System.String, Boolean, Boolean, Boolean) 在 System.IO.StreamWriter.CreateFile(System.String, Boolean, Boolean) 在 System.IO.StreamWriter..ctor(System.String, Boolean, System.Text.Encoding, Int32, Boolean) 在 System.IO.StreamWriter..ctor(System.String, Boolean) 在 Mabinogi.Network.ReadPacket.WriteFileLog(System.String, System.String) 在 Mabinogi.Network.ServerCommInstance+AsynchReceiveObject.Receive(System.IAsyncResult) 在 System.Net.LazyAsyncResult.Complete(IntPtr) 在 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 在 System.Net.ContextAwareResult.Complete(IntPtr) 在 System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object, IntPtr) 在 System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*) 在 System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
03-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值