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 Testing XSP
============ ============
Steps for installing the OLD server (only on unix): Steps for installing the server:
make old
...and follow the instructions...
Steps for installing the NEW server (it may not work right now with mono):
make install make install
...and follow the instructions... ...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 test
make -C server install make -C server install
@echo "" @echo ""
@echo Now cd to server/test and run: mono server.exe or ./server.exe @echo "-------------"
@echo Then point your web browser to http://127.0.0.1:8080/ @echo 'Now cd to server/test and run: mono server.exe or ./server.exe'
@echo Enjoy! @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.'
old: @echo ""
rm -rf rundir @echo 'Enjoy!'
-mkdir -p rundir/output @echo "-------------"
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 ""
@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: clean:
make -C test clean make -C test clean

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

@ -14,8 +14,10 @@ Layout:
Little sample ASP.NET pages Little sample ASP.NET pages
server/ server/
A stand alone web server that works with MS runtime. A stand alone web server that works with mono and MS runtime.
We'll be using it to debug/complete our classes. 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 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> 2002-10-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* MonoWorkerRequest.cs: use a default encoding without markers. * MonoWorkerRequest.cs: use a default encoding without markers.

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

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

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

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

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

@ -8,6 +8,7 @@
// //
using System; using System;
using System.Configuration;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Web.Hosting; using System.Web.Hosting;
@ -24,7 +25,22 @@ namespace Mono.ASPNET
MonoApplicationHost host; MonoApplicationHost host;
host = (MonoApplicationHost) ApplicationHost.CreateApplicationHost (type, "/", cwd); 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 (); host.Start ();
return 0; 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 mode= "None">
</authentication> </authentication>
</system.web> </system.web>
<appSettings>
<add key="MonoServerPort" value="8080"/>
</appSettings>
</configuration> </configuration>