2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* INSTALL:
	* Makefile:
	* README:
	* server/Makefile: updated.

	* server/MonoWorkerRequest.cs: give credits to Opless (Simon White).
	* server/server.cs: get the port from a config file.
	* server/server.exe.config: configuration file.
	* server/web.config: added appSettings.

svn path=/trunk/xsp/; revision=9390
This commit is contained in:
Gonzalo Paniagua Javier 2002-12-05 03:46:40 +00:00
Родитель 0cc15a42b6
Коммит 8662042a93
9 изменённых файлов: 57 добавлений и 25 удалений

13
INSTALL
Просмотреть файл

@ -1,13 +1,14 @@
Testing XSP
============
Steps for installing the OLD server (only on unix):
make old
...and follow the instructions...
Steps for installing the NEW server (it may not work right now with mono):
Steps for installing the server:
make install
...and follow the instructions...
You can change the listen port from the default (8080) using the configuration
file. Currently you have to change it in server/test/server.exe.config file,
but we recommend keeeping that value synched with the one in
server/test/web.config file because the first one will be deprecated in favor
of the latter.

Просмотреть файл

@ -6,22 +6,14 @@ install: all
make -C test
make -C server install
@echo ""
@echo Now cd to server/test and run: mono server.exe or ./server.exe
@echo Then point your web browser to http://127.0.0.1:8080/
@echo Enjoy!
old:
rm -rf rundir
-mkdir -p rundir/output
make -C test
make -C src
cp src/xsp.exe src/HttpServer/server.exe rundir
cp test/*.aspx test/*.png test/*.xml rundir
cp test/*.dll rundir/output
@echo "-------------"
@echo 'Now cd to server/test and run: mono server.exe or ./server.exe'
@echo 'Then point your web browser to http://127.0.0.1:8080/'
@echo 'You can change the default port (8080) in the server.exe.config file.'
@echo ""
@echo 'Enjoy!'
@echo "-------------"
@echo ""
@echo Now cd to rundir and run: mono server.exe 8000
@echo Then point your web browser to http://127.0.0.1:8000/
@echo Enjoy!
clean:
make -C test clean

6
README
Просмотреть файл

@ -14,8 +14,10 @@ Layout:
Little sample ASP.NET pages
server/
A stand alone web server that works with MS runtime.
We'll be using it to debug/complete our classes.
A stand alone web server that works with mono and MS runtime.
We are using it to debug/complete our classes.
MonoApplicationHost and MonoWorkerRequest can be used to embed
an ASP.NET serve in your application.
Maintainer: gonzalo@ximian.com

Просмотреть файл

@ -1,3 +1,11 @@
2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* server/Makefile: updated.
* server/MonoWorkerRequest.cs: give credits to Opless (Simon White).
* server/server.cs: get the port from a config file.
* server/server.exe.config: configuration file.
* server/web.config: added appSettings.
2002-10-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* MonoWorkerRequest.cs: use a default encoding without markers.

Просмотреть файл

@ -17,10 +17,12 @@ all: server.exe
install: server.exe web.config global.asax
rm -rf test
mkdir -p test/bin
cp server.exe web.config global.asax test
cp server.exe *.config global.asax test
cp server.exe test/bin
cp ../test/*.aspx ../test/*.xml ../test/*.png test
cp ../test/*.dll test/bin
# Remove next line once assembly loading is fixed.
cp ../test/*.dll test
server.exe: $(SOURCES)
$(CSC) $(CSCFLAGS) $(REFS) /out:$@ $^

Просмотреть файл

@ -3,6 +3,7 @@
//
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
// Simon White (simon@psionics.demon.co.uk)
//
// (C) 2002 Ximian, Inc (http://www.ximian.com)
//

Просмотреть файл

@ -8,6 +8,7 @@
//
using System;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Web.Hosting;
@ -24,7 +25,22 @@ namespace Mono.ASPNET
MonoApplicationHost host;
host = (MonoApplicationHost) ApplicationHost.CreateApplicationHost (type, "/", cwd);
host.SetListenAddress (8080);
object o = ConfigurationSettings.AppSettings ["MonoServerPort"];
if (o == null) {
o = 8080;
}
ushort port;
try {
port = Convert.ToUInt16 (o);
} catch (Exception e) {
Console.WriteLine ("The value given for the listen port is not valid: " + o);
return 1;
}
Console.WriteLine ("Listening on port: " + port);
host.SetListenAddress (port);
host.Start ();
return 0;
}

7
server/server.exe.config Normal file
Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="MonoServerPort" value="i088"/>
</appSettings>
</configuration>

Просмотреть файл

@ -4,5 +4,8 @@
<authentication mode= "None">
</authentication>
</system.web>
<appSettings>
<add key="MonoServerPort" value="8080"/>
</appSettings>
</configuration>