Archive for the 'Network' Category

28
May
09

Building a Simple Silverlight Client

After getting the basic framework for the server going and writing a small chat application, I was able to verify that the server was working correctly by utilizing the PuTTY terminal software. My next step was to write a basic client in Silverlight 2 to replace PuTTY.

Getting Started seemed easy enough.  Just visit the Getting Started section on http://silverlight.net

Here’s a quick rundown of the required steps:

  • Make sure Visual Studio 2008 is updated to SP1
  • Install the Silverlight Tools for Visual Studio 2008 SP1
  • Download the Silverlight Toolkit

Easy enough.  Well, not exactly.  It took a bit to download and update Visual Studio.  Everything else was pretty quick.

Moving on, I started by doing a bit of research on the web with utilizing sockets in Silverlight 2.  It’s important to remember that Silverlight 2 doesn’t contain the full .Net framework and that for security reasons, many API’s are limited or not available.

Sockets proved to be no different.  While the API’s are basically the same, I couldn’t get my sample application to connect to my localhost.  I kept getting an accessed denied error.  After spending many more hours on the web doing some research, it turns out that there are a few restrictions and a special service one must be running to get this to work correctly.

I’ll save you the gory details.  Those can be found on MSDN

http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx

Quick summary:

A service must be listening on port 943 that can serve up a policy file similar to the following:

<?xml version="1.0" encoding ="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from>
        <domain uri="*" />
      </allow-from>
      <grant-to>
        <socket-resource port="4529-4534" protocol="tcp" />
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

The Silverlight 2 application is only allowed to open a connection back to the same server that launched the application.  It will then get the above policy file and use the rules to determine if it has permissions to talk to the server.

Once that hurdle was completed, the application started working like a charm.

 

19
May
09

What’s in a (domain) name

Given all the work going into this project, I feel it is important to make sure that the project has a web presence.  That destination is where people can find the latest sources, help and information regarding the project.

LuaMud – The first thing I did was go and purchase the LuaMud.com and LuaMud.net domain names for the project.  I utilize Network Solutions for managing my domain names as they have been around for quite a while.  Some of my domain names are almost 15 years old now and Network Solutions was really the only game in town when I started.

Fortunately, NetSol was having a special and I was able to book both domain names for the price of one.  Word of caution.  Network Solutions has become very commercial and it can be a bit cumbersome to register a domain name and then be asked if you want one of fifteen services.  After skipping all the propaganda, the domain names were registered.

I host my own domains on my server, so now I needed to update my DNS records to point to my server.  This was easily done from the Network Solutions web site.  I then had to configure my server to be ready to receive connections on these two domains, including setting up a dumb default page with a simple “coming soon…” string for the default page.

Hopefully, by tomorrow, the domain name and updated DNS entries will have propagated across the Internet and the site will be active.

Once the site is active, the arduous task of setting up the site structure will be next.  I suspect I’ll want some form of forums, or perhaps a wiki, or maybe I’ll just link to a 3rd party site that hosts those services.  Looks like another blog entry in the works.




 

May 2012
M T W T F S S
« Jun    
 123456
78910111213
14151617181920
21222324252627
28293031  

Follow

Get every new post delivered to your Inbox.