There is a KB article on this - the problem has to do with permissions:
http://support.microsoft.com/default...b;en-us;312055
Do you intend to have the server print instead of the client?
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"Federico Benitez" <federicob@infocorp.com.uy> wrote in message
news:0b1101c3b4e6$b19a40e0$a301280a@phx.gbl...[color=blue]
> I am trying to print from code behind and get the
> following error:
>
> "The RPC server is unavailable"
>
> I am using the following code:
>
> StreamReader streamToPrint = new StreamReader
> ("frmPatientSearch.txt");
>
> try
> {
> printFont = new Font("Arial", 10);
> PrintDocument pd = new PrintDocument();
> pd.PrintPage += new PrintPageEventHandler
> (pd_PrintPage);
> // Print the document.
> pd.Print();
> }
> catch(Exception ex)
> {
> throw ex;
> }
> finally
> {
> streamToPrint.Close() ;
> }
> }[/color]