Hello dear programmers.
I am developing a web based mmorpg. so speed is very vital for me since people don't like slow games :)
i have a map system which uses ajax and asynchronous postbacks for walking. so i want to make it faster as much as possible.
if anybody can spend some time at my page and make suggestion for me i appreciate t...
I use SslStream with TcpClient in following way:
I call BeginRead() method and waiting for its results. When results come, I read them, call BeginRead() again and so on... Sometimes I need create another SslStream with this TcpClient, i.e. perform another ssl handshake.
How can I abort reading execution? It seams that if I try to cal...
I am using Jquery valdiation plugin for validating the form at client side.
I am fetching validation error messages from an xml file.
$("#"+form).validate({
errorLabelContainer: "#dialogError", //msg_error
wrapper: "li",
rules: {
txtInfringementID: {
...
I am performing an http web request which asynchronously gets a response from the server. I wish to perform actions on the result directly and do not wish to have any code running in the meanwhile. The reason it has to be asynchronous is that I am writing a silverlight application.
Here is a code snippet
{
....
request.BeginGetRespons...
VB.NET 2010, .NET 4
Hello all,
I have a System.Timers.Timer object that does some work on its elapsed event:
Private Sub MasterTimer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles MasterTimer.Elapsed
MasterTimer.Enabled = False
'...work...
MasterTimer.Enabled = True
End Sub
My problem ...
Hi,
I have an asynchronous socket and I get the following error ONLY on ONE windows XP machine:
The Undo operation encountered a context that is different from what was applied in the corresponding Set operation.
The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The po...
Hi there,
Can anybody advice me the best practice for closing WCF clients after doing a async calls? Should it be within the "completed" method or should there be a different approach?
/BB
...
How do I create a unit test to test a class that sits in a loop?
Here's the scenario.
I have a class that is injected with a reference to a serial port.
The class has a method called Send(String data);
This public method invokes an aysnchronous private method to do the actual work.
The class under test (CUT) should do the following ...
I'm putting together a series of web parts for a Sharepoint 2010 deployment - a few upgrades (from 2007) as well as a few new ones. I'm attempting to develop all the parts to perform data access server-side via a WCF service (namely, WCF RIA Services in this case). Basic synchronous databinding works great (for example):
SomeGrid.DataSo...
VB.NET 2010, .NET 4
Hello,
I have been using a pretty slick generic invoke method for UI updating from background threads. I forget where I copied it from (converted it to VB.NET from C#), but here it is:
Public Sub InvokeControl(Of T As Control)(ByVal Control As t, ByVal Action As Action(Of t))
If Control.InvokeRequired Then
...
For the last week I've been trying to create an async method. I tried the MSDN article How to: Implement a Component That Supports the Event-based Asynchronous Pattern
but it does the work in a method in the same class. The work I'm doing is a lot more complicated and is its own class. The problem I'm having is the class doing the work ...
public string CreateOrder(string purchaseOrder)
{
using (MyWebService.CreateService service = new MyWebService.CreateService())
{
string orderCode = service.CreateOrder(purchaseOrder);
return orderCode;
}
}
I've added a web service reference to the domain layer of an ASP.NET web app.
This generates the two...
I have following code:
[TestMethod]
public void StartWorkInFirstThread()
{
if (SynchronizationContext.Current == null)
SynchronizationContext.SetSynchronizationContext(
new SynchronizationContext());
var syncContext = SynchronizationContext.Current;
Console.WriteLine("Start work in the first thread ({0}...
I have AsyncPostBackTimeout set to a very large value (3600 = 1 hour). This should cause Ajax request in my .net app (Asp.net 3.5) to continue for an hour before expiring. However, for some reason, they are expiring after approximately 5 minutes (the request continues to execute on the server without any issues).
What could be causing t...
I have a desktop application communicating with a WCF service that I have implemented. The desktop client does not use a generated proxy (Add Service Reference or SvcUtil) rather it uses a channel factory with a reference to the WCF Service contract assembly (the contract assmebly is separate to the implementation). I now need to provide...
Hi,
I have a list of object that i loop through, and in this loop i have an async webrequest that is getting a response from a site, according to the current object's data.
How can i wait for each async request to complete b4 going to the next object in the list?
Should i use application.doevents?
...
Hello,
how can I do the following by means of jQuery?
var xmlhttp;
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else {// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState ==...
Hi,
A simple question that I'm not sure if it has a short answer!
Description
I have a files of JavaScript that to be loaded in a website here are some notes about them:
They are all comes from the same domain (no cross domain loading needed)
They are identical around the website.
There are several files, like jQuery, and 5 other plu...
I ask here since googling leads you on a merry trip around archives with no hint as to what the current state is. If you go by Google, it seems that async IO was all the rage in 2001 to 2003, and by 2006 some stuff like epoll and libaio was turning up; kevent appeared but seems to have disappeared, and as far as I can tell, there is sti...
I have the following (simplified) asynchronous method:
void Transform<X,Y>(X x, Action<Y> resultCallback) {...}
and what I want to do is transform a list of Xs into a list of Ys.
The problem is that even though the Transform method is asynchronous, it has to be called serially (i.e. I have to wait for the callback before calling it w...