Question

How to troubleshoot signal drop/ low signal?

Asked by: gbzhhu

Hi,

I have a mobile app in C# .Net CF 2.0.  The app calls a web service that writes/reads from/to SQL server database.  We use two types of devices HTC TyTn 2 (on Orange) and XDA Stellar (on O2).  Everything works fine but randomly as user tries to send an order they get back an error

"An error message cannot be displayed because an optional resource assembly containing it cannot be found"

This error is related to missing System_SR.cab but in this case it isn't.  All other errors display ok.  I think the network connection drops but not sure

I can tell the error is not coming from the web service method we call.  It is happening before it is invoked

I write the exception to the database so the extra information I have about it is

==============
Outer Exception
=============
Type:        System.Net.WebException

StackTrace:
at System.Net.HttpWebRequest.finishGetResponse()
at System.Net.HttpWebRequest.GetResponse()
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse()
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse()
at System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke()
at MobileCentaur.MyCentaurSvc.CentaurSvc.MobileSvc.SendOrder()
at MobileCentaur.OrderDispatch.btnOrder_Click()

==============
Inner Exception
=============
Type:        System.Net.Sockets.SocketException

StackTrace:
at System.Net.HttpWebRequest.fillBuffer()
at System.Net.HttpWebRequest.getLine()
at System.Net.HttpWebRequest.parseResponse()
at System.Net.HttpWebRequest.startReceiving()
at System.Net.Connection.startReceiving()
at WorkItem.doWork()
at System.Threading.Timer.ring()

This error occurrs for random users at random times.  First they get low signal then this error.  I am just lost as to how to debug/resolve this.  Is it something I can do by code or does the network provider need to do something?

Changed MTU settings as in http://social.msdn.microsoft.com/forums/en-US/netfxcompact/thread/b0f90f2c-cb07-455d-a740-f34bb66a3912/

It doesn't help.

I need ideas on resolving this thing.

Thanks
H

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-01-21 at 06:27:20ID24070218
Topics

Handheld and PDA Programming

,

Microsoft Visual C#.Net

,

.Net Compact Framework

Participating Experts
2
Points
0
Comments
27

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Is Outlook Mobile on O2 Xda Atom life compatible with Exch…
    Hello, Any one of you knows if outlook mobile comes with O2 Xda Atom life is compatible with exchange 2003 server? Best regards
  2. Can I unlock a sony ericsson k800i mobil, its on O2
    Can I unlock my SonyEricsson K800i from O2 pay and go to take any sim card. I now live in Sweden but O2 will not unlock it until 12 months are up.
  3. Mobile Broadband Signal Enhancement
    Hi Experts, Not sure where to post this - but here goes. I'm looking to relocate my home-office but have realised that it's unlikely I will be able to obtain ADSL through a landline due to distance from the exchange. I've looked at Satellite Broadband but that seems both e...
  4. Cisco 881g 3G Primary WAN Connection on O2 Mobile …
    hi all I have a cisco 881g, with a sierra wireless 880e card (supplied by cisco) with an o2 3g enabled sim card. the aircard with sim in a laptop can connect to the internet fine, using 3g. the air card in the cisco 881g can connect to the o2 network and then does something...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: TheLearnedOnePosted on 2009-01-21 at 10:37:18ID: 23432453

What does MobileSvc.SendOrder look like?

 

by: gbzhhuPosted on 2009-01-22 at 01:20:51ID: 23437697

MobileSvc.SendOrder is like this:

[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://server.co.uk/SendOrder", RequestNamespace="http://server.co.uk/", ResponseNamespace="http://server.co.uk/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public void SendOrder(string orderInfo, string guidString) {
            this.Invoke("SendOrder", new object[] {
                        orderInfo,
                        guidString});
        }

Thanks for your presence Bob

H

 

by: gbzhhuPosted on 2009-01-22 at 01:58:24ID: 23437882

Bob,

My previous comment showed only the proxy code auto-generated by VS.  I have attached as a snippet the actual web service method that is called.

The LogExceptionToDatabase is not called when this error occurrs so I think the call doesn't make that far.  What is worse is that it seems that the order being sent sometimes goes through and sometimes doesn't!


