首页 新闻 会员 周边

谁用Jexus独立版部署过.net core 2.1最新版

0
悬赏园豆:5 [已解决问题] 解决于 2018-11-17 10:46

就用一个VS默认建立的网站,发布时选的是独立部署,linux-64,上传到/var/www/default,访问时出错。
centos 7 64位,jexus 5.8.3最新版。
独立部署不用安装dontcore运行时吧。

Exception caught.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'System.Net.ServicePointManager' threw an exception. ---> System.Configuration.ConfigurationErrorsException: path attribute must be a relative virtual path. It cannot start with any of ' ' '.' '/' or ''.
at System.Configuration.ConfigurationLocation..ctor (System.String path, System.String xmlContent, System.Configuration.Configuration parent, System.Boolean allowOverride) [0x0003b] in <295fdeea2ecd4568b6caffe62995c9d3>:0
at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader reader, System.Configuration.Configuration config, System.Boolean overrideAllowed, System.Boolean root) [0x000d3] in <295fdeea2ecd4568b6caffe62995c9d3>:0
at System.Configuration.SectionGroupInfo.ReadRootData (System.Xml.XmlReader reader, System.Configuration.Configuration config, System.Boolean overrideAllowed) [0x00007] in <295fdeea2ecd4568b6caffe62995c9d3>:0
at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader reader, System.String fileName) [0x000ce] in <295fdeea2ecd4568b6caffe62995c9d3>:0
at System.Configuration.Configuration.Load () [0x00043] in <295fdeea2ecd4568b6caffe62995c9d3>:0
at System.Configuration.Configuration.Init (System.Configuration.Internal.IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) [0x0005d] in <295fdeea2ecd4568b6caffe62995c9d3>:0
at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00056] in <295fdeea2ecd4568b6caffe62995c9d3>:0
at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x0000d] in <295fdeea2ecd4568b6caffe62995c9d3>:0
at System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration (System.String path, System.String site, System.String locationSubPath, System.String server, System.String userName, System.String password, System.Boolean fweb) [0x00068] in :0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path, System.Web.HttpContext context) [0x0000a] in :0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName) [0x0000d] in :0
at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in :0
at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00005] in <295fdeea2ecd4568b6caffe62995c9d3>:0
at System.Net.ServicePointManager..cctor () [0x0003c] in <0c2de25589d041d0bfb0d7190e41abb6>:0
--- End of inner exception stack trace ---
at A.x..ctor () [0x00057] in <37a3b1efae6f4bfcb441c9a62b5a7d6c>:0
at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00005] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
--- End of inner exception stack trace ---

Server stack trace:
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00017] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic, System.Boolean wrapExceptions) [0x000a8] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean wrapExceptions, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Boolean wrapExceptions, System.Threading.StackCrawlMark& stackMark) [0x00027] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic, System.Boolean wrapExceptions) [0x00020] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x0022b] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00095] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
at System.Activator.CreateInstance (System.String assemblyString, System.String typeName, System.Boolean ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Security.Policy.Evidence securityInfo, System.Threading.StackCrawlMark& stackMark) [0x00077] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
at System.Activator.CreateInstance (System.String assemblyName, System.String typeName) [0x00016] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
at System.AppDomain.CreateInstance (System.String assemblyName, System.String typeName) [0x0000e] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
at (wrapper remoting-invoke-with-check) System.AppDomain.CreateInstance(string,string)
at System.AppDomain.CreateInstanceAndUnwrap (System.String assemblyName, System.String typeName) [0x00000] in <0db5212cb0e543a8aba4daa14eae2c9d>:0
at (wrapper remoting-invoke-with-check) System.AppDomain.CreateInstanceAndUnwrap(string,string)
at (wrapper xdomain-dispatch) System.AppDomain.CreateInstanceAndUnwrap(object,byte[]&,byte[]&,string,string)

Exception rethrown at [0]:
at a.V.A (B.L ) [0x0009e] in :0
at a.q.A (System.Object ) [0x00067] in :0

DZCMS的主页 DZCMS | 初学一级 | 园豆:5
提问于:2018-11-17 09:38
< >
分享
最佳答案
0

推荐园子了的一篇参考博文:Asp.Net Core 发布和部署(Linux + Jexus )

收获园豆:5
dudu | 高人七级 |园豆:31048 | 2018-11-17 10:41

新版加了AppHost。添加上就可以了。
AppHost={
CmdLine=dotnet /var/www/default/TestCore.dll;
AppRoot=/var/www/defatlt;
Port=5000;
}

DZCMS | 园豆:5 (初学一级) | 2018-11-17 10:47
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册