User-57232281 posted
We had a contractor create a web based application (management decided web based vs windows) to run our STD process. The process makes use of thermal printers and scantron scanners. During developement, everything seemed to be
running fine. The contractor and I both had VS on our machines and the printers and scanner worked flawlessly. Well, the contractor told the manager that she would not have time to test the scanning process that SHE WORKED ON ALONE.
The manager said not to worry, we (ME) would test it.
As soon as the contractor left, I loaded production data into the system, which was eye opener #1. Everything worked fine with the 4 test cases, but with production data.....
The second issue, and the reason I write this is that the printer and scanner no longer worked once the application was deployed. I now know that periphals cannot be controled through a browser. I found a way to get past the
printing. I wrote the info to a table and created a windows app to check the table and print the jobs. But for the scanner, I decided to deploy the application locally to the machine where the scanner would be attached. In
theory, this should work. But, after deploying the website, it did not work. The application is not controlling the scanner properly. By properly, I mean that the scanner has some executables written in C++ that need
to run. I can get it to start the scanning process, but can't get it to recieve a response back and continue processing.
My question is, why is it that I have no problem running the application through Visual Studio, but the published website has many problems. The scanner executable is on the C:, Visual studio runs it. Is it that the published
site cannot access the C:? I can get the deployed site to scan the form, but it get's stuck waiting to hear back from the scanner. It never makes it past p.WaitForExit(). I'm thinking Visual Studio has privilages that the published
website does not.
protected void lbtnScan_Click(object sender, EventArgs e)
{
//parameter: -oc:\stdtest\a.txt -b001
Process p = new Process();
p.StartInfo = new ProcessStartInfo(@"c:\STDTest\SCANPROG\rscan.exe", "-o" + @"C:\STDTest\a.txt" + " -b001");
p.Start();
p.WaitForExit();
protected void lbtnScan_Click(object sender, EventArgs e)
{
//parameter: -oc:\stdtest\a.txt -b001
Process p = new Process();
p.StartInfo = new ProcessStartInfo(System.Configuration.ConfigurationManager.AppSettings["RScanPath"] + @"\ScanProg\rscan.exe", "-o" + System.Configuration.ConfigurationManager.AppSettings["RScanPath"] + @"\a.txt"
+ " -b001");
p.Start();
p.WaitForExit();
if (Request.QueryString["page"].ToUpper() == "ENTRY")
SplitRawDataEntry();
else if (Request.QueryString["page"].ToUpper() == "UPDATE")
SplitRawDataUpdate();
lblMsg.Text = "Scanning Completed";
gvLogs.DataSource = null;
gvLogs.DataBind();
ViewState["Override"] = 0;
lbtnViewAllLogs.Enabled = true;
lbtnUploadAll.Enabled = true;
lbtnOverride.Enabled = true;
}