This post will not cover advanced topics, such as setting up an SSL certificate or linking with a database. It will just get the barebones ASP.NET server deployed. Note, however, that there are better ways to deploy an ASP.NET MVC service than what this post describes (through fastcgi or mod_mono), so if you're concerned about the RIGHT way of doing things rather than the FAST way of doing things, follow that link.
Structure - Skip if you have a project
Let's make ourselves an ASP.NET MVC application in Monodevelop. If you don't already have monodevelop, you'll need to install the following packages:
- monodevelop
- xsp
- mono-devel
this should create an ASP.NET MVC project that's ready for deploying.
Compiling
Now, it's time to compile the project. This is where a program from mono-devel comes into play. xbuild, an implementation of msbuild (link) is what will generate what the web server runs. The binaries are generated from the .sln or .csproj file itself.
So, open up a terminal and go to the project root, where your project file is.
Then issue the "xbuild" command on your file. This will build all targets for the project, which are Debug and Release by default in Monodevelop
xbuild {file.sln}
Wonderful! If everything in your project passes, you have successfully built your ASP.NET MVC application
Deploying
Now, here are where the tough decisions are made. If you are truly deploying a production service, you should do the following things:
- Secure a webserver, preferably a dedicated virtual machine
- Generate SSL certificates / other cryptographic keys
- Create a user for running your service
- Install the fastcgi-mono or mod_mono (apache) modules and run your service from Apache
However, the quick-n'-dirty way I do it is with xsp4. xsp is yet another pet project of Mono's, that aims to be a fast ASP.NET web server for development. However, there is nothing that says you can't use it in production. It allows SSL certificates, variable ports, etc. so you won't find yourself missing too many features from Apache.
Running xsp4 is dead simple. Go to the build directory (the one under your project root) and run "
xsp4 --port 80"
if all goes well with this, you should have a full-fledged ASP.NET MVC 4 application deployed under Linux, and available on the standard http port. This is, of course, the unsecure, bare-bones deployment with xsp4. But it's a good starting point. To find out how to make xsp4 handle errors, set up your certificates, etc. issue the command
xsp4 --help
Hope you found this useful!
It's very nice post , Thanks For sharing
ReplyDelete.Net Online Course Hyderabad
Smm Panel
ReplyDeleteSmm Panel
iş ilanları
instagram takipçi satın al
hirdavatciburada.com
beyazesyateknikservisi.com.tr
Servis
jeton hile indir
ReplyDeleteGetting Geothermal Engineering Assignment Help from our geothermal engineering assignment services is instructed since it will help you gain the best knowledge and complete your assignment by the timeframe without any challenges. Our Geothermal Engineering experts are PhD experts that have through extensive training to deliver the best assignment solutions to you. We also accept urgent command for the task. Use our Online Assignment Help writing services at your convenience for completion.
Good content. You write beautiful things.
ReplyDeletevbet
hacklink
korsan taksi
taksi
sportsbet
vbet
hacklink
mrbahis
mrbahis
Good text Write good content success. Thank you
ReplyDeletebetmatik
mobil ödeme bahis
slot siteleri
bonus veren siteler
tipobet
betpark
kibris bahis siteleri
kralbet
dijital kartvizit
ReplyDeletereferans kimliği nedir
binance referans kodu
referans kimliği nedir
bitcoin nasıl alınır
resimli magnet
D3BLW6
hatay
ReplyDeletekars
mardin
samsun
urfa
İ8UJGT
https://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
DZSP
شركة تنظيف سجاد بالجبيل mQ12TtjWWS
ReplyDelete