[WebMethod]
public void SendOrder(string orderInfo, string guidString)
{
    string connStr = ConfigurationManager.ConnectionStrings["cvsConnectionString"].ConnectionString;
    SqlConnection con = new SqlConnection(connStr);
 
    try
    {
        using (TransactionScope scope = new TransactionScope(TransactionScopeOption.RequiresNew))
        {
            con.Open();
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = con;
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "mobile_order_transact";
            cmd.Parameters.Add(new SqlParameter("@orderDoc", orderInfo));
            cmd.Parameters.Add(new SqlParameter("@orderGUID", guidString));
            cmd.ExecuteNonQuery();
            con.Close();
            scope.Complete();
        }
    }
    catch (Exception ex)
    {
        if (con.State != ConnectionState.Closed)
            con.Close();
 
        this.LogExceptionToDatabase(this.GetExceptionXmlString(ex), this.ExtractUserId(orderInfo), "User name not available");
 
        throw;
    }
}

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:

Select allOpen in new window

 

by: TheLearnedOnePosted on 2009-01-22 at 06:46:32ID: 23439706

I see where you are logging the exception to a database with LogExceptionToDatabase.  Are you getting any exceptions in the database for this web method?

 

by: gbzhhuPosted on 2009-01-23 at 01:26:13ID: 23447482

No, I am not getting an exception from within this method BUT the client code calling the SendOrder method gets the exception I mentioned in my Q.  The client code then calls the LogExceptionToDatabase directly without going via SendOrder method.  I then get th exception in the DB and emailed to me as well.  

The problem is the ambigous error message so I can't tell what happened.  The error occurrs so randomly.  2 days ago it didn't accurr at all over 100 orders were made.  Yesterday it occurred 5 times with similar number of orders.  I am guessing it is dependent on the quality of the Orange and O2 network (we use) signal for the devices

 

by: TheLearnedOnePosted on 2009-01-23 at 02:32:52ID: 23447712

Where is the web service running?  How are you connecting from the PDAs to the web service?

 

by: gbzhhuPosted on 2009-01-23 at 02:42:03ID: 23447766

The web service is running on our web server (Windows 2003 server, IIS)
The PDA's are GPRS enabled (I am not fully conversant with these different device connection types, GSM, EDGE, GPRS) so I guyess we are connecting via GPRS.  Our main device is HTC TyTn 2 and shows H (capital H) when connected.  Not sure what that means.

 

by: TheLearnedOnePosted on 2009-01-23 at 03:02:09ID: 23447864

I like to start with definitions:

GPRS (General Packet Radio Service)
The 2.5G data service enhancement for GSM host networks. GPRS is a packet-switched service that takes advantage of available GSM time slots for data communications and supports both X.25 and TCP/IP packet protocols, with quality of service (QoS) mechanisms. GPRS enables high-speed mobile datacom usage and is considered most useful for bursty data applications such as mobile Internet browsing, e-mail, and various push technologies. Through concatenating as many as eight GSM channels, GPRS yields a theoretical transmission rate as high as 171.2 kbps. GPRS maintains the same Gaussian minimum shift keying (GMSK) modulation scheme used by GSM and provides alwayson access. GPRS can run in either symmetric or asymmetric mode, with the speed in either direction sensitive to which of the 12 multislot service classes is selected. The multislot service class determines the number of time slots in each direction, with each time slot supporting a theoretical data rate of 21.4 kbps. The simplest is service class 1, which supports one time slot in each direction.The most capable is service class 12, which supports four time slots in each direction. GPRS specifications were developed in 1997 by the European Telecommunications Standards Institute (ETSI), which subsequently passed that responsibility to the 3rd Generation Partnership Project (3GPP). In Enhanced Data rates for GSM Evolution (EDGE) cellular radio networks, Enhanced GPRS (EGPRS) is a packet-switched transmission mode that supports transmission rates as high as 473.6 kbps.

EDGE (Enhanced Data rates for GSM Evolution)
Originally, Enhanced Data rates for Global Evolution.A 2.5G standard (1999) developed by the European Telecommunications Standards Institute (ETSI) as the final stage in the evolution of data communications within the Global System for Mobile Communications (GSM) standards. The only IMT-2000 specification based on time division multiple access (TDMA) rather than code division multiple access (CDMA), EDGE supports data transmission rates up to 473.6 kbps over GSM channels 200 kHz wide through an improved modulation technique known as 8-Phase Shift Keying (8-PSK), which involves eight levels of phase shift and, therefore, supports three bits per symbol. EDGE employs frequency division duplex (FDD) to support bidirectional communications over 124 channels, each of which supports 8 time slots. EDGE supports two modes of operation:

