Wednesday, December 31, 2014

Visual Studio 2015 Improvements for .NET, works with new .NET framework 4.6

Below are some new features of Visual Studio 2015
  • PerfTips
              PerfTips allow you to quickly and easily see performance bottlenecks as you are debugging your application.
  • Intuitive Breakpoint Settings
            The new and intuitive breakpoint settings make it a lot easier to change the behavior of breakpoints.
  • Setting breakpoints on auto-implemented properties
              Debug support for auto-implemented properties
  • Lambdas in the debugger windows
              Lambdas are now supported in debugger windows
  • Core IDE and Editing Improvements
              New enhanced core IDE and editing experiences for C# and Visual Basic

.NET 2015 also trying to remove some known differences of VB and C#.NET and bring the two languages closer. It is really good initiative to remove differences between languages, specially between VB and C#.Net

Thursday, December 18, 2014

Error: WCF - Cannot find the X.509 Certificate using the following search criteria...

I was getting this error when I have below lines of code on my WCF web.config file

"serviceCertificate findValue="WCfServer" storeLocation="CurrentUser" storeName="My" x509FindType="FindBySubjectName""

I have installed Server and Client certificate into MMC >> Personal and Trusted People but still when I try to browse my service from IIS I am getting same 'X.508 certificate...' error.


I found the issues, My app pool account in IIS was running under "ApplicationPoolIdentity" but since on my web.config and certificate installation done using "Current User",  So it is important to run your app pool account under your local Identity user Id. So I just change App pool account in IIS to run under my local window credential and it works for me. 

.NET New Feature, SOLID Principal and WCF Security

.NET Framework 4.5 new Features
  • Async and await (code markers)
  • Zip facility (Zip compression)
  • Regex timeout (TimeOut)
  • Profile optimization (Improved startup performance)
  • Garbage collector (GC background cleanup)

SOLID Architecture Principal
  • “S” - SRP (Single responsibility principle)
  • “O” - Open closed principle
  • “L”- LSP (Liskov substitution principle)
  • “I” - ISP (Interface Segregation principle)
  • “D” - Dependency inversion principle.

WCF Security
  • WCF Security Transport vs Message using BasicHttpBinding and wcHttpBinding
  • Difference between Transport and Message Security
  • Difference between BasicHttpBinding and wcHttpBinding Binding
  • How to create certificates
  • Example C# code to implement Transport based security and Message based Security
  • Eenable Windows authentication on WCF using ‘BasicHttpBinding’