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 Restricted Operations
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.
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.

Comments
Posted by Steve At 06:50:04 AM On 08/05/2008 | - Website - |
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 !
Posted by Dirk Dens At 09:30:43 AM On 06/20/2011 | - Website - |