ASP.NET and Starting Proceses [yet another (hopefully the last) question]

Discussion in 'ASP .Net' started by Serdar C., May 8, 2005.

  1. Serdar C.

    Serdar C. Guest

    hi again.. i wrote a webservice like this:

    [WebMethod]

    public void DrawPlot()

    {

    System.Diagnostics.Process R = new System.Diagnostics.Process();

    R.StartInfo.FileName = "plot.vbs";

    R.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;

    R.StartInfo.CreateNoWindow = true;

    R.Start();


    //R.WaitForExit();

    }



    which has to run the "plot.vbs" command when the service runs..

    but i cant make it run.. i get a "this page cannot be displayed" error when
    i run that method. what am i doin wrong? is there something that i need to
    add into web.config or something elsE?



    thanx for your time and helping..
    Serdar C., May 8, 2005
    #1
    1. Advertising

  2. Serdar C.

    Scott Allen Guest

    Hi Serdar:

    I believe what you'll need to do is actually execute cscript.exe as
    the process, and pass the script file as an argument.

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On Sun, 8 May 2005 14:31:44 +0300, "Serdar C."
    <> wrote:

    >hi again.. i wrote a webservice like this:
    >
    >[WebMethod]
    >
    >public void DrawPlot()
    >
    >{
    >
    >System.Diagnostics.Process R = new System.Diagnostics.Process();
    >
    >R.StartInfo.FileName = "plot.vbs";
    >
    >R.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
    >
    >R.StartInfo.CreateNoWindow = true;
    >
    >R.Start();
    >
    >
    >//R.WaitForExit();
    >
    >}
    >
    >
    >
    >which has to run the "plot.vbs" command when the service runs..
    >
    >but i cant make it run.. i get a "this page cannot be displayed" error when
    >i run that method. what am i doin wrong? is there something that i need to
    >add into web.config or something elsE?
    >
    >
    >
    >thanx for your time and helping..
    >
    Scott Allen, May 8, 2005
    #2
    1. Advertising

  3. Serdar C.

    Serdar C. Guest

    at last i have a working webservice...

    thanx so much for helping, god bless the msdn :)


    "Scott Allen" <> wrote in message
    news:...
    >
    > Hi Serdar:
    >
    > I believe what you'll need to do is actually execute cscript.exe as
    > the process, and pass the script file as an argument.
    >
    > --
    > Scott
    > http://www.OdeToCode.com/blogs/scott/
    >
    > On Sun, 8 May 2005 14:31:44 +0300, "Serdar C."
    > <> wrote:
    >
    > >hi again.. i wrote a webservice like this:
    > >
    > >[WebMethod]
    > >
    > >public void DrawPlot()
    > >
    > >{
    > >
    > >System.Diagnostics.Process R = new System.Diagnostics.Process();
    > >
    > >R.StartInfo.FileName = "plot.vbs";
    > >
    > >R.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
    > >
    > >R.StartInfo.CreateNoWindow = true;
    > >
    > >R.Start();
    > >
    > >
    > >//R.WaitForExit();
    > >
    > >}
    > >
    > >
    > >
    > >which has to run the "plot.vbs" command when the service runs..
    > >
    > >but i cant make it run.. i get a "this page cannot be displayed" error

    when
    > >i run that method. what am i doin wrong? is there something that i need

    to
    > >add into web.config or something elsE?
    > >
    > >
    > >
    > >thanx for your time and helping..
    > >

    >
    Serdar C., May 8, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darrel
    Replies:
    1
    Views:
    382
  2. Berehem
    Replies:
    4
    Views:
    541
    Lawrence Kirby
    Apr 28, 2005
  3. Gandalf
    Replies:
    3
    Views:
    277
    Gandalf
    Jun 13, 2008
  4. Leo Violette
    Replies:
    2
    Views:
    425
    Leo Violette
    Mar 19, 2009
  5. Michael Linfield

    hopefully my last range date question

    Michael Linfield, Sep 3, 2007, in forum: Ruby
    Replies:
    0
    Views:
    71
    Michael Linfield
    Sep 3, 2007
Loading...

Share This Page