Samstag, 24. Januar 2009

I had quite a journey today. I wanted to try the official client against my Java 6 based webservice server. I started it and it wouldn't work :-( After going forward and backward through the wireshark logs I found that the server wasn't closing the connection causing the client not to start. I thought: Let's do it in C# again. So I downloaded Visual Studio 2008 Express for C#. This version was not able to build Web Applications/Web Services. So I downloaded the version for Web Developers. After that I had to learn C# and Web Services in .NET. Both was really simple IMO.

Once I got the WSDL to 99% equality to the originial ones (I only have a nillable="true" where it's not in the originial WSDL) I started looking on how to host this. The "web server" coming with Visual Studio was randomly choosing ports when starting and server only one webservice at once. I don't have (and don't want to have) IIS. I tried XSP from the mono project ... but it was unable to host the service giving me a meaningless error code. So I picked apache with mod_aspdotnet. Took me quite some time to configure it but got it running.

Last but not least fiddeled with the client to use my meta server instead of the official one.

To make a long story short: Here are the instructions on getting your own meta server to run.

1.) Download http://www.megaupload.com/de/?d=XRQJJLD0
2.) Exctract it to C:\GLS (so that a directory C:\GLS\GLS.DataCenterServer exists)
3.) Download and install apache 2.2
4.) Download and install .NET 1.1
5.) Download and install mod_aspdotnet
6.) Append the following lines to the httpd.conf file form apache:

#ASP.NET

LoadModule aspdotnet_module modules/mod_aspdotnet.so
AddHandler asp.net asmx

AspNetMount /GLS.AuthServer "C:/GLS/GLS.AuthServer"
Alias /GLS.AuthServer "C:/GLS/GLS.AuthServer"

Options FollowSymlinks Indexes
AspNet files
Order allow,deny
Allow from all
DirectoryIndex default.htm default.aspx


AspNetMount /GLS.DataCenterServer "C:/GLS/GLS.DataCenterServer"
Alias /GLS.DataCenterServer "C:/GLS/GLS.DataCenterServer"

Options FollowSymlinks Indexes
AspNet files
Order allow,deny
Allow from all
DirectoryIndex default.htm default.aspx


7.) Change the section from
Deny from all
to
Allow from all
(Note that this is an insecure hack!)

8.) Download http://www.megaupload.com/de/?d=1D6BISD0 and extract it into the htdocs folder of your apache
9.) Start apache
10.) Add the following line (containing the IP of your server first) to C:\WINDOWS\system32\drivers\etc\hosts

123.456.789.012 lotroeugls.com ddoeugls.com

11.) Optional: Open the firewall port 80 on your server
12.) Start your client
13.) Wait if it will ask you for a username/password
14.) Enter whatever you like as long as it's both longer than 6 chars
15.) See "[XY] My Own"
16.) Be happy

Downsides right now:
- There is no in game! I repeat: NO INGAME.
- Im totally new to C# so the code could be really, really, really bad
- The only server available right now is hardwired to 192.168.1.145. You can change it to whatever you like.
- I haven't tested to get in game, as there is no in game yet.
- It's easy to break things.
- Not shipping a complete htdocs, news for most languages are missing.

Keine Kommentare:

Kommentar veröffentlichen