Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

ASPNET account permissions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Aspinall - 06 Mar 2006 10:50 GMT
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
Michael Nemtsev - 06 Mar 2006 11:11 GMT
Add  impersonate=true to web.config

> Hi
> I am trying to print, server side, from my web application.
[quoted text clipped - 16 lines]
> Surely the network guys can add the local machine account \\webhost\ASPNET
> to have permissions to print on the printer?

Signature

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] - 06 Mar 2006 14:48 GMT
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.

| Add  impersonate=true to web.config
|
[quoted text clipped - 18 lines]
| > Surely the network guys can add the local machine account \\webhost\ASPNET
| > to have permissions to print on the printer?
Paul Aspinall - 07 Mar 2006 21:12 GMT
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

> Add  impersonate=true to web.config
>
[quoted text clipped - 22 lines]
>> \\webhost\ASPNET
>> to have permissions to print on the printer?
Willy Denoyette [MVP] - 06 Mar 2006 11:27 GMT
| Hi
| I am trying to print, server side, from my web application.
[quoted text clipped - 20 lines]
|
| 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.
Juan T. Llibre - 06 Mar 2006 12:46 GMT
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/s
ecnetht01.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/
===================================
> Hi
> I am trying to print, server side, from my web application.
[quoted text clipped - 18 lines]
>
> Paul

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.