If i connect to the printer manually - it runs - The driver is available on the Server

If i change the code i get the following error:

1722
The RPC-Server ist not available (i hope this is the translation)
In German: Der RPC-Server ist nicht verfügbar