Click to See Complete Forum and Search --> : my code of print without print dialog worked on development pc but not at server
baranwalravi123
09-12-2007, 03:52 PM
:o now i have used a c# class for this it takes the printer name and performs
well on local development pc.I am passing printer name.
when i deployed on the web server then it geves server side error as given bellow
"Request for the permission of type 'System.Drawing.Printing.PrintingPermission, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed"
now what i do please help.
thanks again
lmf232s
09-13-2007, 09:53 AM
Well from the error your getting a permissions issue which means that the account your trying to run this under does have the permissions to do what ever your tying to do.
Your page is most likely running under MachineName\aspnet user and im not sure what permissions your have him set to.
Other than that I would google this
"Request for the permission of type 'System.Drawing.Printing.PrintingPermission"
and youll get a bunch of hits and you might be able to find your problem by searching.
baranwalravi123
09-13-2007, 10:29 AM
Hi thanks alot for your valuable response.
actualy when i run my project on local environment
as it is on vss then it works fine but when deploy it on server means
http://<companyname>.com/clients/<projectname>
then the problem appears.
is this possible by any other way please intimate me
thanks alot again.
waitting for your response.
lmf232s
09-13-2007, 03:04 PM
The problem is that when you run it locally I believe it runs under your permissions but when you copy it to the server it then runs under the aspnet account which has limited permissions which I think is the cause of your problem.
And im not 100% sure but the printer name that you are passing in may need to be mapped on the server as well.
baranwalravi123
09-14-2007, 06:58 AM
thanks alot Mr. Imf232s
now i am using an activex control for printing the image
and it works problem is that when i give the print command
then always it shows in spooling at printer untill i doesnot close the application
any body please help
thanks
baranwalravi123
09-17-2007, 08:42 AM
:) Problem hasbeen resolved.
i have just used printer.enddoc
in activex code.