Thank you all who have responded so fast
 
Varden you were right in that once I tested changing the account on the AOS
service to an account I know had rights to the folder then it worked
perfectly.  Thank you and the rest very much for all you speedy help.
 
One question I have is if the AOS service is using NT AUTHORITY\NETWORK
SERVICE is it wise to give this account access to folders or should I create
some kind of new AOS service account (and if so what kind of permissions
should I give it).  I guess this is more a best practice type of query as I
am not familiar with windows server permission and how best to configure an
account for somethign like an AOS service.
 
And sorry one final query that just popped in my head. If the users start to
print reports to file and submit these as batch jobs then will the AOS
service account need to have rights to write to whatever folders the user
has typed in the report options?
 
Thanks once again to you all :)
James
 


  _____  

From: development-axapta@yahoogroups.com
[mailto:development-axa...@yahoogroups.com] On Behalf Of Varden Morris
Sent: 10 June 2009 21:37
To: development-axapta@yahoogroups.com
Subject: Re: [development-axapta] Error running export to file as batch but
no problem when run normally by the user





Are you using a relative or absolute path? You should share the folder with
write access for the user that executes the AOS service. Ensure that you are
using an absolute path such as \\ComputerName\ShareFolderName. If you use a
relative path such as C:\FolderName\AnotherFolder then it will work if the
job is executed from the client computer and the folder is on that computer.
However, if the batch job is set to run on the server and the same folder
path does not exists on the AOS computer you will have a problem.

Regards,

Varden Morris
Varalth Solutions Inc.  
693 Abbottsfield Road NW
Edmonton, Alberta T5W 4R4
Canada 
(780) 752-0406
www.varalth.com

CONFIDENTIALITY NOTICE 
 
This message and any attachments are confidential.  If you have received
this transmission in error, please be advised that any disclosure, copying,
distribution or action taken in reliance upon this communication is strictly
prohibited.  If you have received this communication in error, please
contact the sender immediately. Please note that any views or opinions
presented in this email are solely those of the author and do not
necessarily represent those of the company.  Finally, the recipient should
check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.

________________________________
From: James Flavell <djf1...@gmail. <mailto:djf1994%40gmail.com> com>
To: development- <mailto:development-axapta%40yahoogroups.com>
axa...@yahoogroups.com
Sent: Wednesday, June 10, 2009 12:03:00 AM
Subject: [development-axapta] Error running export to file as batch but no
problem when run normally by the user

H i everyone

I have a strange problem that I have a class that basically creates a text
file of the item onhand information.

The class works fine when run by the user but when I set it to run in batch
it gives an error when the following code is called by the batch client:

new FileIOPermission( FileName, 'w').assert( );
File = new AsciiIO(FileName, 'w');

The error says about ASCIIIO is not initialised.

I get the error even if I start the batch client in the same logged in AX
session that works if the user runs the export directly so I am a little
lost

Also I took the export and put it on a dev server and it worked okay using
the batch client! So I am wondering when the batch client is running what
user id is it running as? The user id that logged into AX and started the
batch client or the user id that is in the AOS service start up or something
else?

Does anyone have any idea why the batch running would give this error since
the export works fine when run directly by the user?

This is AX4.0 SP1 or SP2 I cannot remember right now

Thanks
James

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]






[Non-text portions of this message have been removed]

Reply via email to