.NET Framework Bookmark and Share   
 index > Windows Communication Foundation > Decorating a class with static, in a WCF service
 

Decorating a class with static, in a WCF service

Recently at our .NET user group meeting, we had a presentation on WCF over TCP, which is something that I'm trying to do. The two guys who did the presentation said that no class or method within the WCF service should ever use the static keyword. This concerns me, because that is exactly what I've done. When writing my WCF service I relied heavily upon a blog post by Ira Lukhezo titled, "Windows Communication Foundation Support in Visual Studio 2008". Lukherzo's method relied upon HTTP, and I wanted to use TCP instead, but basically I followed his example. He decorated methods of his NorthwindDataManager class with the static keyword, and so I decorated the methods of my data access layer component with the static keyword.

Have I done the wrong thing?


Rod
Rod at Work
This issue is your service contract implementation canot use statics. Things you use inside the service implementation can be static
Richard Blewett, thinktecture - http://www.dotnetconsult.co.uk/weblog2
Twitter: richardblewett
Richard Blewett
This issue is your service contract implementation canot use statics. Things you use inside the service implementation can be static
Richard Blewett, thinktecture - http://www.dotnetconsult.co.uk/weblog2
Twitter: richardblewett
Richard Blewett
Thank you, Richard, that gives me a lot of relief!!

Rod
Rod at Work

You can use google to search for other answers

Custom Search

More Threads

• NetNamedPipesBinding - getting a security exception: "The Local Security Authority cannot be contacted"
• Missing Performance Counters and WMI Namespace
• publishing WPF Browser Application
• Consume secure web service exposed from oracle system
• WCF release webservice can not add web reference on other computers
• server side timeout
• java web service consumption by vb client
• Using one operation for MessageContracts and DataContracts
• Hosting a C++ WCF service using app.config
• netTCPBinding between machines over intranet problem