Quote:
Originally Posted by Shashi Sadasivan
So you are hosting a webservice for your internal purpose,
And the unauthorized access is turned out when another machine tries to call this service.
My first question would be what are the inputs sent to the webservice?
If it takes the file name, then you clearly have a problem, as users might send a file c:\Program Files\Yada\Yada.Doc
or
\\PrintingComputer4\Program Files\Yada\Yada.Doc
What i think you should do is either copy the file to the server , or send the file as a stream to the webservice which will then store it on its local drive and print it.
The serer trying to access the client PC is definitely a security exception
My files that are to be printed are been created on the machine where webservice is located and i want to print that files to a printer which is attached on other machine which i am not able to do. It properly prints on local machine when webservice i called from other machine but not on network printer. i have added that printer on my machine also as it i shared and also hav given all rights. The file prints when i print it explicitly by giving a command in DOS. The only problem is when i give the file c:\abc.txt which is on webservice machine to \\machine_name\printer_name which is a n/w printer it doesnt print from code. I am using Printer Document and Printer Settings object and printing thru RawPrinter method. So there is any special code to be written in webservice like creating WindowPrincipal Obj or WindowsIdentity Obj??..No inputs are passed to webmethod. The file is passed in RawPrinter method and file is located on same machine where webservice is located, only printer is n/w printer. Also when the file is located in the Bin Dir of webservice it gives same problem. Pls help!!!!