我目前运行的Ubuntu14.04与数字海洋,并有兴趣设置Mono与一些.NET代码。不过,我现在刚开始使用.NET,我认为在网上安装服务器可以查看我的代码是很不错的。并不是看到我的更改在我自己的计算机上存在是不好的,但我想找到一个地方来部署我的项目。我已经为托管付费了,不想花更多的钱在IIS上,所以我认为这是一个快速的解决方案。有人告诉我,XSP对于在浏览器中测试web应用程序很有用。XSP似乎不适合我的Linux系统。我需要些帮助。
在安装以下软件包之后,在通过SFTP将这些项目添加到自己目录中的服务器之前,我一直在本地发布这些项目。这个目录是用一个A记录建立的,并在以下位置使用虚拟主机文件进行了配置(/etc/apache2/sites-可用)。
在我的服务器上安装了以下软件包:
我尝试将一个MVC4项目添加到我的服务器上,但是这会导致服务器上的一些错误。我想,如果我安装了OWIN,这将解决这个MVC4 web应用程序的特殊问题,但是我仍然收到错误。MVC3创建了类似的错误。进入目录文件夹并使用"xsp“和"xsp4”命令返回不同的错误。
目前,使用.NET Framework4.0运行干净的web表单而不添加任何内容会导致以下错误:
**XSP:** System.TypeLoadException
Could not load type 'System.Web.UI.ScriptResourceDefinition' from assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.<br/>
**Stack Trace**: at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
**XSP 4:** System.ArgumentException
An item with the same key has already been added.<br/>
**Stack Trace:** at System.ThrowHelper.ThrowArgumentException (ExceptionResource resource) [0x00000] in <filename unknown>:0
at System.Collections.Generic.Dictionary`2[System.String,System.Web.Routing.RouteBase].Insert (System.String key, System.Web.Routing.RouteBase value, Boolean add) [0x00000] in <filename unknown>:0
at System.Collections.Generic.Dictionary`2[System.String,System.Web.Routing.RouteBase].Add (System.String key, System.Web.Routing.RouteBase value) [0x00000] in <filename unknown>:0
at System.Web.Routing.RouteCollection.Add (System.String name, System.Web.Routing.RouteBase item) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.FriendlyUrls.RouteCollectionExtensions.EnableFriendlyUrls (System.Web.Routing.RouteCollection routes, Microsoft.AspNet.FriendlyUrls.FriendlyUrlSettings settings, Microsoft.AspNet.FriendlyUrls.Resolvers.IFriendlyUrlResolver[] resolvers) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.FriendlyUrls.RouteCollectionExtensions.EnableFriendlyUrls (System.Web.Routing.RouteCollection routes, Microsoft.AspNet.FriendlyUrls.FriendlyUrlSettings settings) [0x00000] in <filename unknown>:0
at WebApplication2.RouteConfig.RegisterRoutes (System.Web.Routing.RouteCollection routes) [0x00000] in <filename unknown>:0
at WebApplication2.Global.Application_Start (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
我对此的理论包括:
此外,当我启动XSP或XSP4时,我的终端告诉我如下:
Listening on address: 0.0.0.0 <br/>
Root Directory: /var/www/ms <br/>
Listening on port: 8080 (non-secure)
另外,不要捣乱,告诉我我没有添加足够的信息。请对我有耐心,并问我可以得到什么信息给你,以解决这个问题。我并不是对.NET环境了如指掌,而且是非常新的。
发布于 2015-06-03 12:21:54
这很合理。
如果可能的话,你可以这样做,
https://stackoverflow.com/questions/30582247
复制相似问题