Yes, it is working.
Or at least, it's trying to.
The problem is that C# code is executed on the Server, not the Client.
When you are running in your development system, that didn't matter - because the Client and the Server were the same computer, so it looked like this code was working.
Now you are running on the production server which is a completely separate PC and does not appear to be running on the same OS - which is what I would expect.
You can't do this. You cannot print on the Client printer by trying to print like that!
Have a look here:
print client C#[
^]