MMorningStar 2024-06-25 17:35 采纳率: 0%
浏览 14

关于#linux#的问题:或者有没有办法用其他的运行webform,比如jexus(语言-c#)

为什么在ubuntu上执行xsp4会报Unhandled Exception:
System.TypeLoadException: Could not load type of field 'Mono.Webserver.Xsp.Server:<>f mg$cache1'(3)due to: Could not resolve type with token 0100000b from typeref (expected class 'Mono.security.Protocol.Tls.PrivateKeySelectioncallback' in assembly 'Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756')assembly:Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 type:Mono.Security.Protocol.Tls.PrivateKeySelectionCallback member:(null)ERRORI FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load typeof field 'Mono.Webserver.XSP,Server:<>f mg$cache1'(3) due to: could not resolve type with token 0100000b from typeref (expected class 'Mono.security.ProtocolTls.PrivateKeySelectioncallback'in assembly 'Mono.security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756') assembly:Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 type:Mono.Security.Protocol.Tls.PrivateKeySelectioncallback member:(null)

或者有没有办法用其他的运行webform,比如jexus

  • 写回答

1条回答 默认 最新

  • 专家-赤兔[在线] 优质创作者: 编程框架技术领域 2024-06-25 17:38
    关注

    引自免费微信小程序:皆我百晓生

    这个问题涉及到Ubuntu上的XSP4和Jexus的使用。在Linux环境下,您可能遇到"Could not resolve type with token 0100000b from typeref"错误,这表明系统未能找到与给定类型的引用。

    要解决这个问题,您可以尝试安装Jexus作为替代Web服务器。Jexus是一个轻量级的Web服务器,支持C#开发。以下是安装Jexus的步骤:

    1. 首先,从官方网站下载Jexus的二进制文件。

      curl https://github.com/jexusproject/jexus/releases/download/2.11.0/jexus-2.11.0-x86_64.tar.gz -o jexus.tar.gz
      
    2. 解压下载的文件:

      tar xzf jexus.tar.gz
      
    3. 进入解压后的目录并配置环境变量:

      cd jexus-2.11.0-x86_64
      ./configure --prefix=/usr/local/jexus --enable-shared
      make && make install
      
    4. ~/.bashrc文件中添加以下行以使Jexus可用:

      export PATH=$PATH:/usr/local/jexus/bin
      
    5. 最后,在终端中输入以下命令以启动Jexus服务:

      jps
      if [ $? -eq 0 ]; then
          echo "Jexus is running."
      else
          echo "Starting Jexus..."
          nohup java -jar jexus.jar > /dev/null &
      fi
      
    6. 现在您可以在浏览器中访问http://localhost:8080来测试Jexus是否正常工作。

    如果您正在使用的是Ubuntu,那么您应该可以按照上述步骤轻松地安装Jexus。如果您仍然遇到问题,可能是因为您的环境中缺少必要的依赖项。在这种情况下,您可能需要通过包管理器(例如apt-get)来安装这些依赖项。

    评论 编辑记录

报告相同问题?

问题事件

  • 创建了问题 6月25日