[C] 纯文本查看 复制代码
错误信息
-----------------------------------------------------
System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\system32\drivers\etc\hosts' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at 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, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamWriter.CreateFile(String path, Boolean append)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
at ..(String ) in e:\Develop\Private\iFishWinForm\12306TOBA\TOBA\Cn12306ServerIpRelocator\HostLib\Hosts.cs:line 216
at ..() in e:\Develop\Private\iFishWinForm\12306TOBA\TOBA\Cn12306ServerIpRelocator\MainForm.cs:line 253
at ..() in e:\Develop\Private\iFishWinForm\12306TOBA\TOBA\Cn12306ServerIpRelocator\MainForm.cs:line 298
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
环境信息
-----------------------------------------------------
操作系统版本:Microsoft Windows NT 5.1.2600 Service Pack 3
程序运行目录:C:\Documents and Settings\Administrator\桌面\12306服务器IP自动切换工具_2.1.0.1 (1)\12306服务器IP自动切换工具
模块信息
-----------------------------------------------------
[001]. mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 , C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll
[002]. 12306防封锁自动换IP工具, Version=2.1.0.1, Culture=neutral, PublicKeyToken=null , C:\Documents and Settings\Administrator\桌面\12306服务器IP自动切换工具_2.1.0.1 (1)\12306服务器IP自动切换工具\12306防封锁自动换IP工具.exe
[003]. System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 , C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll
[004]. System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a , C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll
[005]. System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 , C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll
[006]. SimpleUpdater, Version=2.3.4.5, Culture=neutral, PublicKeyToken=8bf54bd6729f490c , C:\Documents and Settings\Administrator\桌面\12306服务器IP自动切换工具_2.1.0.1 (1)\12306服务器IP自动切换工具\SimpleUpdater.dll
[007]. System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a , C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll
[008]. System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 , C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll
[009]. System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 , C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll
[010]. Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed , C:\Documents and Settings\Administrator\桌面\12306服务器IP自动切换工具_2.1.0.1 (1)\12306服务器IP自动切换工具\Newtonsoft.Json.dll