Monday, January 24, 2011
Drop down in XSLT
Labels:
Drop down in XSLT
Thursday, July 29, 2010
WCF Client Sample code
static void Main(string[] args)
{
using (WCFServiceClient client = new WCFServiceClient("WSDualHttpBinding_IWCFService"))
{
string output = client.MyOperation1("Manoj");
Console.WriteLine(output);
DataContract1 dc = new DataContract1();
dc.FirstName = "Shankar";
dc.LastName = "Mahadevan";
output = client.MyOperation2(dc);
Console.WriteLine(output);
Console.ReadLine();
}
{
using (WCFServiceClient client = new WCFServiceClient("WSDualHttpBinding_IWCFService"))
{
string output = client.MyOperation1("Manoj");
Console.WriteLine(output);
DataContract1 dc = new DataContract1();
dc.FirstName = "Shankar";
dc.LastName = "Mahadevan";
output = client.MyOperation2(dc);
Console.WriteLine(output);
Console.ReadLine();
}
Labels:
WCF Client Sample code
Configuration of WCF in Host
Service.cs
[OperationContract]
[System.ServiceModel.Web.WebGet(UriTemplate = "/MyOperation/MyOperation1/{myValue1}", ResponseFormat = System.ServiceModel.Web.WebMessageFormat.Json, BodyStyle = System.ServiceModel.Web.WebMessageBodyStyle.WrappedResponse)]
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, IncludeExceptionDetailInFaults = true)]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
Generating a proxy for the client
svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:2409/WCF_Host/Service.svc
[OperationContract]
[System.ServiceModel.Web.WebGet(UriTemplate = "/MyOperation/MyOperation1/{myValue1}", ResponseFormat = System.ServiceModel.Web.WebMessageFormat.Json, BodyStyle = System.ServiceModel.Web.WebMessageBodyStyle.WrappedResponse)]
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, IncludeExceptionDetailInFaults = true)]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
Generating a proxy for the client
svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:2409/WCF_Host/Service.svc
Labels:
Configuration of WCF in Host
Configuration of webHttpBinding and wsDualHttpBinding
< ?xml version="1.0"?>
< configuration>
< system.serviceModel>
< serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
< behaviors>
< endpointBehaviors>
< behavior name="webHttpEnablingBehavior">
< webHttp />
< /behavior>
< /endpointBehaviors>
< serviceBehaviors>
< behavior name="webHttpEnablingBehavior">
< serviceMetadata httpGetEnabled="true"/>
< serviceDebug includeExceptionDetailInFaults="true" />
< /behavior>
< /serviceBehaviors>
< /behaviors>
< services>
< service name="WCFService" behaviorConfiguration="webHttpEnablingBehavior">
< endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
< endpoint address="" binding="webHttpBinding" bindingConfiguration="default" contract="IWCFService" behaviorConfiguration="webHttpEnablingBehavior" />
< endpoint address="MyOperation" binding="wsDualHttpBinding" bindingConfiguration="default" contract="IWCFService" />
< /service>
< /services>
< client />
< bindings>
< webHttpBinding>
< binding name="default" />
< /webHttpBinding>
< wsDualHttpBinding>
< binding name="default" />
< /wsDualHttpBinding>
< /bindings>
< /system.serviceModel>
< system.web>
< compilation debug="true"/>
< /system.web>
< /configuration>
< configuration>
< system.serviceModel>
< serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
< behaviors>
< endpointBehaviors>
< behavior name="webHttpEnablingBehavior">
< webHttp />
< /behavior>
< /endpointBehaviors>
< serviceBehaviors>
< behavior name="webHttpEnablingBehavior">
< serviceMetadata httpGetEnabled="true"/>
< serviceDebug includeExceptionDetailInFaults="true" />
< /behavior>
< /serviceBehaviors>
< /behaviors>
< services>
< service name="WCFService" behaviorConfiguration="webHttpEnablingBehavior">
< endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
< endpoint address="" binding="webHttpBinding" bindingConfiguration="default" contract="IWCFService" behaviorConfiguration="webHttpEnablingBehavior" />
< endpoint address="MyOperation" binding="wsDualHttpBinding" bindingConfiguration="default" contract="IWCFService" />
< /service>
< /services>
< client />
< bindings>
< webHttpBinding>
< binding name="default" />
< /webHttpBinding>
< wsDualHttpBinding>
< binding name="default" />
< /wsDualHttpBinding>
< /bindings>
< /system.serviceModel>
< system.web>
< compilation debug="true"/>
< /system.web>
< /configuration>
Monday, May 24, 2010
Using CSS with Inline Images

Labels:
Using-CSS-with-Inline-Images
Wednesday, May 5, 2010
SQL Server built in functions
1. First day of the week
select @@DateFirst output: 7 - Monday , 1 - Sunday
Set dateFirst 1
To see the permissions in the database.
select * from fn_my_permissions('null','database')
SELECT DISTINCT class_desc FROM fn_builtin_permissions(default) ORDER BY class_desc;
GO
select @@DateFirst output: 7 - Monday , 1 - Sunday
Set dateFirst 1
To see the permissions in the database.
select * from fn_my_permissions('null','database')
SELECT DISTINCT class_desc FROM fn_builtin_permissions(default) ORDER BY class_desc;
GO
Wednesday, April 7, 2010
Design patterns
One way is to call carpenter and let him take the measurements and then get you the door. --- factory method
Second way is to go to shop which sells doors and get the one which fits your requirements. --- abstract factory
Tracking a Session counter creates a single object - Singleton pattern
Second way is to go to shop which sells doors and get the one which fits your requirements. --- abstract factory
Tracking a Session counter creates a single object - Singleton pattern
Labels:
Design_patterns
Subscribe to:
Posts (Atom)