Hi Guys,
First of all, I'm very sorry if I've got the wrong group. My problem spans a few areas so I'm not sure where to post (it'd be great if I've got it wrong if someone could point me right). Anyway, here's my problem...
We've got an old ASP web application that we're slowly moving to .Net by writing all new functionality in .Net and using COM interop to call into it. The application is just a single ASP page that does a CreateObject and calls into a VB 6 class. This VB 6 class then calls into the .Net code.
In the .Net code I'm printing an emf file. The printer it's printing to is a network printer connected to the IIS server which is a Windows 2000 machine.
If I log in to the server and load up a browser and go to the page it prints fine but if I connect to that server from a different machine it fails to print by throwing a "Tried to access printer with invalid settings" exception.
The only thing I have checked in the security page in IIS admin is Windows Authentication and in both cases I'm the same user. Before printing I show a list of the InstalledPrinters and in both cases I get exactly the same list back.
So, it can only be a security thing right But I'm completely flummoxed as to how to solve it (I figured that if I didn't have rights to print, the printer wouldn't have been returned by InstalledPrinters - but I guess I'm wrong).
I've written a simple little demo app that reproduces it if anyone's interested
Thanks very much for your help,
Kev

Printing from .Net code called from a VB 6 class that's been called from an ASP page fails
MaryJaneF
Thanks Pete, but there's no ASP.NET in my situation (just regular ASP), which is why I didn't post there in the first place.
I've got a solution anyway...
I built a Windows service and use .Net remoting to call from a COM wrapped .Net class into it (from the VB 6 class) This class then does the printing which seems to work OK.
Kev
Kawish
Hi!
The best place for asking ASP.NET questions is on the ASP.NET community site, and in the forums there. Check out
http://www.asp.net/welcome.aspx tabindex=1&tabid=39.HTH,
PEte