-
Jan 9th, 2017, 05:28 PM
#1
Thread Starter
New Member
Inside my DLL- get list of printers
I'm using Visual Studio 2015. I have a Visual Basic DLL.
Inside the DLL, I'm trying to get a list of printers.
I get an "Unspecified error " on
strComputer = "."
objWMIService = GetObject("winmgmts:\\ & strComputer & "\root\cimv2")
the "GetObject" is where I get the error.
Overview- I have a web page. I want the user to push a button. It calls
my DLL that is on the server and it submits a document to the print job.
The printing is done on the server, NOT the client printer.
Suggestions ?
TIA
Shall42
-
Jan 9th, 2017, 05:42 PM
#2
Re: Inside my DLL- get list of printers
Is this for ASP.NET or for a Windows Form Application?
-
Jan 10th, 2017, 08:10 AM
#3
Thread Starter
New Member
Re: Inside my DLL- get list of printers
-
Jan 10th, 2017, 08:37 AM
#4
Re: Inside my DLL- get list of printers
My first guess would be permissions, I am not sure if the default account IIS uses to run applications has permissions to WMI.
IIRC IIS defaults to "Network Service" as the user. You could either grant permissions to this account or it might be more preferable to create a new user account to run your application under and make sure this account has access to WMI.
https://technet.microsoft.com/en-us/...(v=ws.11).aspx
https://technet.microsoft.com/en-us/...(v=ws.10).aspx
-
Jan 10th, 2017, 09:08 AM
#5
Re: Inside my DLL- get list of printers
Thread moved to the ASP.Net forum.
-
Jan 12th, 2017, 08:03 AM
#6
Re: Inside my DLL- get list of printers
You all do realize that with this being asp.net, anything you do printer wise will run on the IIS Webserver so you'll need to have a printers(s) connected to it (not the end user who's browsing the website) which is extremely rare in the first place and besides that, what would you even want to have printed directly from your web server(s) anyways?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|