ASP.NET Client-Server tool.

This is a tool I whipped up for use in the Microsoft’s Game development Imagine Cup competition. Its a simple one-click application that acts as a localhost server and runs an asp.net application.

Its targeted to imagine cup game development competitors who wishes to use submit their game in silverlight that uses a server that you already have in .net.

The core works ok without any crashes yet. I need to do a few improvements so I can submit my game in 1 package and start the project without navigating to it. Stay tuned for more updates on this little application.

The download is located on the left in a Box.net widget. The file is called XorianaServer.exe. Yes Our game is going to be called Xoriana.

Requirements:

My machine is vista sp2 and I’ve tested it on a windows 7 also. But this is what I think it requires:

.NET 3.5 SP1.

Official Description:

Xoriana Server is a local client server that can run ASP.NET 3.5 and under projects the same way visual studio’s internal server does.  (WebDev.WebServer.exe) There are many servers like this around including those used by commercial 3rd party control creators such as Telerik, ComponentOne and Infragistics. This is where I got my idea from.

Instructions:
Start XorianaServer.exe.
Browse to the root path of where you project is located. That is for example, the folder that Default.aspx is located.
There is a default port and virtual path set, if they are already in use, you can change them.

License:
Anyone is free to use this tool, distribute it or whatever.

Future Updates:

  1. GUI tuneup, icons, etc.
  2. Parameter Passing.
  3. Minimize to System Tray.
  4. Memory Optimization. (This currently uses 23MB+ Ram)

Merged Search Textbox and Button

soon to come

Rounded Container Corners

Soon to come…

Forming Game Development Team Jamaica – Imagine Cup 2010

Hello,

I am trying to form a team located in Jamaica for the Imagine Cup 2010 Game Development Competition. We do not have to be at the same university or location. If you feel you can step up to the challenge and join my team, leave a comment with contact information and what skills you can offer which is listed below for each person. We shall meet at least once a month, work across the internet and telephone calls, we all should have internet access 24/7 with access to high speed internet at least 1-2 hour a day.

I am a .NET developer with relevant experience in listed technologies for the game i have in mind below.

  • C# – my primary .NET language
  • Silverlight (XAML, 2D, 3D, Animation, UI structure)
  • Windows Azure (live services, sql services, .NET services)
  • Live Mesh
  • WCF
  • SQL Server 05/08 – Data connections with ADO.NET Entity Framework and LINQ

I am looking for 3 other people with the following skills:

