How do I resolve 'Failed creating a temporary file'?

Q: We are rolling out PDFNet to a client and suddenly get this error
when we try to watermark a file (just before streaming it to
Silverlight):

Message: Failed creating a temporary file Conditional expression:
GetTempFileName()
   at pdftron.PDF.Stamper.StampText(PDFDoc dest_doc, String txt,
PageSet
dest_pages)

Any idea what could cause this?
------------------------------

A: The problem is that PDFNet.DLL does not have a permission to create
a temporary file.

There is couple of potential options:

a) Grant 'PDFNet.DLL' R/W permission to the temporary folder (btw. you
can also change the location of the TempFilder using
PDFNet.SetTempFolder()). For more info please see
http://msdn.microsoft.com/en-us/library/zdc263t0(v=vs.80).aspx

b) After initializing PDFNet call
PDFNet.SetDefaultDiskCachingEnabled(false).