GSM (Global System for Mobile communications: originally from Groupe Spécial Mobile) is the most popular standard for mobile phones in the world. Its promoter, the GSM Association, estimates that 80% of the global mobile market uses the standard. GSM is used by over 3 billion people across more than 212 countries and territories.  Its ubiquity makes international roaming very common between mobile phone operators, enabling subscribers to use their phones in many parts of the world. GSM differs from its predecessors in that both signaling and speech channels are digital, and thus is considered a second generation (2G) mobile phone system. This has also meant that data communication was easy to build into the system.
The ubiquity of the GSM standard has been an advantage to both consumers (who benefit from the ability to roam and switch carriers without switching phones) and also to network operators (who can choose equipment from any of the many vendors implementing GSM). GSM also pioneered a low-cost (to the network carrier) alternative to voice calls, the Short message service (SMS, also called "text messaging"), which is now supported on other mobile standards as well. Another advantage is that the standard includes one worldwide Emergency telephone number, 112. This makes it easier for international travellers to connect to emergency services without knowing the local emergency number.
Newer versions of the standard were backward-compatible with the original GSM phones. For example, Release '97 of the standard added packet data capabilities, by means of General Packet Radio Service (GPRS). Release '99 introduced higher speed data transmission using Enhanced Data Rates for GSM Evolution (EDGE).

 

by: TheLearnedOnePosted on 2009-01-23 at 03:06:40ID: 23447898

1) The PDA should have a signal strength indicator.

2) If you look in your Users Guide for the HTC TyTn 2 you would see H = HSDPA available, G = GPRS available, E = EDGE available.

3) What is the "normal" signal strength when you don't get an exception, and what is the "error" signal strength?

 

by: alexey_gusevPosted on 2009-01-23 at 03:11:34ID: 23447924

guys, that's very interesting discussion, but I've observed the same failures on the PDA connected to the PC via USB cable over ActiveSync, so I very much doubt it is ever related to GPRS et. al.

under the debugger there are some SocketExceptions while I try to execute simple HttpWebRequest, so that's the problems somewhere at Sockets level. Again, this happens only for some period of time, then works like a charm

I would be VERY interested in resolving this issue.

 

by: TheLearnedOnePosted on 2009-01-23 at 03:15:47ID: 23447952

Forgot:

High-Speed Downlink Packet Access (HSDPA) is a 3G (third generation) mobile telephony communications protocol in the High-Speed Packet Access (HSPA) family, which allows networks based on Universal Mobile Telecommunications System (UMTS) to have higher data transfer speeds and capacity. Current HSDPA deployments support down-link speeds of 1.8, 3.6, 7.2 and 14.4 Mbit/s. Further speed increases are available with HSPA+, which provides speeds of up to 42 Mbit/s downlink.

 

by: gbzhhuPosted on 2009-01-23 at 03:30:59ID: 23448032

Cool.  Thanks Bob.

Answer to your question 3 above Bob,  it is difficult to determine exact signal strength as it changes often and error only ever occurred once for me but I have 100's of users so I get a few reporting almost on the daily basis.  What all user's agree is that prior to the error they get an error message telling them about low signal which is from my code as shown below

            catch (System.Net.Sockets.SocketException)
            {
                try { progress.Close(); }
                catch (Exception) { }

                ShowExceptionMessage("Your device does not currently have enough network signal to submit data");
            }

Now I am fully conversant with the all these acronyms.  I never get E.  Occassionally I get G but rest of the time I get H (which sounds good).

Alexey, it is interesting that you had the error while on a usb connection!!  Do you get the same error "An error message cannot be displayed because an optional resource assembly containing it cannot be found"  What devices are you using?  What operator?

It would be nice to get some M$ people on this one to clear the confusion.

Alexey, what have you tried as a solution?


 

by: TheLearnedOnePosted on 2009-01-23 at 03:32:53ID: 23448045

It sounds like you are assuming that a SocketException is a low-signal exception, but you aren't specifically checking that.  I would get either the Message or the stack trace (ToString), and make sure.

 

