Suneet Nangia Blogs & Beyond...
Suneet Nangia Blogs & Beyond...
Tags
Archives
Skip Navigation Links.
Feeds
RSS 2.0
About Me
I am a developer/designer who loves exploring new technologies. Work in EAI and SOA space primarily using Microsoft technologies.  
My Other Spaces
 
LinkedIn
Professional Profile

Flickr
Photography

Blogs I Visit
 
Stephen W. Thomas

Kevin B Smith
 
Saravan Kumar

John Flander

Biztalk Server Team

Darren Jefford

Daniel Moth
I have attended few of his workshops@ MS, Thames Valley. Very sharp fella with good programming knowledge.
Mike Taulty

Richard Grime

Chris Dickson
One line for him- Fantastic Biztalk & .Net Expert. I had a chance to work him, he is one person who will always do the right things rightly.
Mohit Nayyar
Exciting MS SQL/DB blog
Ben Cops
He is techincally very sound person with good balance between work and life.
Technical Readings
 
Inside WCF
Indepth WCF. If you want to extend WCF then this is the book you are looking for.  
CLR Via C#
Amazing book on core concepts of CLR and C#. Must have book.
Jeffrey has finished its 3rd edition as well which will soon be in the market. Follow this link for its release dates, availability etc
BLOGs-
All Months, All Years Showing Page 1 of 10
Wed, 04 Jan 2012 14:15:48 GMT
SSL Passthrough With TranspoprtWithMessageCredential security mode.

After spending hours on looking at options on internet and solution provided by Pedro Felix here I have cracked it using a new feature available in .net 4.0 and 3.5 SP1. Pedro's solution is great but it was deviced when 3.5 SP1 was not available to hand and therefore not the best option today.

Problem: Many organisations use hardware accelerated NLB for SSL encryption and decryption. This alleviates SSL processing load from actual web servers and also makes it easier to update the SSL certificate as there is only place to update the certificate. The problem is if you want to use Username/Password as a credential over secure transport (SSL) you need to chose security mode as "TranspoprtWithMessageCredential" in binding (WSHttpBinding). As soon as you do this WCF will ensure message received in IIS is encrypted with SSL. Now as SSL encryption/decryption is performed by NLB here WCF throws the error.

Solution: .Net 3.5 SP1 and 4.0 comes with a new properties allowInsecureTransport and enableUnsecuredResponse on SecurityBindingElement. Setting these properties to True allows WCF to ignore the strict rule of checking if message is SSL encrypted. This property is however not exposed by built in WSHttpBinding. To make use of it you will need to create a custom binding which set these properties correctly and also allow username/password in SOAP header using standard WS security protocols. Following custom binding works like "TranspoprtWithMessageCredential" mode but without HTTPS.

Server binding and endpoint config-

<bindings>
<
customBinding
>
<
binding name="customHttpBinding"
>
<
security authenticationMode="UserNameOverTransport" allowInsecureTransport="true" enableUnsecuredResponse="true"
/>
<
httpTransport
/>
</
binding
>
</
customBinding
>
</
bindings
>

<endpoint address="" binding="customBinding" bindingConfiguration="customHttpBinding" name="processMessage" bindingName="customHttpBinding" contract="SecurityCheckService.IService1"

Client binding and endpoint config-

<bindings>
<
customBinding
>
<
binding name="customHttpBinding"
>
<security authenticationMode="UserNameOverTransport" allowInsecureTransport="true" enableUnsecuredResponse="true"
/>
<
httpTransport
/>
</
binding
>
</
customBinding
>
</
bindings>

<client>
<
endpoint address=http://NLB_IP_OR_DNS/SecurityCheckService/Service1.svc binding="customBinding" bindingConfiguration="customHttpBinding" contract="ServiceReference1.IService1" name="processMessage"
behaviorConfiguration="via"/>
</
client
>

<behaviors>
<
endpointBehaviors>
<
behavior name="via">
<
clientVia viaUri="https://NLB_IP_OR_DNS/SecurityCheckService/Service1.svc"/>
</
behavior>
</
endpointBehaviors>
</
behaviors>


Note ClientVia behavior. This is required as service on IIS does not know about SSL. SSL is stripped off by NLB. This client config will ensure that the request is sent to Https address but "To" Soap Header block contains Http based address so that you do not get Address Filter mismatch error.

I use custom authenticator/validator to validate the credentials coming  into the SOAP header. Idea is to store credentials in SSO and validate them against the hash of the password. It's easy to create a custom validator which is explained here



Comments(2) | Permalink | Windows Communication Foundation

Thu, 22 Dec 2011 12:14:51 GMT
AppFabric Cache Configuration and Topologies

I ve been recently working on AppFabric cache design and implementation. When it comes to configuration storage in AppFabric Cache there are quite a lot of options available at hand.

Find here the Pdf containing all the options and their pros and cons to some extent. Please note I ve considered 6 cache nodes across the sites (primary and secondary).

Here is the link


Comments(0) | Permalink | AppFabric

Wed, 20 Jul 2011 16:22:16 GMT
Logical vs User Connections SQL Server 2005 onwards

SQL Server gives two performance counters around connections it is servicing.
Very quickly, Logical connections are the ones which are made over the same physical (user) connection by the client and can service multiple result sets at the same time.
If you enable Multiple Active Result Sets (MARS) on your client connection string, .Net will use up to 10 logical connections on a single physical connection. Hence, on SQL you will se 1 user connection and more than 1 (up to 10) logical connections.


Comments(0) | Permalink | ORM

Wed, 22 Jun 2011 12:45:02 GMT
IIS 7.x Clean Install

Ran into this issue with my IIS on windows 7 machine off late where IIS was just corrupted and was not loading the apps. So I thought of re-installing IIS but it did not work on first attempt so here it goes-

1. Remove IIS feature from "Turn Windows features on or off"
2. Reboot the machine.
3. Remove Windows Process Activation service from "Turn Windows features on or off"
4. Reboot the machine.
5. Install IIS and Windows Process Activation back again from "Turn Windows features on or off".
6. Install asp.net 4.0 if you use it via aspnet_regiis.exe -i

Sorted.


Comments(0) | Permalink | Windows Communication Foundation
Showing Page 1 of 10