Advertisement

08.23.2007 at 09:31AM PDT, ID: 22782740
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.8

Serial Port Interaction with web form issue

Asked by Praesidium in Microsoft Visual C#.Net, C# Programming Language, Programming for ASP.NET

Tags: , ,

This question may be a bit ambiguous, but I can't seem to determine where I've gone wrong.  Basically I have a web application that I need to communicate with a Serial Port attached to x computer (where x computer has the app running in browser).

In the page I tried to do something like this, but all it does is crash the webService:
static System.IO.Ports.SerialPort port;

        protected override void OnInit(EventArgs e)
        {
            port = new System.IO.Ports.SerialPort();
            port.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(port_DataReceived);
            port.PortName = "COM1";
            port.BaudRate = 9600;
            port.Parity = System.IO.Ports.Parity.None;
            port.StopBits = System.IO.Ports.StopBits.One;
            port.Handshake = System.IO.Ports.Handshake.None;
            if (port.IsOpen)
            {
                port.Close();
            }
            port.Open();
            base.OnInit(e);        
        }

        void port_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
        {
            string input = port.ReadLine();
OR
            string input = port.ReadExisting();
            // Now do something with the string retrieved
        }

This is not working, I am not getting any exceptions, either the app keeps running, never firing any event, or it crashes the webService...  Insight anybody?Start Free Trial
 
Loading Advertisement...
 
[+][-]08.23.2007 at 09:36AM PDT, ID: 19755806

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.23.2007 at 09:54AM PDT, ID: 19755943

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.23.2007 at 09:58AM PDT, ID: 19755969

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.24.2007 at 07:02AM PDT, ID: 19762222

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.24.2007 at 07:28AM PDT, ID: 19762445

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, C# Programming Language, Programming for ASP.NET
Tags: serial, port, web
Sign Up Now!
Solution Provided By: Garbi4332
Participating Experts: 2
Solution Grade: B
 
 
[+][-]08.26.2007 at 06:23PM PDT, ID: 19773098

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.26.2007 at 11:25AM PDT, ID: 19965390

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.28.2007 at 10:19AM PDT, ID: 19980275

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_1_20070628