.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Why am I getting a huge delay in serialPort_DataReceived() on a particular machine?

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :.NET Framework

When I run a Windows Forms App on a particular computer a huge delay develops in firing the serialPort_DataReceived() event in my code which I don't see when I run the app on another machine. I know that the data is going into the UART because I have snooped on it, but the serialPort_DataReceived() event handler delays firing for up to 20 seconds after the data goes in the port. No data is ever lost, it just gets way behind in firing this event handler. The really strange thing is that if I put the snooper on the serial port to watch the data going into the computer it loads the line a little and draws the peak voltage down from 16.3 V to 15.3 V on the RS232 transmission line going into the computer and the event handler starts firing without delays. This doesn't seem like just a hardware problem because the buffer on a UART is quite small and I never loose any data. I am sending data continuously at 57600 baud at a rate of about a dozen characters per second. In order for this to have a delay of up to 20 seconds before the event handler fires in my C# code it must be getting buffered in Serial Port Object, right? If it gets that far, why isn't the event handler firing on this computer? And why does he same code work fine on another machine?

View Complete Post

More Related Resource Links

Delay Activity is not working with SharePoint state machine workflow

Hello,   I have a problem with Delay Activity in Sharepoint state machine workflow. This issue is kind of common to many people but so far I haven't come accross any working solution. In one of the workflow states, I want to add a delay activity to send email notification if no action is taken after certain time. Below is what I have done:   In the targeted state: 1) add one eventDriven activity to handle the normal process (approve the item) 2) add another eventDriven activity to send the reminder email. In this eventDriven activity, I first add a delayActivity, set it to 2 minutes for test purpose. Then I add a Sharepoint SentEmail activity.   With my test, the Dealy Activity is never invoked after timeout period. What should I do to make the delay activity work in the SharePoint state machine workflow? Is there any work around if the delay activity is simply not working there?   Any suggestions are appreciated.

ASP.Net + State Machine Workflow + Delay Activites

We have been developed an approval/rejection/Escalation 3 level State machine worklfow which has been hosted in an ASP.Net application. For escalation we are using multiple delay activities. We have deployed the ASP.Net application in a server. The application is running perfectly as we were expecting when the server is in unlocked state. But Once the server is in Locked or Logged off state the escalation part of the workflow is not functioning as required. Please give us suggestions as we are unable to identify what the issue is?

Thanks any suggestions.

State Machine Workflow + External Event + Delay activity



I have state machine workflow with a state contain 2 event driven activities, one is waiting for an external event, and second one is delay. If the external event didn't happen within specified time, timeout occurs and send email. But if the external event delivered, it transited to next state.


Both situation works fine. But once the external event occurred and transited to next state, the delay activity time out happens and it sends the mail. I don't want it happen, When i read through various blog, I learnt that once the workflow instance moved to next state, all event subscriptions related to the previous state are removed from the queue.... But it is not happening in my situation

Kindly help me to find where i am going and to resolve this issue..


p.s I set manualworkflow scheduler  - useActiv

huge number of data from database ... so how to minimize load time


Hi ...

I have used the above method to configure my crystal report ...

Its working fine , But i have huge number of data in database ....

So , it take long time to load the report ...

So , i have decided to show only the last 50 records inserted into the database , not all the 500 records to be loaded every time.

Plz help me with this issue  ...


Also , Plz explain me abt index legend in crystal report.

Pattern for huge logic



I am looking for a pattern/way to code for implement Huge logical hierarchy, Basically this is to verify person details like qualification, experience, expertised-in and global region.... and issue certain access for a perion of time.

The verification process has huge number of conditions it took around 1 year to document. And now we have to develop C# to implement it, can any one help me...? a sample code will be appreciated.

Thank you


Need help using control adapters at the machine level

Hi guys!

Let me explain our situation. I do web development at a university at which we have to meet strict accessibility guidelines. I've specially modified the adapters (as well as extended CompositeDataBoundControlAdapter to include GridView) for use on our site and to use with our global stylesheets as well as compiled the control adapters into a DLL.

