Archive for the ‘HowTo’ Category

WCF Tutorial

Wednesday, August 12, 2009 10:09 No Comments

The following is a relatively simple address lookup service that illustrates how to create a loosely coupled WCF service with commonly accepted best practices: SRP; Repository Pattern; Service Layers; and Dependency Injection. The first step is to identify the data that will need to be exchanged by the service.  Often, it will be necessary / [...]

This was posted under category: HowTo Tags: , , , , , ,

Enabling SQL Cache Dependency within your .Net Application

Thursday, November 6, 2008 14:11 No Comments

This one’s short and sweet … add the following snippet to your web.config file (within the configuration > system.web > pages node): 1: <caching> 2: <sqlCacheDependency enabled="true"/> 3: </caching> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier New”, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode [...]

This was posted under category: HowTo Tags: , , ,

Hierarchical SQL Role Provider

Thursday, October 16, 2008 18:22 No Comments

you can modify the .net sql role provider to be hierarchical in just a few simple steps … first you need to modify the aspnet_Roles table: 1: ALTER TABLE [dbo].[aspnet_Roles] ADD [ParentRoleId] [uniqueidentifier] NULL .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier New”, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre [...]

This was posted under category: HowTo Tags: , , ,

How to return a more detailed response in your WSDL for web methods with a return type of XmlDocument

Thursday, September 18, 2008 7:50 No Comments

you’ve develop your .net web service … get everything working just the way you like … and then you notice that auto generated wsdl provides a less then ideal definition for the response … something like:   <s:complexType mixed=”true”> <s:sequence> <s:any /> </s:sequence> </s:complexType> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier [...]

This was posted under category: HowTo Tags: , , , ,