Run a ASP.NET application with mono - asp.net

I will run an asp.net application on a linux system with mono.
The application run on the iis without problems.
I published the application with VS to the IIS.
I put the same content to my linux machine.
The file structure looks like this for the IIS:
How can I start this application on a linux machine with mono?

It depends what you are wanting to do. You could use Mono XSP4, which is a web server distributed with mono (primary use is for debug and therefore has limitations but it will run your site).
You can find installation instructions on the mono project web site (http://www.monodevelop.com/download/linux/). The package on ubuntu is called mono-xsp4 but you will need to add the mono project repos.
Once installed running it is simple:
$ cd /path/to/your/aspnet/project/root
$ xsp4
This will fire it up and run it on the default port with an option to kill it from the command line by hitting enter.
A few options to help:
$ xsp4 --nonstop --port=443 --https --cert=/my/cert.crt --pkfile=/my/key --pkpwd=mykeypwd
Non stop means the server will run without ability to stop using enter. Port is self-explanatory. The rest of the options are about running with HTTPS should you want to do that.
Hope this helps. Happy coding.

Related

ASP.NET Core no HTTPS after publishing to file system and transfer to other machine

Like the title says I publish my ASP.NET Core API to the file system on the PC I developed this application on. If I run this published version HTTPS is working fine. When I transfer the published folder to another machine though, HTTPS is not available anymore. Is there anyone that can help me with this problem?
According to your description, I suggest you could firstly check the https port is opened or not.
netstat -aon
If you find the 443 port is on using. Then you could check the pid. By using task manager.
If the process is not IIS or asp.net core process, you could end that process and restart the asp.net core process. Then it will work well.

.NET CORE under Ubuntu 16.04 - Logging permissions

Is there any special CHMOD or any permission necessary to make an ASP NET MVC under .NET Core 2.0 log? On my windows dev machine the log is generated normally but not on my production machine.
I have an Web App running on a Ubuntu 16.04 DigitalOcean Droplet. Two days after every deploy it starts to throw a NullObjectException that I'm not able to trace properly and stops whenever I restart kestrel, even allowing the developer exception page to be shown (it is not verbose enough cuz I can't see where in my code the last call is made - it only shows native framework calls.

How to deploy a .NET web application in Mono hosted on a Linux Server?

We have a web application we've been writing in VB.NET. We want to get that running within a Linux server, specifically CentOS. I installed Mono version 4.0.1 on the server, as well as xsp and mod_mono. I'm not sure however, how to properly configure the setup to get the application running. We have several .aspx and .dll files. Do I just FTP them over to the server? I think we would need some wrapper executable script to get the application going, since all the websites I have been looking at state that, but I'm not sure how that works for a web application.
If you are using Visual Studio, you should use FTP to deploy your asp.net applications into GNU Linux environment. The IDE would take care of what files has to be deployed in order to get your asp.net application working.
But if you are using MonoDevelop you could use SSH Fuse. Here you have a Getting Started guide about working and deploying ASP.NET apps from MonoDevelop to an Linux environment:
http://www.monodevelop.com/documentation/creating-aspnet-projects/
If you don't have experience with FUSE, don't worry I get this for you
https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh
That's all. You don't need a wrapper as you mentioned before, it is pretty much like and an standard IIS site. Quite easy right? It has to work always that your application and its dependencies are compatible with mono, and indeed with apache or xsp configured correctly.
Cheers!

Deploying asp.net application on windows server

I want to now what is the easiest way to deploy asp.net site to a windows server? Normally we do by uploading files through FTP client.
But as we can checkout repository on linux server and just running "svn up" command though SSH deploys the latest changes, is there any similar way on windows?
Thanks
Web deployment tool is what I use. It can be automated from the command line, and MSBuild can be used to generate deployment packages if you use a CI server. On the simplest level though it supports 1 click deploy from the toolbar in Visual Studio (probably only recommended to development servers).
You can do nearly the same thing on Windows.
Use Remote Desktop Connection to
access the server (this is the
windows counterpart of SSH)
Run "svn
up"
An SVN client doesn't ship with Windows, but the client ports from SilkSVN and CollabNet work just as well as any other.

How to setup PHP Server for Flex app

I am creating a Flex project on my Windows machine but it will deploy on my Linux machine.
For application server type I selected PHP
I click next to go to the next screen.
I am then asked for Web root. I put in /var/www which is the web root of the linux server where the application will be.
I get an error telling me:
The selected web root folder does not exist.
Of course it does not exist on my windows machine, its on my linux machine. It will not let me click finish.
What do I do? do I have to author my Flex app on the same machine that it will be deployed? I hope not since I do not have a Linux version of Flash Builder.
edit:
By the way I am following this tutorial if it matters.
Use the web root on your windows machine. Sounds like Flex wants to know the webroot so it knows where the testing server is. If you do not have a webroot on your windows machine just install Wampserver or XAMPP
You can get away without installing a wamp server. just make sure the Web Root is a folder that acutally exists. then you can ftp the files over the linux machine for testing. Its easier to have the server on the same machine but whatever your preference is.

Resources