Windows Phone 7–Network Connectivity

Recently I've been working on a project and we discovered something that have some impact on the performance of a Windows Phone application. This is probably a mistake that we did when implementing the code, but it may be the kind of mistake that many developer will do.

Quickly, each time we were calling the web service we were validating the network connectivity by validating the property “ NetworkInterface.NetworkInterfaceType ”. Behind that property, there is a process that validate the connectivity. This process is calling a page “http://www.msftncsi.com/ncsi.txt” to see if there is any connectivity and which type of connectivity. But the problem is that is done synchronously. So in our case we were calling multiple times this process, which result to execute the process of validating the Url mention before synchronously multiple times.  So each web service call must wait for the network validation before executing the call. And because it’s on the web the response can be fast and can also be very long before we get the response.

In our case we did implement a wrapper that make sure that the call is not done to often. This help us improve the performance of the application start-up. Also this help to improve activation process after the application Tombstone.

So make sure to validate our Windows Phone 7 application by using a tool like fiddler. This will help you improve the performance and stability of your application.

Regards,
LP

DotNetShoutout
DotnetKicks

Comments (1) -

Andy Lee
Andy Lee
11/3/2011 4:22:55 PM #

My brother is using HTC HD7 having a Windows Phone 7 so I didn't encounter that kind of problem.May be it happens only with only few operators.So Thanks for providing this valuable information.

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Louis-Philippe Pinsonneault is a senior .NET developer and trainer at Runatserver. He has over 10 years of experience with . NET technology. He is a certified Microsoft Certified Professional Developer (MCPD) and a Microsoft Certified Technology Specialist .NET Framework 3.5 ASP.NET Application. He also teaches ASP.NET at Technologia, Montréal. He was awarded an MVP for Device Application Developement in 2010 and 2011.

Microsoft Most Valuable Professional

Microsoft Certified Professional Developer

Microsoft Certified Technology Specialist

View Louis-Philippe's profile on LinkedIn

Page List

Month List