Trang chủ EDA | Doman - Hosting | Siêu thị trực tuyến

Giúp em cách tạo localhost asp với!

Thảo luận về các gói ứng dụng hỗ trợ lập trình trên Ubuntu: gPHPEdit, Bluefish, MySQL...

Giúp em cách tạo localhost asp với!

Gửi bàigửi bởi nguyenquocthanh » Thứ 5 22 Tháng 5, 2008 3:29 pm

làm thế nào để tạo được localhost asp để test web trên ubuntu?
nguyenquocthanh
 
Bài viết: 66
Ngày tham gia: Thứ 7 17 Tháng 5, 2008 5:47 pm
Đến từ: http://bacgiangmedia.com

Re: Giúp em cách tạo localhost asp với!

Gửi bàigửi bởi truongsinh » Thứ 6 23 Tháng 5, 2008 6:38 pm

Bạn cài đặt Monodevelop và XSP. Dưới đây là một bài viết khá hay về nó:

What's XSP

XSP is a “light-weight web server” capable of hosting and serving ASP.NET applications. It is written using C#, making extensive use of the classes in the System.Web namespace.XSP web server runs on both the Mono runtime and also on the .NET runtime.

Now we are going to take a look how to install XPS and mono for ASP.NET applications and testing this setup

First thing is you need to install mono

Install mono in Debian

If you want to install mono in your debian system you need to run the following command

#apt-get install mono mono-gmcs mono-gac mono-utils monodevelop monodoc-browser monodevelop-nunit monodevelop-versioncontrol

You can can see in this screen which will install all the required packages

Hình ảnh

Install mono in Ubuntu

If you want to install mono in your Debian system you need to run the following command

sudo apt-get install mono mono-gmcs mono-gac mono-utils monodevelop monodoc-browser monodevelop-nunit monodevelop-versioncontrol

Install XSP Web server in Debian

If you want to install ASP.NET2.0 version use the following command

#apt-get install mono-xsp2 mono-xsp2-base asp.net2-examples

If you want to install ASP.NET1.0 version use the following command

#apt-get install mono-xsp mono-xsp-base asp.net-examples

This will install all the required development environment and sample applications

Install XSP Web server in Ubuntu

If you want to install ASP.NET2.0 version use the following command

sudo apt-get install mono-xsp2 mono-xsp2-base asp.net2-examples

If you want to install ASP.NET1.0 version use the following command

sudo apt-get install mono-xsp mono-xsp-base asp.net-examples

This will install all the required development environment and sample applications for ASP.NET

Test ASP.NET Applications

We have already installed sample applications

If you want to run ASP.NET 2.0 application you need to go to /usr/share/asp.net2-demos/ run the following command

#xsp2

This will start the XSP with ASP.Net 2.0 application

xsp2
Listening on port: 8080 (non-secure)
Listening on address: 0.0.0.0
Root directory: /usr/share/asp.net2-demos
Hit Return to stop the server.
Application_Start

Now you need to point your web browser to http://localhost:8080/

You should seen the following screen

Hình ảnh

If you want to run ASP.NET 1.0 application you need to go to /usr/share/asp.net-demos/ run the following command

#xsp

This will start the XSP with ASP.Net 1.0 application

xsp
Listening on port: 8080 (non-secure)
Listening on address: 0.0.0.0
Root directory: /usr/share/asp.net-demos
Hit Return to stop the server.
Application_Start

Now you need to point your web browser to http://localhost:8080/

You should seen the following screen

Hình ảnh

If you want to know more options available for XPS check here

Possible errors

If you get the following error when you point http://localhost:8080/

Error Message: HTTP 404. File not found /usr/share/asp.net2-demos/index2.aspx

Solution

You need to copy the index.aspx to index2.aspx

For Debian Users

#cp /usr/share/asp.net2-demos/index.aspx /usr/share/asp.net2-demos/index2.aspx

Hình ảnh

For Ubuntu Users

sudo cp /usr/share/asp.net2-demos/index.aspx /usr/share/asp.net2-demos/index2.aspx
truongsinh
 
Bài viết: 108
Ngày tham gia: Thứ 6 07 Tháng 3, 2008 9:53 pm

Re: Giúp em cách tạo localhost asp với!

Gửi bàigửi bởi namseo53 » Thứ 4 07 Tháng 4, 2010 7:14 pm

bạn đang học lập trình ASP đúng không muốn có một hót thì bạn cài một phần mền có trong win cua bạn ISS
Sàn mua bán xe sắp khai trương tháng 11-2010 (Liên hệ hợp tác: kenhxe@yahoo.com)
namseo53
 
Bài viết: 8
Ngày tham gia: Thứ 7 20 Tháng 3, 2010 9:53 am


Quay về Lập trình - Cơ sở dữ liệu

Ai đang trực tuyến?

Đang xem chuyên mục này: Không có thành viên nào đang trực tuyến11 khách

cron