in

WPF Design and Development

IdentityMine Team Blogs

David Kelley

A day in the life of a humble software architect... doing C#, WPF, Silverlight, Legos, Fuzzy Logic AI and/or whatever is the latest and greatest or more importantly the coolest techo mumbo jumbo...

Silverlight 1.1 and WCF

We have a new Intern here that started here recently (Devin Brown) and we have him working on Silverlight so he can help with some of our up coming Silverlight projects.  One of the tasks was to demonstrate Silverlight 1.1 to WCF.  In this case we have a simple WCF Service library and we front this in a our web application by starting the service in the Global.asx so that the service is actually tied to the IIS application state of our web app.  So todo this we included the hose class and in the global asx we have a simple block that looks like this:


        protected void Application_Start(object sender, EventArgs e)
        {
            WcfHost.StartService();
        }

 This gets our service started and then the calls are fronted by an asmx in the same wbe application.  In the sample Devin did we have a number of bits but the important part is in the Silverlight code behind file (see 'Page.xaml.cs' )where we create a reference to the local web service and we call a method and place the output into a textblock in our xaml page.  quick, dirty and simple.  Good Job Devin.  See the attached project.

 

Comments

No Comments

About david.kelley

David for the past 10 years has focused on distributed application design and emerging Microsoft technologies on the web. Having helped design and build some of the largest systems for companies like Microsoft, Onyx Software, Saltmine, Giordanous Group and more and of course our favorite company Identitymine, he has been on the leading edge of applying the latest tech to real world business problems. David’s technology breadth includes everything from SQL Server to Windows/WCF and Silverlight. David’s accomplishments also include developing new technologies such as self editing XML files and related XML technologies to fuzzy logic systems and advanced web user interface design.
© 2007 IdentityMine, Inc.
Powered by Community Server (Commercial Edition), by Telligent Systems