Posts

Create Silverlight Enabled Service

Image
WCF Services are easy to called in Silverlight, however there are few tweaks are required to change a Normal WCF Service to silverlight enabled WCF Service. Open Visual Studio 2008. Create New Project Select WCF WCF Service Library as shown in figure below  Open App.Config and change below line with basicHttpBinding" contract="SilverlightEnabledWebService.IService1"> Now Add below in Service.cs using System.ServiceModel.Activation; Add following line just above the the class start     [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] Complete Code for Interface using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Activation; using System.Text; namespace SilverlightEnabledWebService {     // NOTE: If you change the interface name "IService1" here, you must also u...

Auto Update in Install4J - Software Update with Silent Version Check

Image
When we have a programm running on multiple client PC and we need an Auto Update. For Java Install4J provides Installer which can be used on on any platform. It is easy but very difficult as no clear help is available. AutoUpdate.java /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package autoupdater; import com.install4j.api.launcher.*; import com.install4j.api.update.*; import com.install4j.api.Util; import javax.swing.JOptionPane; /** * * @author rehmanm */ public class AutoUpdate { static AutoUpdate AutoUpdateObj; public static AutoUpdate getInstance(){ if (AutoUpdateObj ==null) AutoUpdateObj = new AutoUpdate(); return AutoUpdateObj; } private AutoUpdate(){ } public void Update(){ try { JOptionPane.showMessageDialog(null, "Download Location " + Util.getUserHome()); JOptionPane.showMessageDialog(null, "Possible Entry : " + UpdateCh...

Ping For All OS

The Application is written in Java and provide the time in MS and runable on all Major OS including Windows, MAC and Linux . public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Ping p = new Ping(); System.out.println((int)Float.parseFloat(p.DoPing("XX.XX.XX.XX"))); } } class Ping{ public String DoPing(String URL) { String Result = "0"; String OS = System.getProperty("os.name"); String pingCmd = "ping "; String pingResult = ""; if (OS.indexOf("Windows") != -1){ pingCmd = pingCmd + "-n 1 -l 64 "; } else { pingCmd = pingCmd + "-c 1 -s 64 "; } pingCmd = pingCmd + URL; System.out.println(pingCmd); try { Runtime r = Runtime.getRuntime(); Process p = r.exec(pingCmd); BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) { //System.ou...

Problem in Importing Excel file in SQL Server 2005 / Problem in Integeration Service

Issues in importing Excel file I faced following issues when I tried to import Excel file or in the creation of SSIS package from Visual Studio 2005 for SQL Server 2005. This issues pertained to the problem in Integeration services. TITLE: Microsoft Visual Studio ------------------------------ Registration information about the Data Flow task could not be retrieved. Confirm that this task is installed properly on the computer. ------------------------------ ADDITIONAL INFORMATION: TaskHost "{C3BF9DC1-4715-4694-936F-D3CFDA9E42C5}"' is not installed correctly on this computer. (Microsoft.DataTransformationServices.Design) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50727.42&EvtSrc=Microsoft.DataTransformationServices.Design.SR&EvtID=TaskHostNotInstalled&LinkId=20476 ---------- TITLE: SQL Server Import and Export Wizard ------------------------------ An error occurred which the SQL Server Integ...