Tuesday, December 11, 2007

.NET Web Service Method Overloading

Some time developers required web service method to Overloading using WebMethodAttribute.MessageName Property and WebServiceBinding.

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.None,EmitConformanceClaims=true)]


public class Service : System.Web.Services.WebService
{
public Service ()
{
//Uncomment the following line if using designed components
//InitializeComponent(); Description="Hello work for world",
}

[WebMethod(Description="Hello work for world.",MessageName="Pavan")]
public string HelloWorld()
{
return "Hello World";
}

[WebMethod(Description="Hello work for world.",MessageName="Pavan Pareta")]
public string HelloWorld(string name)
{
return "Hello India " + name;
}
}

Tuesday, November 20, 2007

Registry entry in Pocket PC 2003

.NET Compact framework Application's Registry Entry in Pocket PC 2003 Device.
The registry store the general information of your application, if you want to add some custom registry, you can use .ini file, which has a Add Reg Sections.


Like the below example of "app.inf" file, after building Cabinet (.CAB) file:

[Version]
Signature="$Windows NT$"
Provider="Company Name"
CESignature="$Windows CE$"

[CEStrings]
AppName="Application Name"
InstallDir=%CE1%\%AppName%

[CEDevice]
VersionMin=3.00VersionMax=4.99

[DefaultInstall]
CEShortcuts=ShortcutsCopy
Files=Files.Common

[DefaultInstall.ARMV4]
CopyFiles=Files.ARMV4CE
SetupDLL=vsd_setup.dll

[DefaultInstall.ARM]
CopyFiles=Files.ARMCE
SetupDLL=vsd_setup.dll

[DefaultInstall.SH3]
CopyFiles=Files.SH3CE
SetupDLL=vsd_setup.dll

[DefaultInstall.MIPS]
CopyFiles=Files.MIPSCE
SetupDLL=vsd_setup.dll

[DefaultInstall.X86]
CopyFiles=Files.X86CE
SetupDLL=vsd_setup.dll

[DefaultInstall.WCE420X86]
CopyFiles=Files.WCE420X86CE
SetupDLL=vsd_setup.dll

[DefaultInstall]
AddReg = RegSettings
[Strings]reg_path = Software\Company\AppName
[RegSettings]HKLM,%reg_path%,,0x00000000,alpha
HKLM,%reg_path%,test,0x00010001,3
HKLM,%reg_path%\new,another,0x00010001,6


After save "app.inf" file then build cab file using (BuildCab.bat) batch file, then cab file will completing after executed (BuildCab.bat) batch file.

For more information of registry or. inf file:
Please refer msdn.

http://msdn2.microsoft.com/en-us/library/ms924764.aspx
http://msdn2.microsoft.com/en-us/library/ms924764.aspx
http://msdn2.microsoft.com/en-us/library/ms938375.aspx

Thanks for your time :)