locked
Worked fine in visual studio 2008, once deployed........ hahahahah :( RRS feed

  • Question

  • 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;
        }

    Wednesday, January 19, 2011 12:51 PM

Answers

  • User470413944 posted

    Hi,

    Visual Studio usually has the same privilages as yourself, if it is published it use NETWORK SERVICE or others(depends on your host IIS settings) with lower privilages.

    Can you provide more details about your host settings?

    I'm looking forward for your reply.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 24, 2011 7:50 AM