Archive for category Technology

Authentication against custom Table In Silverlight4 Using RIA Service

In my previous article we had discussed about Data Binding ,Validation,Exception Handling ,Handling Multiple table and many more.But the first step in a business application deals with Authentication.Surely nobody wants data to be meshed up by an anonymous user so in this article we are going to implement Authentication to SOI (States of India) application.This post is restricted to FormsAuthentication model only.Also i am going to skip Authorization and due for next article. Read the rest of this entry »

, ,

Leave a comment

Could not load the assembly , assembly may have been downloaded from the Web.

When you download a Silverlight project including the assemblies and try to run then the build failed and throws an exception.

image004

Read the rest of this entry »

Leave a comment

States of India as Community Sample on Silverlight.net

It is a nice feeling to be showcased on silverlight.net ,a Microsoft managed Silverlight forum.Now the SOI application is on silverlight.net as a community sample.

http://www.silverlight.net/community/samples/silverlight-samples/states-of-india-37702/

Read the rest of this entry »

Leave a comment

Data Aggregation Using Presentation Model in RIA and Silverlight 4

My earlier post was about the basic CRUD operations on entities with relation .We had discussed about creating simple association and querying as well as Invoking CRUD operation onto them.As i have mentioned there ,here in this article we will have an in-depth look into Presentation Model and its mode of handling related multiple entities.

Introduction , What is Presentation Model ??

Presentation Model deals with data from more than one entities which are related to each other and projecting it as one entity. Read the rest of this entry »

, ,

Leave a comment

Performing CRUD on Relational Data (Multiple table) using RIA in SL4

Introduction

Lots of article demos are available for RIA services but most of them are based on one table without any relational constraint. However, most of the real-time application revolves around data from multiple table and CRUD operations against them.Let’s check one of the queries I received from a reader.

“My issue is. like i have sales Invoice On save button I want to Update Sales master detail table which i can do from ria & after saving i want to update inventory table too . Is there any option i can call update inventory table using this entity.”

Basically the above query seems to be involve RIA service operation with multiple table .Well this post I am going to discuss about Relational/Hierarchical data and CRUD operation against them using RIA.So its time to add some more functionality to the SOI application . Read the rest of this entry »

, , , ,

3 Comments

Converting XML data to CLR object using XmlSerializer

My last Post (Consuming Webservice from Silverlight) was all about accessing a web service/api from Silverlight , there i described how to consume an external api ,with a sample from GeoName web services .As i had concluded there ,this post is the continuation of previous .Here i am going to demonstrate How to convert the result output , which is in XML, to CLR object and of course using it as datasource in SL app.

Source Code and Links

GeoSearch Live Link – : GeoSearch

Download SourceCode -: GeoSearch Read the rest of this entry »

Leave a comment

Consuming External WebService from Silverlight Application

While exploring Map api integration with SOI application, i felt that a separate post on consuming external web services from SL application worth a write.As we know services can be SOAP based (WCF bases)or can be REST (Simple HTTP ) based on the implementation technology.As you goggle you will find a lots of services from different providers , here (webservice directory) .May be some are useful saving lots of time some may look fancy.

Silverlight can access some services directly for e.g HTTP/REST type and some using proxy for SOAP .Well before  describing the process lets have a look at web service in Silverlight.Services hosted by various host comes with various security policies .For e.g yahoo allows access to the services to authenticated request only and authentication can be achieved using OpenID,Oauth and Hybrid (Yahoo API Auth.) , similarly Google services .These external service administrator  creates policy files to restrict the request from other domain with out proper authentication. Read the rest of this entry »

Leave a comment

Data Binding in Silverlight with RIA and Entity Framework – Part 3 (Validating Input Data)

Validation is a integral part of software development.In Silverlight validation approach has been changed or you can say evolved from version 2.So this post will highlight the options available for validation with continuation of StatesOfIndia application

Article Series

Source Code and Demo Link

Hosted Application : Live Sample

Source Code : StatesOfIndia_WithValidation

Read the rest of this entry »

, ,

11 Comments

Validating Textbox on Lost Focus in RIA Service,Silverlight4

While working on my post on “Data Binding in Silverlight with RIA and Entity Framework – Part 3 (Validating Input Data)” , a series of article on RIA Services   , i came across a situation where i wanted to validate my textbox control on a particular event.For e.g on LostFocous.As we know the the validation fire only when the source property value gets changed and the entity gets updated. But you might have known that the Textbox TextProperty gets updated on LostFocus (MSDN Link) .This is the default behaviour but it does not work with RIA Service in Textbox.Baring teeth smile

And most of the time the validation on the client side need to be triggered explicitly on our demand.For e.g refer my StatesOfIndia Application as the user provides some value at state Name and moves on ,  the validation need to be fired.

So to implement the validation on LostFocus of StateName textbox follow the steps bellow ,

Make Sure you have Implemented the validation Rule at Model Entity Member

In the Metadata file i have added Required Attribute for the statename.

image

Change the UpdateSourceTrigger of Textbox

Then change the UpdateSourceTrigger property of the binding of the Textbox to explicit mode.

image

Update the Source at your desired event

As i  want to force updation of data as well as fire validation on lost focus event , so i am going to get the binding expression  of the control and update its source.

  1. private void txtStateName_LostFocus(object sender, RoutedEventArgs e)
  2. {
  3. System.Windows.Data.BindingExpression bexpress = txtStateName.GetBindingExpression(TextBox.TextProperty);
  4. bexpress.UpdateSource();
  5. }

As soon as the property gets changed the validation will fire .

This is for now , soon i will post with a detailed article on validation.Stay Tuned Smile

,

Leave a comment

Data Binding in Silverlight with RIA and Entity Framework – Part 2 (Updating Data)

This is continuation of my earlier post where we discussed How to fetch And display data from database using DomainServiceContext via entity model.Here in this post we will take the StatesOfIndia application further ,where it will accept the state information to be modified as well as accept new state as addition.

Article Series

Source Code and Demo Link

Hosted Application : Launch StatesOfIndia

Source Code : StatesOfIndia Read the rest of this entry »

, ,

3 Comments

Design a site like this with WordPress.com
Get started