by: TheLearnedOnePosted on 2009-01-23 at 03:34:03ID: 23448048

Possible solution:

http://blogs.msdn.com/tolong/archive/2006/11/20/error-an-error-message-cannot-be-displayed-because-an-optional-resource-assembly-containing-it-cannot-be-found.aspx

Likely Solution:
Install SR CAB for NETCF V2.
By default the CAB should be
C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\Diagnostics
If you've installed NETCF V2 to custom folder it might be in a different place, please search pc for actual location.

 

by: alexey_gusevPosted on 2009-01-23 at 03:36:52ID: 23448059

yes, I've got exactly the same error, with xxx_SR.cab installed of course :) I've seen it on Orange and O2 in UK, and even under the emulator (craddled and connected via ActiveSync). So I'm nearly 100% sure that's nothing to do with the bearer but with networking.

it seemed for me that it is somehow related to the server state, because after some delay the server comes back again as shiny new, like it releases some sessions or similar stuff

 

by: gbzhhuPosted on 2009-01-23 at 03:40:21ID: 23448075

I agree Bob that I shouldn't be assuming low signal and I am just making changes to record the exception to DB and monitor that.

I have been through most System_SR suggesting solutions.  This doesn't seem to be my problem.  All other errors are displayed OK.

 

by: gbzhhuPosted on 2009-01-23 at 03:45:54ID: 23448098

Alexey, I am in UK too and use Orange and O2.  How did you manage to get tech contact from them.  I am struggling to find anyone to contact from these providers.

Can you elaporate "server state" This issue may well be server issue.  I will dig around in that area and see what I come up with

 

by: alexey_gusevPosted on 2009-01-23 at 03:57:53ID: 23448150

I haven't contacted the operator, as I see that that happens even on the emulator, so the operator is out of the game unfortunately.

I do suspect that it is some unhandled exception happening when cf.net is trying to send HTTP request at sockets level, like the connection was refused by the server or something similar. Perhaps somewhere at IIS level

 

by: TheLearnedOnePosted on 2009-01-23 at 03:59:10ID: 23448156

Did we look into the IIS log for any evidence of that?

 

by: gbzhhuPosted on 2009-01-23 at 04:02:05ID: 23448169

Yep, if it is happening on the emulator and with usb I guess it will have to be either the OS or the .net cf.  What version are you using?  My devices are all WM 6.0 or WM 6.1 which comes with cf.net 2 but we never did any updates on them.  Perhaps there is a fix to this out?

Issues similar to ours

http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesvbcs/thread/6f5386af-9b57-4b79-85a4-2dde9eeb343d/

 

by: gbzhhuPosted on 2009-01-23 at 04:23:44ID: 23448274

Bob,

I looked at my IIS logs and cannot see any errors at all.

 

by: alexey_gusevPosted on 2009-01-23 at 04:26:08ID: 23448285

yes, wm6.0 & wm6.1, cf.net v2.0

and above link looks promising, as it says about Conn Manager and RAS. I reckon OS gets into some wrong state and doesn't serve sockets correctly

 

by: gbzhhuPosted on 2009-01-23 at 04:59:45ID: 23448487


Anyone of you know what one needs to get M$ to look at this?  I have MSDN subcription which I never seem to use.  Would that be enough?

Conn Manager and RAS?
How will that help?  doesn't it mean that it will happen again and then you will have to do the tweak again?

 

by: alexey_gusevPosted on 2009-01-23 at 05:07:11ID: 23448531

for ConnMgr & RAS - yes, the idea is to reset the Something once it's got into wrong state

re. Microsoft - don't know, try their tech support. I've also seen the forum somewhere on their site (perhaps make a post to the forum above)

 

by: gbzhhuPosted on 2009-02-20 at 03:23:37ID: 23690801

Sorry guys,

I have left this open for awhile.  I have new findings:

- My customers assumed that System_SR_ENU.cab is installed on their device as part of .NET CF 2.0 in ROM.  This is not the case.  Having found out about this and installed a cab on one of their devices the correct error was captured and I reported that in the question below

http://www.experts-exchange.com/index.jsp?qid=24161477

I am now trying to figure out why this is happening.  If you could help with that either by continuing your participation here or in the other question I'd appreciate.

Many thanks
H

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...