Install mono 3.0.2 on a virtual machine running opensuse Linux on Windows azure and test ASP. NET webapi (Mono 3.0.4 is successful)

Source: Internet
Author: User

Microsoft's Windows azure also supports Linux virtual machine services. Below I use azure's Virtual Machine Service to run an opensuse Virtual Machine to test mono 3.0.2 and test ASP. NET webapi fails.

Install system patches and updates:
Azureuser @ mono3:/usr/src/local> sudo zypper update

Install wget
Azureuser @ mono3:/usr/src/local> sudo zypper install wget

Check that the system version is x86_64. Download the corresponding mono 3.0.2 installation package:
Azureuser @ mono3:/usr/src/local> sudo uname-
Linux mono3 3.1.10-1.10-default #1 SMP mon May 28 14:19:15 UTC 2012 (94036a4) x86_64 x86_64 x86_64 GNU/Linux

Wget performs operations on the robots.txton the website. If the robots.txt file contains User-Agent: * disallow:/, wget cannot perform mirroring or downloading. You can use the-e robots = off parameter to bypass this restriction.

Download a file with a specified suffix. For example, download only the file http://download.mono-project.com/archive/3.0.2/linux/x64/.rpmfile:
Azureuser @ mono3:/usr/src/local> sudo wget-Nd-r-L1 -- no-parent-e robots = off-a. RPM http://download.mono-project.com/archive/3.0.2/linux/x64/

Confirm that the mono package has been fully downloaded.
Azureuser @ mono3:/usr/src/local> ls
Ibm-data-db2-3.0.2-0.x86_64.rpm mono-data-sqlite-3.0.2-0.x86_64.rpm
Libmono-2_0-1-3.0.2-0.x86_64.rpm mono-devel-3.0.2-0.x86_64.rpm
Libmono-2_0-devel-3.0.2-0.x86_64.rpm monodoc-core-3.0.2-0.x86_64.rpm
Libmonosgen-2_0-0-3.0.2-0.x86_64.rpm mono-extras-3.0.2-0.x86_64.rpm
Libmonosgen-2_0-devel-3.0.2-0.x86_64.rpm mono-locale-extras-3.0.2-0.x86_64.rpm
Mono-complete-3.0.2-0.x86_64.rpm mono-mvc-3.0.2-0.x86_64.rpm
Mono-core-3.0.2-0.src.rpm mono-nunit-3.0.2-0.x86_64.rpm
Mono-core-3.0.2-0.x86_64.rpm mono-wcf-3.0.2-0.x86_64.rpm
Mono-data-3.0.2-0.x86_64.rpm mono-web-3.0.2-0.x86_64.rpm
Mono-data-oracle-3.0.2-0.x86_64.rpm mono-winforms-3.0.2-0.x86_64.rpm
Mono-data-postgresql-3.0.2-0.x86_64.rpm mono-winfxcore-3.0.2-0.x86_64.rpm

Install all downloaded mono packages
Azureuser @ mono3:/usr/src/local> sudo zypper install *. rpm

Check that mono 3.0.2 is successfully installed.

Azureuser @ mono3:/usr/src/local> mono -- version
Mono JIT compiler version 3.0.2 (tarball wed Dec 5 14:50:07 GMT 2012)
Copyright (c) 2002-2012 Novell, Inc, xamarin INC and contributors. www.mono-project.com
TLS: _ thread
SIGSEGV: altstack
Specifications: epoll
Architecture: amd64
Disabled: None
Misc: softdebug
Llvm: supported, not enabled.
GC: encoded ded Boehm (with typed GC and parallel mark)

Installation of jexus 5.2
Azureuser @ mono3:/usr/src/local> sudo wget http://linuxdot.net/down/jexus-5.2.tar
Azureuser @ mono3:/usr/src/local> sudo tar-zxvf jexus-5.2.tar.gz

For more information, see install mono 2.10.8 and jexus 6.0 in 32-bit and 64-bit centos 5.0.

Then put an ASP. NET web API Project (http://code.msdn.microsoft.com/wpapps/Contact-Manager-Web-API-0e8e373d) to test, webapi project still cannot run, continue to test the next version, you can access this address to see the specific error http://ndon.cloudapp.net/default.htm. Some students in reporting this problem http://mono.1490590.n4.nabble.com/ASP-NET-Web-API-on-Mono-3-0-Could-not-load-type-System-Web-Http-WebHost-HttpControllerHandler-td4657079.html, and later in Mono 3.0.4 on the success.

Reference:

Create a virtual machine running Linux

Use Root Privileges On Linux Virtual Machines In Windows Azure

Running ASP. NET web API services under Linux and OS X

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.