Nov 26

Xaml Browser Application(Xbap) is a part of Wpf that runs inside the browser. Xbap applications combine features of both web and rich window based applications. Generally xbap runs in Sandbox (Partial trust) environment where application has access to limited system resources. In this article, I will discuss various issues I have worked on while developing Xbap application like

  • “Trust Not Granted” error.
  • Installing certificates for full trust Xbap application on client machines.
  • How to use 3rd party dll in your Xbap application etc.

If you are new to xbap, you must know that for using xbap application user must have either Windows vista or .net 3.0 framework on their System.  .net 3.5 also has support for mozilla firefox and WCF service. You can deploy xbap application either in partial trust or in full trust and application will not be installed but cached into client machine. In partial trust you cannot use features like accessing client file system,common dialogs, working with registry etc , so if you publish application with above features in partial trust, you will get “Trust Not granted” error. To resolve this:-

  • Add Unrestricted=”true” into permission set of app.manifest file of your project.
  • Sign the clickonce manifest with certificate and install certificate in client machine. Installation of certificate can also automated, see this link for more info
CertificateJPG
Add Certificate in Trusted Publishers and Trusted Root Store of browser.

When you are using 3rd party dll in your xbap application like OpenNETCF.Desktop.Communication.dll then it will give error “Assembly generation failed — Referenced assembly ‘OpenNETCF.Desktop.Communication’ does not have a strong name”,this is because it is not signed using Certificate which you are using to sign your app.manifest. You can resolve this in 2 ways:-

  • Sign your assembly:-  sn -R “YourAssemblyName.dll” “yourpublickey.snk”
  • Or you can download the source code for that dll , add it in your project and then compile your project.

One more thing you can also add support url in Publish>Options>Support Url where user can navigate in case if there is some error in application which can have information regarding how to manually install certificate among other support information .Hope this post will help developers trying their hand at Xbap applications.

Tagged with:
Nov 24

Windows Communication Foundation (WCF) is designed to offer a manageable approach to distributed computing, broad interoperability, and direct support for service orientation.

WCF is in is in accordance with the Service oriented architecture(SOA) :- This is in accordance with the SOA to support Distributed Computing where WCF client can consume the service, irrespective of the platform, the service is hosted on.

Problem Example.

In this problem, we want to develop a new Hotel Reservation application which can be integrated with Call Center Client Application developed in .Net 2.0 and with the Existing application built in J2EE Server hosted on Non Windows platform.

This new Hotel Reservation application should be able to interact with other Partner applications running on various platforms.

Drawing3-1

WCF addresses this problem

WCF is implemented primarily as a set of classes on top of .Net Framework CLR. Classes are implemented in such a way that clients and services can interact using SOAP. And these two parties can be built using any technology.

Limitation is that the applications to be integrated should explicitly follow Service Orientation.

WCF is composed of 3 parts:

  1. Service class – That implements the service
  2. Host Environment – to host the service
  3. End points – One or more endpoints to which clients will connect.

This article was to describe the essential concepts and building blocks of WCF. For more detail please refer www.msdn.microsoft.com

References:

  1. http://en.wikipedia.org/wiki/Windows_Communication_Foundation
  2. System.ServiceModel
  3. Fundamental Windows Communication Foundation Concepts
preload preload preload