Archiv für die Kategorie ‘English’

Exception after sending data async from a thread

Samstag, 24. Mai 2008

If you have a situation like this:

void MyThreadFunc()
{
// do some work

socket.BeginSend(buffer, 0, buffer.Length, 0, new AsyncCallback(MyCallback), s);
}

void MyCallback(IAsyncResult ar)
{
Socket s = (Socket) ar.AsyncState;
s.EndSend(ar);
}

And you send a big buffer over a slow connection it can happen that calling EndSend() will throw a SocketException ‘The I/O operation has been aborted because of either a thread exit or an application request’.

This happens because the Thread that started the sending is no more available when the sending ends. The only solution I know is to make sure the thread is still available or to use syncronous sending if possible.

WordPress aktualisiert / Worpress updated

Samstag, 05. April 2008

Heute habe ich endlich WordPress auf Version 2.5 aktualisiert.
Today i’ve updated WordPress to the Version 2.5.

WordPress aktualisiert / Worpress updated

Freitag, 12. Oktober 2007

Heute habe ich endlich WordPress auf Version 2.3 aktualisiert. Zudem habe ich das Plugin Ultimate Google Analytics installiert um Statistiken über mein Blog mittels Google Analytics zu erhalten.
Today i’ve updated WordPress to the Version 2.3. I’ve also installed the PlugIn Ultimate Google Analytics to gather Statistics for my blog with Google Analytics.

WordPress aktualisiert / Worpress updated

Freitag, 10. August 2007

Heute habe ich endlich WordPress auf Version 2.2.2 aktualisiert.
Today i’ve updated WordPress to the Version 2.2.2.

WordPress aktualisiert / Worpress updated

Samstag, 07. Juli 2007

Heute habe ich endlich WordPress auf Version 2.2.1 aktualisiert.
Today i’ve updated WordPress to the Version 2.2.1.

Exception “No web service found at:” with /js or /jsdebug

Freitag, 09. März 2007

With “ASP.NET 2.0 AJAX Extensions 1.0″ (I love this name with two version numbers inside…) you can request a JavaScript Proxy for a web service with appending /js or /jsdebug to the web service path, like “http://my-server/my-service.asmx/js”.

When I deployed my application I’ve got the InvalidOperationException “No web service found at:”. When I called the web service without /js or /jsdebug the web service worked (at least the generated forms in the Browser where shown).

I’ve spent a lot of time ’til I recognized the File my-service.asmx was not included in the deploy package. So without the /js appended the my-service.asmx file was not needed, the code from the compiled dll was executed directly, but when I added /js it needed the file.

Conclusion:
Don’t forget to add the .asmx files in the deployment of your ASP.NET AJAX Project!

Free books under FreeTechBooks.com

Sonntag, 04. März 2007

On the website FreeTechBooks.com there are a lot of free books that cover themes like programming in various languages, software engineering, operating systemes, webdesign, algorithms, cryptography and artificial intelligence but also mathematics, electric circuits and singal processing.

WordPress aktualisiert / Worpress updated

Dienstag, 05. September 2006

Heute habe ich endlich WordPress auf Version 2.0.4 aktualisiert.
Today i’ve updated WordPress to the Version 2.0.4.

WordPress aktualisiert / Worpress updated

Sonntag, 14. Mai 2006

Nachdem ich meine WordPress-Installation in letzter Zeit etwas vernachlässigt hatte (Version 1.5.1.3) habe ich WordPress auf die Version 2.0.2 aktualisiert.

After neglecting my WordPress-Installation lately (Version 1.5.1.3) I’ve upgraded WordPress to the Version 2.0.2.

NCover: Attribute-Based Type Exclusion, but the wrong way round…

Dienstag, 21. Februar 2006

With Version 1.5.2, NCover introduced a Attribute-Based Type Exclusion. It works, but not as I expected.

I normally use NCover together with my test code. When I have a class to test that throws an exception the test function is not covered completely.
Code Coverage without excluded Attribute
The function BarTest() is only covered to 67% as the end of the function is not executed because the Exception was thrown. I was waiting for the possibility to define that a function does not need to be covered with adding an attribute to the Function. But when I add an Attribute to the function and define this Attribute to be excluded (with //ea AttributeName), the Function is not covered.
Code Coverage with excluded Attribute
So instead of having a higher code coverage I have a lower code coverage. Not the result I was expecting from this feature.
But maybe this will change in the future. I keep watching…