Do I have to transfer the private key to digitally sign a remote document? I'm trying to digitally sign a document which is uploaded by a user. I want the user to sign that document using his digital signing certificate (DSC).

Should I:


transfer the file to the user, and have them sign it on their own system, or  
transfer the user's private key to the server, and sign the file there?  


Which way is better, or are there any other, better ways to do this?
It is logically impossible to transfer a private key. The key will continue to be a signature key, but it will cease to be "private" the minute it is transferred. A signature key that isn't private isn't a private key. If you want the document to be signed by the user (in any semantically coherent sense), this operation has to take place on a device exclusively controlled by the user.

This doesn't mean that it is logically impossible to delegate digital signing to a third party, it just means it has to be done slightly differently. If (in real life) you appoint someone to act as your proxy, you don't authorize that person to sign documents using your signature. Instead, you sign a letter of appointment that authorizes your proxy to sign documents on your behalf. The proxy will then use its own signature.