ASPNET account permissions

Discussion in 'ASP .Net' started by Paul Aspinall, Mar 6, 2006.

  1. Hi
    I am trying to print, server side, from my web application.

    I'm getting problems, as my ASPNET account is a local account, and is not
    trusted on the domain to print to printers (ie. does not belong to 'Users'
    group)

    What is the best way round this??

    I've asked the security guys to specifically add the account with
    permissions to the printer (ie. specifically add \\webhost\ASPNET ) but they
    say that it won't work, because \\webhost is not trusted in the domain).

    Can anyone help??

    What is the best way to let ASPNET run under another account? (ie other than
    the local ASPNET)

    Surely the network guys can add the local machine account \\webhost\ASPNET
    to have permissions to print on the printer?

    Thanks



    Paul
     
    Paul Aspinall, Mar 6, 2006
    #1
    1. Advertising

  2. Add impersonate=true to web.config

    "Paul Aspinall" wrote:

    > Hi
    > I am trying to print, server side, from my web application.
    >
    > I'm getting problems, as my ASPNET account is a local account, and is not
    > trusted on the domain to print to printers (ie. does not belong to 'Users'
    > group)
    >
    > What is the best way round this??
    >
    > I've asked the security guys to specifically add the account with
    > permissions to the printer (ie. specifically add \\webhost\ASPNET ) but they
    > say that it won't work, because \\webhost is not trusted in the domain).
    >
    > Can anyone help??
    >
    > What is the best way to let ASPNET run under another account? (ie other than
    > the local ASPNET)
    >
    > Surely the network guys can add the local machine account \\webhost\ASPNET
    > to have permissions to print on the printer?


    --
    WBR,
    Michael Nemtsev :: blog: http://spaces.msn.com/laflour

    "At times one remains faithful to a cause only because its opponents do not
    cease to be insipid." (c) Friedrich Nietzsche
     
    =?Utf-8?B?TWljaGFlbCBOZW10c2V2?=, Mar 6, 2006
    #2
    1. Advertising

  3. "Paul Aspinall" <> wrote in message
    news:MtUOf.92306$...
    | Hi
    | I am trying to print, server side, from my web application.
    |
    | I'm getting problems, as my ASPNET account is a local account, and is not
    | trusted on the domain to print to printers (ie. does not belong to 'Users'
    | group)
    |
    | What is the best way round this??
    |
    | I've asked the security guys to specifically add the account with
    | permissions to the printer (ie. specifically add \\webhost\ASPNET ) but
    they
    | say that it won't work, because \\webhost is not trusted in the domain).
    |
    | Can anyone help??
    |
    | What is the best way to let ASPNET run under another account? (ie other
    than
    | the local ASPNET)
    |
    | Surely the network guys can add the local machine account \\webhost\ASPNET
    | to have permissions to print on the printer?
    |
    | Thanks
    |
    |
    |
    | Paul
    |
    |

    Don't know what namespace you are using for printing, but are you aware of
    this:
    http://msdn2.microsoft.com/en-us/library/5ekk3hse.aspx
    especially the caution mentions .... not supported ...
    As a general rule, you should not print from Windows Services or the like,
    ever imagined where the possible spooler action requests, error and warning
    messages are going to?

    Willy.
     
    Willy Denoyette [MVP], Mar 6, 2006
    #3
  4. re:
    > What is the best way to let ASPNET run under another account? (ie other than the local ASPNET)


    "How To: Create a Custom Account to Run ASP.NET"
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/secnetht01.asp

    "ASP.NET Required Access Control Lists (ACLs)"
    http://msdn2.microsoft.com/en-us/library/kwzs111e.aspx




    Juan T. Llibre, asp.net MVP
    aspnetfaq.com : http://www.aspnetfaq.com/
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ===================================
    "Paul Aspinall" <> wrote in message
    news:MtUOf.92306$...
    > Hi
    > I am trying to print, server side, from my web application.
    >
    > I'm getting problems, as my ASPNET account is a local account, and is not trusted on the domain to
    > print to printers (ie. does not belong to 'Users' group)
    >
    > What is the best way round this??
    >
    > I've asked the security guys to specifically add the account with permissions to the printer (ie.
    > specifically add \\webhost\ASPNET ) but they say that it won't work, because \\webhost is not
    > trusted in the domain).
    >
    > Can anyone help??
    >
    > What is the best way to let ASPNET run under another account? (ie other than the local ASPNET)
    >
    > Surely the network guys can add the local machine account \\webhost\ASPNET to have permissions to
    > print on the printer?
    >
    > Thanks
    >
    >
    >
    > Paul
    >
     
    Juan T. Llibre, Mar 6, 2006
    #4
  5. This isn't of any help, the printers are attached to a remote server, the
    impersonated account can't access remote resources unless kerberos
    delegation is configured correctly and all clients are authenticated using
    kerberos.
    As I said in my other reply, printing is not supported and in general
    doesn't work from services (windows and web).

    Willy.


    "Michael Nemtsev" <> wrote in
    message news:...
    | Add impersonate=true to web.config
    |
    | "Paul Aspinall" wrote:
    |
    | > Hi
    | > I am trying to print, server side, from my web application.
    | >
    | > I'm getting problems, as my ASPNET account is a local account, and is
    not
    | > trusted on the domain to print to printers (ie. does not belong to
    'Users'
    | > group)
    | >
    | > What is the best way round this??
    | >
    | > I've asked the security guys to specifically add the account with
    | > permissions to the printer (ie. specifically add \\webhost\ASPNET ) but
    they
    | > say that it won't work, because \\webhost is not trusted in the domain).
    | >
    | > Can anyone help??
    | >
    | > What is the best way to let ASPNET run under another account? (ie other
    than
    | > the local ASPNET)
    | >
    | > Surely the network guys can add the local machine account
    \\webhost\ASPNET
    | > to have permissions to print on the printer?
    |
    | --
    | WBR,
    | Michael Nemtsev :: blog: http://spaces.msn.com/laflour
    |
    | "At times one remains faithful to a cause only because its opponents do
    not
    | cease to be insipid." (c) Friedrich Nietzsche
    |
     
    Willy Denoyette [MVP], Mar 6, 2006
    #5
  6. Thanks for the reply.

    I have actually got it working with this change to web.config - thanks for
    that.

    My next problem was that the printers needed installing for each user, or
    some registry hacking done to allow the printers to be added to 'all
    users'.... I spent some time playing with this, but eventually made an
    Interop call back to Win32 API, which allowed me to redirect print directly
    to a share \\computer\queue

    All works fine.

    Thanks for the help


    Paul


    "Michael Nemtsev" <> wrote in
    message news:...
    > Add impersonate=true to web.config
    >
    > "Paul Aspinall" wrote:
    >
    >> Hi
    >> I am trying to print, server side, from my web application.
    >>
    >> I'm getting problems, as my ASPNET account is a local account, and is not
    >> trusted on the domain to print to printers (ie. does not belong to
    >> 'Users'
    >> group)
    >>
    >> What is the best way round this??
    >>
    >> I've asked the security guys to specifically add the account with
    >> permissions to the printer (ie. specifically add \\webhost\ASPNET ) but
    >> they
    >> say that it won't work, because \\webhost is not trusted in the domain).
    >>
    >> Can anyone help??
    >>
    >> What is the best way to let ASPNET run under another account? (ie other
    >> than
    >> the local ASPNET)
    >>
    >> Surely the network guys can add the local machine account
    >> \\webhost\ASPNET
    >> to have permissions to print on the printer?

    >
    > --
    > WBR,
    > Michael Nemtsev :: blog: http://spaces.msn.com/laflour
    >
    > "At times one remains faithful to a cause only because its opponents do
    > not
    > cease to be insipid." (c) Friedrich Nietzsche
    >
     
    Paul Aspinall, Mar 7, 2006
    #6
    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. Simon Harris

    Permissions for ASPNET Account

    Simon Harris, Jan 5, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    439
    Saravana
    Jan 6, 2005
  2. djoledjole
    Replies:
    2
    Views:
    570
    djoledjole
    Apr 8, 2005
  3. =?Utf-8?B?WW9nZXNoIFBhbmNob2xp?=

    Permissions Issues with ASPNET Account

    =?Utf-8?B?WW9nZXNoIFBhbmNob2xp?=, Apr 20, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    586
    =?Utf-8?B?WW9nZXNoIFBhbmNob2xp?=
    Apr 21, 2005
  4. nilapenn
    Replies:
    3
    Views:
    660
    Joe Kaplan \(MVP - ADSI\)
    Feb 14, 2005
  5. Replies:
    4
    Views:
    658
    Paul Clement
    Sep 15, 2005
Loading...

Share This Page