Click here to Skip to main content
15,885,365 members
Articles / Programming Languages / C# 4.0

Synchronous Web Service Calls with Silverlight: Dispelling the async-only myth

Rate me:
Please Sign up or sign in to vote.
4.95/5 (47 votes)
16 Nov 2008LGPL311 min read 424.4K   4K   81  
In this article, we look at the asynchronous web service model in Silverlight, and how it can be augmented to allow synchronous web service calls. We also explore efficient channel caching, and asynchronous Silverlight Unit Tests.

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightExamples", "SilverlightExamples\SilverlightExamples.csproj", "{A2B2D87D-835A-47C0-8834-738B13F19BD1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightExamples.Web", "SilverlightExamples.Web\SilverlightExamples.Web.csproj", "{AD5F89E8-5186-40C6-B2FB-B4F371D6BC4D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightCore", "SilverlightCore\SilverlightCore.csproj", "{DCAB5FF7-3C9C-43AD-8C70-120361EC8960}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightCore.Tests", "SilverlightCore.Tests\SilverlightCore.Tests.csproj", "{4B7951B7-F0F6-448B-B8D2-D0D46289500D}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{A2B2D87D-835A-47C0-8834-738B13F19BD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{A2B2D87D-835A-47C0-8834-738B13F19BD1}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{A2B2D87D-835A-47C0-8834-738B13F19BD1}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{A2B2D87D-835A-47C0-8834-738B13F19BD1}.Release|Any CPU.Build.0 = Release|Any CPU
		{AD5F89E8-5186-40C6-B2FB-B4F371D6BC4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{AD5F89E8-5186-40C6-B2FB-B4F371D6BC4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{AD5F89E8-5186-40C6-B2FB-B4F371D6BC4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{AD5F89E8-5186-40C6-B2FB-B4F371D6BC4D}.Release|Any CPU.Build.0 = Release|Any CPU
		{DCAB5FF7-3C9C-43AD-8C70-120361EC8960}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{DCAB5FF7-3C9C-43AD-8C70-120361EC8960}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{DCAB5FF7-3C9C-43AD-8C70-120361EC8960}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{DCAB5FF7-3C9C-43AD-8C70-120361EC8960}.Release|Any CPU.Build.0 = Release|Any CPU
		{4B7951B7-F0F6-448B-B8D2-D0D46289500D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{4B7951B7-F0F6-448B-B8D2-D0D46289500D}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{4B7951B7-F0F6-448B-B8D2-D0D46289500D}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{4B7951B7-F0F6-448B-B8D2-D0D46289500D}.Release|Any CPU.Build.0 = Release|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 GNU Lesser General Public License (LGPLv3)


Written By
Engineer
Switzerland Switzerland
Daniel is a former senior engineer in Technology and Research at the Office of the CTO at Microsoft, working on next generation systems.

Previously Daniel was a nine-time Microsoft MVP and co-founder of Outcoder, a Swiss software and consulting company.

Daniel is the author of Windows Phone 8 Unleashed and Windows Phone 7.5 Unleashed, both published by SAMS.

Daniel is the developer behind several acclaimed mobile apps including Surfy Browser for Android and Windows Phone. Daniel is the creator of a number of popular open-source projects, most notably Codon.

Would you like Daniel to bring value to your organisation? Please contact

Blog | Twitter


Xamarin Experts
Windows 10 Experts

Comments and Discussions