Need some help for sending custom commands from ASP.NET page

Discussion in 'ASP .Net' started by erbilkonuk, May 16, 2008.

  1. erbilkonuk

    erbilkonuk Guest

    Hi everyone,
    I have been developing a project that is composed of one windows
    service and one ASP.NET web site. The windows service and ASP.NET web
    site reside on the same server.
    I want to send start/stop service commands and custom commands to the
    Windows service from ASP.NET Web site.
    What I have done is :

    * I read in a site that an web site user get credential of a user
    "Network Service" at the server so I run the service with account
    "Network Service"
    * I give full control for user "Network Service" on Windows Service
    executable .


    What I get at the web site when I try to start/stop Service or send
    custom commands is "access denied' error.


    Should I programmatically get any priviledges? What should I do?


    Best regards


    B. Erbil KONUK
    erbilkonuk, May 16, 2008
    #1
    1. Advertising

  2. erbilkonuk

    Manish Guest

    Hi,

    When you browse to an ASP.NET page, it runs under the ASPNET account by
    default not under the windows account you are logged in as.

    Run this as an ASP.NET app to start and stop your services. This sample
    mentioned in the link starts and stops SQL Server.

    Please refer to the link below:

    http://www.eggheadcafe.com/community/aspnet/2/15891/asp-net--start-and-stop.aspx

    Regards,
    Manish
    www.ComponentOne.com



    "erbilkonuk" wrote:

    > Hi everyone,
    > I have been developing a project that is composed of one windows
    > service and one ASP.NET web site. The windows service and ASP.NET web
    > site reside on the same server.
    > I want to send start/stop service commands and custom commands to the
    > Windows service from ASP.NET Web site.
    > What I have done is :
    >
    > * I read in a site that an web site user get credential of a user
    > "Network Service" at the server so I run the service with account
    > "Network Service"
    > * I give full control for user "Network Service" on Windows Service
    > executable .
    >
    >
    > What I get at the web site when I try to start/stop Service or send
    > custom commands is "access denied' error.
    >
    >
    > Should I programmatically get any priviledges? What should I do?
    >
    >
    > Best regards
    >
    >
    > B. Erbil KONUK
    >
    Manish, May 16, 2008
    #2
    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. Guest
    Replies:
    0
    Views:
    668
    Guest
    Feb 25, 2004
  2. Zach Flynn
    Replies:
    2
    Views:
    3,322
    Alan Johnson
    Jun 5, 2005
  3. Ben Pfaff

    Re: man pages for C commands (GCC commands)

    Ben Pfaff, Jun 24, 2003, in forum: C Programming
    Replies:
    4
    Views:
    3,951
    Thomas Stegen
    Jun 28, 2003
  4. Tim Stanka
    Replies:
    1
    Views:
    785
    Jeff Epler
    Aug 2, 2004
  5. Domino
    Replies:
    5
    Views:
    372
    dorayme
    Nov 5, 2006
Loading...

Share This Page