shadowsocks / shadowsocks-windows

A C# port of shadowsocks
Other
58.33k stars 16.39k forks source link

由于未经处理的异常,进程终止。 #3332

Closed gouduyao closed 1 year ago

gouduyao commented 2 years ago

简要描述问题

打开提示报错 image 尝试.net 4.8安装 image 并且已经使用NetFxRepairTool进行修复,还是无解

环境

期望的结果

实际结果

配置文件和日志文件(请隐去敏感信息)

应用程序: Shadowsocks.exe
Framework 版本: v4.0.30319
说明: 由于未经处理的异常,进程终止。
异常信息: System.Configuration.ConfigurationErrorsException
   在 System.Web.Configuration.RuntimeConfig.GetSection(System.String, System.Type, ResultsIndex)
   在 System.Web.Configuration.RuntimeConfig.get_HttpRuntime()
   在 System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig()
   在 System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateValue()
   在 System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].LazyInitValue()
   在 System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Value()
   在 System.Web.Util.HttpEncoder.get_Current()
   在 Shadowsocks.Controller.PACServer.get_PacSecret()
   在 Shadowsocks.Controller.PACServer.UpdatePACURL(Shadowsocks.Model.Configuration)
   在 Shadowsocks.Controller.ShadowsocksController.Reload()
   在 Shadowsocks.Program.Main(System.String[])
chenshaoju commented 2 years ago

有点奇怪,请尝试将 Shadowsocks.exe 单独放到一个新建的目录下,如 D:\SS\ ,然后重新配置试试?

gouduyao commented 2 years ago

尝试过,不起作用

chenshaoju commented 2 years ago

请先退出SS,然后打开 Internet Explorer 设置,然后找到连接,并点击局域网设置。

然后删除下图中地址中的内容,然后取消选中使用自动配置脚本,然后连续确定直到关闭对话框,然后再试试?

image

gouduyao commented 2 years ago

不起作用

chenshaoju commented 2 years ago

odd……暂时想不出可能的原因了,这个问题可能得先放在这里了。。。

juanyilxc commented 2 years ago

看了代码,问题出在System.Web.dll中的
internal HttpRuntimeSection HttpRuntime => (HttpRuntimeSection)GetSection("system.web/httpRuntime", typeof(HttpRuntimeSection), ResultsIndex.HttpRuntime);这一行
读取system.web/httpRuntime 运行时配置时出错

所以猜测可能还是运行时的问题
可以试着在程序和功能里右击.NET Framework 4.8修复
Snipaste_2022-08-05_15-14-30
或者安装其他版本的dotnet 并检查系统更新

gouduyao commented 1 year ago

最终还是重装了系统解决

KislitsaEA commented 8 months ago

The problem occurs when "System.Net.ComNetOS" deserializes the configuration file: "C:\Windows\Microsoft.NET\Framework\v4.*.*\Config\machine.config"

Solve: open the file with administrator permissions and delete the following lines

    <configuration>
        <runtime>
          ....
       </runtime>
    </configuration>