Click here to Skip to main content
15,886,033 members
Articles / Programming Languages / C#

How to Use a WCF Service without Adding a Service Reference or Proxy

Rate me:
Please Sign up or sign in to vote.
4.78/5 (16 votes)
28 Jun 2012CPOL5 min read 218.1K   3.2K   35  
Shows how you can loosely couple your WCF service.

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ISampleService", "ISampleService\ISampleService.csproj", "{0C4BA957-4237-4636-9134-0B944513CCA4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFSampleService", "WCFSampleService\WCFSampleService.csproj", "{E7481416-8EC7-42EC-B0C2-EFEF6613F33D}"
EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "SampleServiceHost", "SampleServiceHost\", "{C0987297-282A-4333-8961-532AB3ABA2E7}"
	ProjectSection(WebsiteProperties) = preProject
		TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
		ProjectReferences = "{E7481416-8EC7-42EC-B0C2-EFEF6613F33D}|WCFSampleService.dll;{0C4BA957-4237-4636-9134-0B944513CCA4}|ISampleService.dll;"
		Debug.AspNetCompiler.VirtualPath = "/SampleServiceHost"
		Debug.AspNetCompiler.PhysicalPath = "SampleServiceHost\"
		Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\SampleServiceHost\"
		Debug.AspNetCompiler.Updateable = "true"
		Debug.AspNetCompiler.ForceOverwrite = "true"
		Debug.AspNetCompiler.FixedNames = "false"
		Debug.AspNetCompiler.Debug = "True"
		Release.AspNetCompiler.VirtualPath = "/SampleServiceHost"
		Release.AspNetCompiler.PhysicalPath = "SampleServiceHost\"
		Release.AspNetCompiler.TargetPath = "PrecompiledWeb\SampleServiceHost\"
		Release.AspNetCompiler.Updateable = "true"
		Release.AspNetCompiler.ForceOverwrite = "true"
		Release.AspNetCompiler.FixedNames = "false"
		Release.AspNetCompiler.Debug = "False"
		VWDPort = "51387"
		DefaultWebSiteLanguage = "Visual C#"
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{0C4BA957-4237-4636-9134-0B944513CCA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{0C4BA957-4237-4636-9134-0B944513CCA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{0C4BA957-4237-4636-9134-0B944513CCA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{0C4BA957-4237-4636-9134-0B944513CCA4}.Release|Any CPU.Build.0 = Release|Any CPU
		{E7481416-8EC7-42EC-B0C2-EFEF6613F33D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{E7481416-8EC7-42EC-B0C2-EFEF6613F33D}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{E7481416-8EC7-42EC-B0C2-EFEF6613F33D}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{E7481416-8EC7-42EC-B0C2-EFEF6613F33D}.Release|Any CPU.Build.0 = Release|Any CPU
		{C0987297-282A-4333-8961-532AB3ABA2E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{C0987297-282A-4333-8961-532AB3ABA2E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{C0987297-282A-4333-8961-532AB3ABA2E7}.Release|Any CPU.ActiveCfg = Debug|Any CPU
		{C0987297-282A-4333-8961-532AB3ABA2E7}.Release|Any CPU.Build.0 = Debug|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
I am into Software Development since 1998. I have 12 +years of experience designing, developing and
Maintaining, applications and databases in corporate environments within Information Technology.
Strong experience with N-tier architecture, design, development, methodology, and Successfully
designed, developed and implemented Client/Server Systems, Intranet/Internet Applications and
databases utilizing C#, VB .Net , Visual Studio 2010 .NET, ASP.NET, MS SQL Server 2008, XML, IIS 7.5,
Windows 2003 and Windows XP. Expert in ASP.NET, WCF Service, WPF, Java Script, XML, HTML.

My skill Set: C#, VB.net ,ASP.NET, WCF, WPF, XML, JavaScript, SQL Server

Comments and Discussions