Total instances running of application in C# .NET
August 3rd, 2010 by Sanket
Total number of instances running of application in C# .NET
Many times we needs to find how many instances of particular application or process are running.
This can be used in allowing to run only single instance of application or at most 2 etc.
Also count can be useful for licensing and other stuff.
So here is simple code to find out how many number of instances are running for particular application...Take and Skip Partition Operator in LINQ
March 1st, 2010 by Sanket
Many times we have requirement, to fetch partial result set from collection like Arrays, DataTable.
To achieve the same we can use Take and Skip Partition Operator of LINQ.
Skip Partition Operator Reference: http://msdn.microsoft.com/en-us/library/bb358985.aspx
Take Partition Operator Reference: http://msdn.microsoft.com/en-us/library/bb503062.aspx
For this we will consider following example of Array...app.config modification issue in Windows 7
February 28th, 2010 by Sanket
File modification issue in Windows 7 for program files content
We have developed many windows application using C# or VB.NET.
In that we stored connection string and other required data in ‘app.config’ file, and we modify that file using our application to store latest connection or other information.
This is standard practice and works as well.
But in ‘Windows 7’ OS architecture is changed...Coding Standards in .NET : Naming Guidelines
February 5th, 2010 by Sanket
A comprehensive coding standard is essential for a successful product delivery. The standard helps in enforcing best practices and avoiding pitfalls, and makes knowledge dissemination across the team easier. The C# coding standard presented here is very thin on the “why” and very detailed on the “what” and the “how.” The coding standard presented next captures best practices, dos and...Standard Coding Practices in .NET
February 2nd, 2010 by Sanket
A comprehensive coding standard is essential for a successful product delivery. The standard helps in enforcing best practices and avoiding pitfalls, and makes knowledge dissemination across the team easier. The C# coding standard presented here is very thin on the “why” and very detailed on the “what” and the “how.” The coding standard presented next captures best practices, dos and...Transport level security VS message level security in WCF
January 28th, 2010 by Sanket
Transport level security VS message level security in WCF
Advantages of Transport level security
Does not need any extra coding as protocol inherent security is used.
Performance is better as we can use hardware accelerators to enhance performance.
There is lot of interoperability support and communicating clients do not need to understand WS security as it’s built in the protocol itself.
Disadvantages...WCF Security modes provided in .NET
January 27th, 2010 by Sanket
WCF Security modes provided in .NET
Across all service bindings there are five possible security modes:
None. Turns security off.
Transport. Uses transport security for mutual authentication and message protection.
Message. Uses message security for mutual authentication and message protection.
Both. Allows you to supply settings for transport and message-level security (only MSMQ supports this).
TransportWithMessageCredential....Default types of WCF bindings in .NET
January 27th, 2010 by Sanket
Default types of WCF bindings in .NET
Within the Windows Communication Foundation programming model, bindings are represented by the System.ServiceModel.Channels.Binding class. All binding classes must derive from this base class.
Following are the different bindings provided by WCF by default:
1. BasicHttpBinding
2. WSHttpBinding
3. WSDualHttpBinding
4. WSFederationHttpBinding
5. NetTcpBinding...Client Credential Type in WCF
January 16th, 2010 by Sanket
Different Client Credential Type provided in WCF – Windows communication foundation
The choice of client credential type depends on the security mode in place. For transport security you can require a Windows credential or certificate-and there are variations on how Windows credentials are passed via TCP, HTTP and MSMQ. Message security supports any of the following settings for clientCredentialType:
None...What Is Message level Security in WCF?
January 8th, 2010 by Sanket
What Is Message level Security in WCF?
Message security uses the WS-Security specification to secure messages. The specification describes enhancements to SOAP messaging to ensure confidentiality, integrity, and authentication at the SOAP message level (instead of the transport level).
In brief, message security differs from transport security by encapsulating the security credentials and claims...