Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/code4b/public_html/sysrc/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/code4b/public_html/sysrc/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /home/code4b/public_html/sysrc/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /home/code4b/public_html/sysrc/wp-includes/classes.php on line 594

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/code4b/public_html/sysrc/wp-includes/classes.php on line 611

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/code4b/public_html/sysrc/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/code4b/public_html/sysrc/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /home/code4b/public_html/sysrc/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /home/code4b/public_html/sysrc/wp-includes/classes.php on line 705

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/code4b/public_html/sysrc/wp-includes/classes.php on line 728

Strict Standards: Redefining already defined constructor for class wpdb in /home/code4b/public_html/sysrc/wp-includes/wp-db.php on line 306

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /home/code4b/public_html/sysrc/wp-includes/cache.php on line 425

Strict Standards: Redefining already defined constructor for class WP_Dependencies in /home/code4b/public_html/sysrc/wp-includes/class.wp-dependencies.php on line 15
Archive June | Sysrc’s tech blog

Archive for June, 2009

WebRequest and Unable to read data from the transport connection Error

Tuesday, June 30th, 2009 | Code | Comments Off

Weird thing just happened, a Windows Service responsible for grabbing some data form an online XML source, suddenly stopped working after two years of continuous functioning…

First I thought that the remote XML had changed somehow but the service returned
“Unable to read data from the transport connection: The connection was closed.”

The code that connected to the remote XML was pretty low-tech:

WebRequest wRq = WebRequest.Create(remoteUri);
WebResponse wRs = wRq.GetResponse();
Stream strm = wRs.GetResponseStream();
StreamReader sr = new StreamReader(strm, Encoding.UTF7);
XmlDocument xDoc = new XmlDocument();
xDoc.Load(strm);
//IT WAS CRASHING HERE

After some research it seems that the remote side closes the connection prior to it being finished…
I had to change the code as follows and the problem was solved:


CookieContainer CC = new CookieContainer();
HttpWebRequest wRq = (HttpWebRequest)WebRequest.Create(remoteUri);
wRq.Proxy = null;
wRq.UseDefaultCredentials = true;
wRq.KeepAlive = false; //THIS DOES THE TRICK
wRq.ProtocolVersion = HttpVersion.Version10; // THIS DOES THE TRICK
wRq.CookieContainer = CC;
WebResponse wRs = wRq.GetResponse();
Stream strm = wRs.GetResponseStream();
StreamReader sr = new StreamReader(strm, Encoding.UTF7);
XmlDocument xDoc = new XmlDocument();
xDoc.Load(strm);
//NO LONGER CRASHING HERE

Windows Mobile Tip - storage card 2

Tuesday, June 16th, 2009 | General | No Comments

If you have a Windows Mobile 6 device, you use it with a storage card for a period of time and for some reason (I don’t know - your HTC DUAL TOUCH screen stops working and you don’t want the service guys to copy the content of your card) you start it without a storage card then reinsert the initial card, all the programs installed on that card will stop working ( and NO the card is not broken)┬ábecause Windows Mobile already has a Storage Card folder and has created a Storage Card 2 folder although it’s the same card…

So the solution is to enter the windows explorer and rename the Storage card folder into Storage card something then do a reboot of the device…

Wasn’t it smarter if they have created a checksum on the card, so when you would insert cards the link between installed programs and card would be maintained trough that checksum?