Person 1: (Frontend, User Interaction, User Input person)

  • Versed in latest .NET Framework. (preferably C#)
  • Silverlight. (Graphics, 3d, 2d, hit testing, animation great HCI skills)
  • XNA skill is a plus.
  • Music Dev is a plus.
  • 3D programming skills is a plus.

Person 2: (Backend, server, algrithms person)

  • Versed in latest .NET Framework. (preferably C#)
  • Silverlight. (Algorithms)
  • WCF. (Database interaction, ADO.NET Entity Framework or any LINQ experience required)
  • XNA skill is a plus.
  • Music Dev is a plus.

Person 3: (Graphics, Presentation Person)

  • High level of HCI skills.
  • Graphics (2d texturing, 3d modeling, great conceptual design skills)
  • Must be extremely good at presenting and marketing (advertising)
  • Able to break down complex solutions and problems into simple presentable information.

The key for this team to be sucessfull is DEDICATION meaning everyone will be pulling their own weight, having fun developing a game in an online team environment and have the will to learn and gain knowledge of emerging technologies.

Imagine Cup 09 results

We did not make it to the top 12. I think we got what we worked for so judging was fair and square. What ever the team put out is what we got back. The results sourced from the imagine cup blog is:

Software Design

First place: Romania — SYTECH

Second place: Russia — Vital Lab

Third place: Brazil — Virtual Dreams

Embedded Development

First place: South Korea — Wafree

Second place: China — iSee

Third place: Ukraine — Intellectronics

Game Development

First place: Brazil — LEVV It

Second place: United States — Epsylon Games

Third place: United Kingdom — Sanquine Labs

Robotics and Algorithm

First place: Czech Republic — Lukáš Perůtka

Second place: Canada — Byron Knoll

Third place: China — Lin Fuming

IT Challenge

First place: Romania — Cosmin Ilie

Second place: China — Wu Chang

Third place: Bolivia — Miklos Cari Sivila

MashUp

First place: United States — CURIOS

Second place: Poland — Monastery of Innovations

Third place: Singapore — PlanetKY

Photography

First place: Croatia —Voodoo Delirium

Second place: Singapore — Woolgathering

Third place: Japan — Terada

Short Film

First place: United Kingdom — Fulham Four

Second place: India — ChennaiCoolers

Third place: Ukraine — Just4Fun

Design

First place: Brazil — Willburn

Second place: United States — eXchangeFun

Third place: France — Paindepices

Interoperability Award:

First Place: Brazil — Proativa Team

Second Place: Poland — Fteams

Third Place: Jordan — ECRAM

Unlimited Potential Design for Development Award:

First Place: Malaysia — COSMIC

Second Place: China — Unique Studio

Third Place: Malaysia — Capricorn

Unlimited Potential MultiPoint Education Award:

First Place: India — Trailblazers

Accessibility Award:

First Place: Saudi Arabia — ATST

Accessible Design Award:

First Place: United States — eXchangeFun

Parallel Computing Award:

•First Place: India — Biollel

Tablet Accessibility Award:

First Place: United States — Auratech

Second Place: Brazil — IC-UNICAMP

Live Services Award:

First Place: France — Help’Aged

Second Place: Serbia — BrainWave

Windows Mobile Award:

First Place: Croatia — Team Explorer

Second Place: Indonesia — Big Bang

Third Place: Brazil — Virtual Dreams

H.E. Mrs. Suzanne Mubarak Special Award:

First Place: Poland — kAMUflage

Second Place: Egypt — Big Buddy

Third Place: France — WikiChildProtect

Preparation for Imagine Cup 09 Finals

Today is sunday, the finals is Saturday and I’m still coding. No presentation script has been written for the demo as yet. We have our storyboard and outline for the demo. I need to upload our Azure project to the live windows azure server and our silverlight application into the live mesh and do some testing against those.

What needs to be done for finals:

  1. Complete local and live testing.
  2. Implement Crop rotation in the map.
  3. Configure map backend to work with elastic farming logic.
  4. Hook up live data to Farm and Crop Tab.
  5. Complete Crop Adding for Advanced.
  6. Setup PDA alerts tab with Mesh.

All of this can be done in the next 3 days if i do not sleep… else, I’ll be coding on the plane to Egypt …

Silverlight/WPF – Binding object properties to multiple elements

Technical Level: Beginner

Problem: Soon to come….

Generating Silverlight WCF Proxy Class Manually

Technical Level: Intermediate

Problem: For some developers, when using visual studio’s built in service reference proxy generator tool gives an error when generating the client code. This is when I try to add a service reference in the solution explorer of visual studio. Usually it would say “Not support relative URI” when it reaches the section to generate the proxy class. This problem occurred in silverlight 2.0 beta, 2.0, 3.0 beta development projects for 2 different machines.

Required Tools:

  • Silverlight Tools and SDK (Works with Silverlight 2.0 +)
  • Visual Studio

Solution: My solution only works if visual studio partially creates the webservice in the solution explorer. Meaning if you browse to the physical location of the project and view the Webservice folder in the Service References folder created by visual studio, there is a file called “Reference.cs” there.

If visual studio does not create anything at all for you, you can create this file and paste in the generated code(method shown below). You can add this file anywhere in your project.

  1. First of all, start the WCF service. Mine is hosted at “http://localhost:81/CME/CMEService.svc”.
  2. Go to this directory “C:\Program Files\Microsoft SDKs\Silverlight\v3.0\Tools”  and make sure “SlSvcUtil.exe” exists. If that directory does not exist, just browse the silverlight directory for the SlSvcUtil.exe program. This tool generates the client/proxy code from the wsdl of your WCF Service.
  3. At the same directory as the tool, make sure that “System.Windows.dll” exists and also make a copy to the root of the C:\ drive. If you do not have this dll, search for it in the .NET folder or do a search of Program Files folder.
  4. Open command prompt ( Press Wnd + R then type ‘cmd’ ).
  5. For ease of use, change your directory to the folder of your tool, eg “cd C:\Program Files\Microsoft SDKs\Silverlight\v3.0\Tools”
  6. Now to generate the service reference code. Type in command prompt {slsvcutil {Location of my wcf service} l /edb /namespace:”*,{Namespace in client project}” /ct:System.Collections.Generic.List`1 /r:”c:\System.Windows.dll”}. For eg. –  slsvcutil http://localhost:81/CME/CMEService.svc?wsdl /edb /namespace:”*,RAINLight.CMEWService” /ct:System.Collections.Generic.List`1 /r:”c:\System.Windows.dll”. You can change your default list type to ObservableCollection or any Generic type you want to be created as data is received from the service.
  7. A c# file with the generated code will be created in the folder of the tool with the name of the WCF Service. eg. “CMEService.cs”. Copy the contents of this file into the “Reference.cs” file in your project or the file you manually created to store this proxy class.

Conclusion: I have no idea why visual studio’s tool wont work and neither do I have any idea how to fix it. This problem shows up on 2 seperate machines with each having their own installation files of visual studio, silverlight tools straight from Microsoft’s website.

Test Windows Mobile Device Against Localhost Webservice

Technical Level: Intermediate

Problem: To test the emulation of Windows Mobile against a web service hosted in localhost has been a problem for many developers. I have yet to find an official method of using the device emulator in visual studio to connect to a localhost web service.

The problem occurs because if you add a web service to the mobile device project in visual studio, it sets the reference URL to localhost. This will tell the application to connect to the localhost of the mobile device, whether real or emulated. Using the computer name may not work for many people because visual studio’s test environment will not allow calls from outside to call to the development’s localhost.

Required Tools: These are tools that I have worked with to get this to work.

  • Windows Vista
  • Visual Studio 2008
  • Windows Mobile SDK
  • Fiddler 2.

Solution: Assuming you have all of the above tools installed. We will add a proxy to the mobile device connection settings. We will get around to setting up fiddler to work with our mobile device.

Visual Studio

A specific port will need to be set on the Visual Studio Development Server to work correctly with fiddler. In the solution explorer pane, right click the web project that will be hosting your web service and click properties.

Visual Studio Web project

Visual Studio Web project

In the Web Tab, under Servers, select the Specific port radio button, and select a port. I am using port 81 for my development purposes.

Visual Studio Web Property

Visual Studio Web Property

In the solution explorer where you have your mobile device project, right click the web service you added, go to properties and in the Web Reference URL block, place a dot before the colon of the port number. This dot allows fiddler to intercept the messages sent.

Mobile Web Service Properties

Mobile Web Service Properties

Secondly, we are going to change the URL in proxy located in the Reference.cs generated by visual studio. Back in the solution explorer, right click the web service, click view in object browser. I have my client side projects in another solution that I am working on so the image may differ from previous solution image.

Web Service Solution Object

Web Service Solution Object

Next we have the object browser showing up. Find a generated object, right click it and select Go To Defintion. This takes you to the Reference.cs generated for that specific web service.

Visual Studio Mobile Project Object Browser

Visual Studio Mobile Project Object Browser

At the very top of the Reference.cs file where the Service class is created, there is the URL of the web service assigned to a Url property. Place the dot after the localhost, before the colon for the port and save the file. DO NOT EDIT ANY OTHER PART OF THIS FILE. If you update the service reference, you will need to come back here and change the URL manually again.


namespace RAINMobile.RMEWService {
 public partial class RMEService : System.Web.Services.Protocols.SoapHttpClientProtocol {

 /// <remarks/>
 public RMEService() {
 this.Url = "http://localhost.:81/RME/RMEService.svc";
 }

Mobile Device Emulator

If you have not cradled or connect the device to the desktop, run the tool Device Emulator Manager which is found in visual studio, go to the device that you want to test on, right click it and select cradle. We now need to change the proxy of the emulated device that will have a connection to our desktop operating system via the  tool. Change the proxy to 169.254.2.2:8888 in the device.

Mobile Device Internet Proxy

Mobile Device Internet Proxy

Fiddler

We are going to add a custom script to re-route calls to the fiddler proxy to the machine’s localhost. In the toolbar, go to Rules then Custom Rules. The script will open, search for this function: “static function OnBeforeRequest(oSession: Session)”. In that function, add this piece of code:

if (oSession.host=="169.254.2.2:81")
{
oSession.host="127.0.0.1:81";
}

The 81 signifies the specific port set for the visual studio development server. If you change the port in visual studio, you will need to change it in fiddler script also.

Conclusion

Until an official solution to this problem is released by microsoft or the mobile device development team, this is one of the methods used in connecting the emulated windows mobile application to a webservice hosted in localhost.