Printing Problems

  • Thread starter Brook Braswell via DotNetMonster.com
  • Start date
B

Brook Braswell via DotNetMonster.com

I am getting the dreaded Tried to access printer \\computername\sharedprinter with invalid settings.

I develop on a Win2K that is not a server and I am printing through an APS.net dll created using VBcode.

The dll works fine to any network laser printer that I set it to print to. When I roll out my project onto the Win2K Server, it does not print. Both boxes have the latest drivers. I could not find any permission differences but that does not mean there is not a difference.

The code is very simple and basic.

Private WithEvents mDoc As PrintDocument
....
....
....
mDoc = New PrintDocument
AddHandler mDoc.PrintPage, AddressOf pd_PrintPage
mDoc.PrinterSettings.PrinterName = PrinterName

mDoc.Print()

Can anyone tell me why there would be a difference?
Like I said, this works fine for my box but not the server.
 
B

Brook Braswell via DotNetMonster.com

Added comments for above:

The only way to allow users to print (as far as the eye can see) is to set the anon properties in IIS 5 for the default web site in Directory Security to be an administrative user.

The reason it works from my test box is the same as when I run from the webserver on the webserver box is that I was running the localhost. Neither will give permission to print when running from a different box.

anyone?
 
B

bruce barker

try hitting your dev machine from another box to see if it fails the same
way. if so, then its security (google nt credential forwarding).

-- bruce (sqlwork.com)

message | I am getting the dreaded Tried to access printer
\\computername\sharedprinter with invalid settings.
|
| I develop on a Win2K that is not a server and I am printing through an
APS.net dll created using VBcode.
|
| The dll works fine to any network laser printer that I set it to print to.
When I roll out my project onto the Win2K Server, it does not print. Both
boxes have the latest drivers. I could not find any permission differences
but that does not mean there is not a difference.
|
| The code is very simple and basic.
|
| Private WithEvents mDoc As PrintDocument
| ...
| ...
| ...
| mDoc = New PrintDocument
| AddHandler mDoc.PrintPage, AddressOf pd_PrintPage
| mDoc.PrinterSettings.PrinterName = PrinterName
|
| mDoc.Print()
|
| Can anyone tell me why there would be a difference?
| Like I said, this works fine for my box but not the server.
|
| --
| Message posted via http://www.dotnetmonster.com
 
B

Brook Braswell via DotNetMonster.com

yes, hitting the dev machine from another box creates the same error.
What does work?
running on either the dev or the server with localhost.
changing default website to allow anon to be set as an admin user.

Neither of which are a good idea. I will look up credential forwarding.

Anything else I should consider?

Thanks,
Pastor Brook
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top