Reputation: 863
I am currently running Ubuntu 14.04 with Digital Ocean and was interested in setting up Mono to work with some .NET code. I am currently new with .NET however, I thought it would be neat to have a server setup online where I could view my code. Not that seeing my changes live on my own computer is bad, but I want to find a place to deploy my projects. I am already paying for hosting and am not interested in spending more money for IIS, so I thought this could be a quick solution. I was told that XSP is useful for momentarily testing your web applications in the browser. XSP does not seem to be working properly for my Linux System. I need some help.
After installing the following packages, I have been publishing these projects locally before adding them through SFTP to my server in its own directory. This directory has been set up with a A record and has been configured using a virtual host file at the following location (/etc/apache2/sites-available).
The following packages were installed on my server:
I have tried to add a MVC4 project to my server however, this has causes some errors on the server. I thought that if I installed OWIN this would fix this particular issue with this MVC4 web application however I still received errors. MVC3 created similar errors. Going into the directory folder and using the command "xsp" and "xsp4" return different errors.
Currently, running a clean web form with nothing added using .NET framework 4.0 results in the following errors:
**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
My theories on this include:
Furthermore, when I launch XSP or XSP4 my terminal tells me the following:
Listening on address: 0.0.0.0 <br/>
Root Directory: /var/www/ms <br/>
Listening on port: 8080 (non-secure)
Also, don't troll and tell me that I have not added enough information. Please be patient with me and ask me what information I can get for you in order to resolve this issue. I don't know everything about the .NET environment and am very new.
Upvotes: 0
Views: 557
Reputation: 63123
That's very reasonable.
If possible, you can do the following,
Use Xamarin repository to install Mono 4 (4.0.1 is latest at writing), www.mono-project.com/download/#download-lin
If Mono 4.0.1 still fails, you might try out .NET Core and ASP.NET 5. Microsoft open sources .NET Core and ASP.NET 5 with full Linux/OS X coverage, so that's going to be the momentum you rely on.
Upvotes: 1