The control adapters now all reside in the WebServices.CssFriendlyAdapters DLL.  (For example, WebServices.CssFriendlyAdapters.GridViewAdapter).

Currently, when someone drops an App_Browsers folder in to their site with the adapters specified, the adapters work. However, we'd like to be able to specify this in the C:\WINDOWS\Microsoft.NET\Framework\(version number)\CONFIG\Browsers directory so that the adapters work automatically without anyone having to move anything into App_Browsers for every site. To ensure that someone can still use the "old way" or will not be confused by their controls being adapted, I've written in code that uses the base rendering methods unless xhtmlConformance is set to "Strict" in the site's web.config file.

Anyway, on to the problem. When trying to compile the controlAdapters into the C:\WINDOWS\Microsoft.NET\Framework\(version number)\CONFIG\Browsers directory using aspnet_regbrowsers.exe (see http://msdn2.microsoft.com/en-us/library/ms229858.a

{ End Bracket }: The Emergence Of Machine Translation


Vikram Dendi looks at how machine translation is poised to change the world and why it is so important to deliver information in multiple languages.

Vikram Dendi

MSDN Magazine January 2009

{ End Bracket }: Microsoft Java Virtual Machine Update


In a settlement agreement reached in January 2001 to resolve a dispute over the Microsoft distribution of its Java implementation, Sun Microsystems and Microsoft agreed to limit the duration of the time Microsoft would use Sun's source code and compatibility test suites to support the Microsoft® Java Virtual Machine (MSJVM).

Brian Keller

MSDN Magazine October 2004

Express Editions: Get a Lean, Mean Dev Machine with the Express Editions of Visual Basic and SQL Ser


The Express Editions of Visual Basic and SQL Server 2005 have lots of the features of the full-sized versions, but with a lot less of the overhead. Professional developer features such as full IntelliSense support, local debugger, Add Web Reference, and the improved Visual Data Tools will all be available in the Express products, so you don't have to leave your favorite features behind. In this article the author introduces you to these express editions and builds a sample app to get you started.

Brian A. Randell

MSDN Magazine September 2004

Virtual Server 2005: Program Customized Testing Environments Without Trashing Your Machine


Efficient testing can require many different machine and server configurations but the effort needed to manage these test environments can take a toll. Microsoft Virtual Server 2005 simplifies the provisioning and management of testing environments. This article demonstrates how the extensive Virtual Server COM API can be used to create an automated application testing environment to make your testing chores a whole lot easier.

Ben Waldron

MSDN Magazine August 2004

Resource File: Microsoft Virtual Machine Remediation


Developers who use the Microsoft virtual machine (VM) will need to transition away from its use by January 2004. To comply with a court settlement with Sun Microsystems, Microsoft will not be able to update the Microsoft VM, even to repair critical security vulnerabilities.

MSDN Magazine September 2003

How can Install Office 2007 on Windows server 2008 R2 64 bit machine in WSS 3.0

I have  64 bit machine  and Windows server 2008 R2 has installed. i have successfully install WSS 3.0  , but  when i tried to install  office 2007 ,  one  error  has  come  "OS is not compatible "  i thought  it was asking  for 64 bit office  2007   and i go through the  google and R&d find no 64 bit office is available ,  i have used   excel .dll in my custom code  so my problem is that   how can  install office 2007  on 64 bot OS 2008 r2  machine .  if anyone can help   me  , please let me know . thanks in advance

Email enabld list delay on recieving emails


So the situation is, i have a list, that receives emails from a particular account all day long, recently it has started recieving emails "late" being it will mass process emails at various times of the day. Before it proccessed them as soon as they were received.

Event log shows

A critical error occurred while processing the incoming e-mail file C:\Inetpub\mailroot\Drop\e472144001cb44a40000001e.eml. The error was: The process cannot access the file 'C:\Inetpub\mailroot\Drop\e472144001cb44a40000001e.eml' because it is being used by another process..


Have this error everywhere.

        -Restarted SMTP

        -Restarted IIS

It seems SMTP is having issues but wanted to come here and get some insight.


-I havent changed anythign recently except new cable runs to the switch

-There is no mail in the (Drop, Mailbox,Pickup, Queue) folders

-mail setup settings are

              -incoming is set to "Advanced" , no,  server.domain.com

Outgoing is my exange server.



Form authentication by using 2 different machine



          i want to use form authentication.i have 2 different application.both are at different machine.i want to use common form authentication. suppose i have 2 application called "app1" and "app2".

There is one form called CElaunch.aspx page in app2.and i want to use this page in app1. we cant navigate the this page directly it should be ask to login page when we open directly. login page is from app1.

app2 web.config file

<authentication mode="Forms">
      <forms loginUrl="http://slx75pc/SlxClientSC73/Login.aspx" domain="configengine.com" protection="All" timeout="30"
    name=".SLXAUTH" path="/" defaultUrl="default.aspx" requireSSL="false" slidingExpiration="true"
    cookieless="UseDeviceProfile" enableCrossAppRedirects="true"/>

Timer delay

Hi guys, Please can one of you help me out. I have a bit of a trouble with the timer, it delay of 10 seconds which it should be of 5 seconds when I started the timer.   here it is the code Public Class Form1 Dim cPos As Point Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cPos = Windows.Forms.Cursor.Position End Sub Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick If Me.Panel1.ClientRectangle.Contains(Me.Panel1.PointToClient(Windows.Forms.Cursor.Position)) Then Me.Panel1.Show() If Panel1.Visible = True Then Timer1.Interval = 5000 Timer1.Start() Dim nPos As Point = Windows.Forms.Cursor.Position If cPos <> nPos Then cPos = nPos Else MessageBox.Show("mouse NOT moved in last 5 secs.") Panel1.Visible = False Timer2.Enabled = True End If End If End If End Sub Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick Dim nPos As Point = Windows.Forms.Cursor.Position If cPos <> nPos Then cPos = nPos If Panel1.Visible = False Then If Me.Panel1.ClientRectangle.Contains(Me.Panel1.PointToClient(Windows.Forms.Cursor.Position)) Then Panel1.Visib

Deploy a .NET application on the ttarget machine

Hi all, I have a project, is written in C#, using .Net framework 3.5. When I build a setup installer, capacity of the setup is about 10MB. Suppose,  I put the setup files in a web , and users download it to install in their PC. But i think, Users must be download .NET framework to run my project. In this case, users ought to download a .rar file , which have more 200MB over the internet. It is very heavy :( So, I want to find out the best solution to deploy .NEt application to the client 's PC. Anybody help me,please ? Thanks so much!  

CheckedListBox displays System.Data.DataRowView on one machine

As I was writing this post I solved my problem. Now I will share the solution for anyone who may stumble across this legacy cr*p. I inherited an old VB.NET application written in the old Visual Studio .Net against the 1.0 framework. Recently we had to rebuild a couple of machines and redeploy the app. We have CheckedListBox controls bound using the DataSource property and suddenly all we could see was System.Data.DataRowView in the list on these machines. All the forums out there tell you that binding the items with the DataSource property is not supported by Microsoft and offer code fixes, which we obviously do not want to do. I installed the .Net Framework 1.0 redistributable and fixed it right up. Which is a little strange because one of the machines it still works on only has 1.1. But there you have it  I actually tested this on another machine by installing 1.1 first, which did not fix the problem, but installing 1.0 did. And another interesting thought. The executable and its class library dependency reside in a network share. After installing the 1.0 framework I had to run a Caspol.exe command to grant privs to the share or the executable could not access the library. The app functioned fine without the Caspol.exe command (except the ListBox of course) prior to installing the 1.0 framework. Strange stuff...Hope this helps someone someday.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend