Solved

Can't Print to Network Printer

Posted on 2008-10-13
5
1,163 Views
Last Modified: 2012-05-05
I am using a VB.NET Application for a CE device that calls a function from a Webservice located on my PC to print a crystal report. I also use the webservice to gather a list of all the printers, but it fails to get the network printer. However, i hardcoded the printer name \\192.168.1.105\hpLaserJ into the webservice, and i get the error messge "Access is Denied". I think it may have something to do with security, but not positive. Any help would be appreciated.
0
Comment
Question by:webbie05
  • 2
  • 2
5 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 22703899
Definitely sounds like you don't or the service doesn't have permissions to the printer.

mlmcc
0
 

Author Comment

by:webbie05
ID: 22703918
What steps can i take to allow permissions to the printer? I need to have access to every printer installed on the computer.
0
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 250 total points
ID: 22703988
following is the explanation
That's because you (the asp.net user) don't have any access rights to the share, note that the default account 'aspnet', doesn't even have network access rights. So you will have to impersonate a user with appropriate privileges to access the network share.

how to fix it
add the following entry in web.config
<identity impersonate="true" userName="domain\username" password="password"/>
0
 

Author Comment

by:webbie05
ID: 22704148
I tried <identity impersonate="true" userName="domain\username" password="password"/> and now i get, "The RPC server is unavailable"
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22706062
sorry to say but just giving me the exception is not helpful
you also need to tell us what changes you made, what configuration settings were made so that we can investigate why are you getting that error

most importantly where are you getting the error while accessing the printer or before that
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question