« I'm not a parent, but come on.. | Main| Looking for assistance...Yes for a change I'm asking the questions :-) »

Wasted a few hours on this, so I don't forget in the future and to save someone else some pain I'll make this post

Category

I'd been working on an agent that takes a CSV file that is attached by a user in a web page, it extracts the file on to the server pulls the information from it into an array and then deletes it.

I had an agent that did something very similar already so I just took that and modified it a little.  No problem all was good.  I then copied the agent contents, put it as a sub into another agent that would pass the new documents context so it could get a handle on the file attachment etc.  For some reason the Code was now starting to throw a type mismatch whenever the line to extract file was attempted.  

After messing around for hours trying to figure out the reason for the type mismatch, I decided to pull the code out of the sub and put it in the agent calling the sub.  OK, now the error changed to "Disk i/o is a restricted operation".  A ha, I thought, I must have forgotten to give the agent signed unrestricted rights on the server.  Nope that wasn't it as the signer already had rights for the other agent that was running happily. Checked the hard disk space that was fine, what the hell was it?

Well I had forgotten about the agent specific security setting, I had not set it to a runtime security level of 2, allowing restricted operations and not the default of 1 Do Not Allow.  Arggh, so simple, yet made me feel so stupid.

Allow Restricted
Operations

Comments

Gravatar Image1 - Done that one before!! You can spend hours trying to figure it out when it is something so simple.

Gravatar Image2 - Thank you , Carl Tyler.
Your positive attitute to share this info with the world indeed saved me from spending hours to find the solution

You just saved my day !

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::rolleyes:;-)