Solved

Cannot detach temp files on the server

Posted on 2001-07-31
14
862 Views
Last Modified: 2013-12-18
I have an agent that detaches files in a temporary directory (using Environ("Temp")). The problem is that the agent runs fine locally when called manually, but does not run when scheduled to run on the server. I have done a lot of testing, and the agent starts but the detach part fails.

Could this be an Operating System (Win NT) related problem?

Any ideas? Please help.

Thanks.
0
Comment
Question by:cyberzork
  • 4
  • 4
  • 3
  • +2
14 Comments
 
LVL 10

Expert Comment

by:zvonko
Comment Utility
put into your agent, before detach, some monito lines; like this:

TempDir = Environ("Temp")
msgbox "actual TempDir: " & TempDir

(msgbox produce simply console print line ;-)

Your detach path has to have be absolute and not relative. You can not assume notes\data as working directory.

By the way, I am dooing detaching of distribution files on S/390 without OS problems. So it should be not an OS problem on NT ;-)

Good luck,
zvonko
0
 
LVL 10

Expert Comment

by:zvonko
Comment Utility
perhaps is a good idea for you to place this parameters into notes.ini and lookup them with:
GetEnvironmentString/SetEnvironmentString

Look into NotesDesignerHelp for examples...
0
 
LVL 4

Expert Comment

by:martijnmulder
Comment Utility
check whether you have used any UI object variables(e.g. NotesUIWorkspace, NotesUIDocument ? If so remove them, a scheduled agent will not run with them included...
0
 
LVL 4

Expert Comment

by:martijnmulder
Comment Utility
also check whether you have rights to run unrestricted agents on the server...
0
 
LVL 13

Expert Comment

by:CRAK
Comment Utility
Does the directory (please test as zvonko suggested) exist on the server?

If not, make sure you either create it, or change the environment var. to a dir. that does exist!

Running the code on the server would mean that you retrieve the environment var from the server's notes.ini and that the specified dir. should be available on the server....
0
 
LVL 13

Expert Comment

by:CRAK
Comment Utility
...and if you decide to create a dir (like dirA\dirB\dirC), make sure you create dirA first (if nesseccary), then create dirB (if nesseccary), then create dirC (if nesseccary)
0
 
LVL 13

Expert Comment

by:CRAK
Comment Utility
Make sure you have sufficient privileges to!
Your agent (the signer) needs "unrestriced access"!
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:cyberzork
Comment Utility
I followed zvonko's instructions and set up the agent to write some monitoring info right before and after the detach statement:

  Call AgentLog.LogAction("before " & TempFilePath)
  Call obj.ExtractFile(TempFilePath)
  Call AgentLog.LogAction("after " & TempFilePath)

Guess what. Only the "before" line is printed:

  "before D:\TEMP\temp_uf.aaa"

And yes, the server document indicates that I have unrestricted access to run agents, but can I confirm that?

Please help!
0
 

Author Comment

by:cyberzork
Comment Utility
I have been looking for a solution at the wrong place. The error message returned from the server is:

(4005) Notes error: You must supply the bulk decryption key in order to extract this file object. (D:\TEMP\temp.aaa)

Some fields in the document are encrypted, but the ones that contain the attachments are not. Now I really have now idea what to do!
0
 
LVL 4

Expert Comment

by:sloeber
Comment Utility
May be a little remark.
I've got the same problem.
In my code I used also a temporary directory.
Like c:\Test
When I run it manually everything was fine, but when I run it on the server it wouldn't work.

The reason was that if you run the agent from the server he's looking to the servers C drive and not into your local/personnel machine.
So, verfiy this and check also, if you've enough access rights to the servers harddisks.

Greets,
Sloeber
0
 
LVL 10

Accepted Solution

by:
zvonko earned 100 total points
Comment Utility
look here:
http://support.lotus.com/sims2.nsf/802ee480bdd32d0b852566fa005acf8d/2a835671324c11e385256655004fe04a?OpenDocument
http://support.lotus.com/sims2.nsf/802ee480bdd32d0b852566fa005acf8d/42c21a4b8c7871b485256a1b0051bc19?OpenDocument

Reading above articles it seams there is no workaround for you,
but try this:
In NotesClinet open document property dialog.
In the tab with the key is the bottom field with publick encryption keys.
If there is enything in, than open the content dialog for this field by pressing the blue person icon.
Remove all entries

Additionaly look in LotusDesigner for the form definition.
If in the form enywhere is a field named "SecretEncryptionKey", then remove it.

The only database I have tested with encryption was userreg.nsf  which is invisible on your client there.
I created a wonderfull application on the server in spite the info was telling not to do so.
And there I had to fight with this encryption...

So above proposals are not from my experiance but only my assumptions ;-))

Good luck,
zvonko
0
 

Author Comment

by:cyberzork
Comment Utility
thanks zvonko
0
 
LVL 10

Expert Comment

by:zvonko
Comment Utility
Hello cyberzork,

thanks for the points <|;-)
but can you please state wath your final solution was (deleting some vars/items, resaving or wath?).

Thanks anyway.

Regards,
zvonko
0
 

Author Comment

by:cyberzork
Comment Utility
I decrypted my documents, and for the attachments that could not be detached we decided to re-attach them manually from the old documents into the new ones. We only had about 180 attachments, and I didn't have the strength or time to deal with this any longer.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now