We create a shared folder in server (windows server 2003). We create a Service Account and specify the security and sharing for the shared folder. A user will put one CSV file in this folder. In Navision we setup a job schedule, that runs a codeunit which in turn runs a dataport to grab the data from these files for import.
So can I access the file after authenticating the folder form Navision?
I dont want to create a network drive to be mapped to this folder, as users accessing to this system should not be able to access this network drive. So I want Navision to do the authentication programatically and get the datafiles.
Solutions please [^o)]
(note:navision 4.0 sp3 (IN), Win 2003 servers, Win XP users, SQL Server)
The Navision-client (or Application Server) has to be run by some user-account.
This is also the user-account that needs to have access to the network-drive in question.
You don’t have to map the network-drive, simply address it in your code with servername and all (e.g. \servername\share), that will give you access to the files.
Thanks for the reply.
Ya. If i create a windows login and try to access the folder in the server, it is working, irrespective of the currently logined account of navision. But here, windows login detals are same as that of the service account that is used to protect the shared folder.
In this case, apart from navision application, user can manually access the shared folder without any restrictions provided, windows login and service account are similar.
But my requirement is “the Navision should authenticate the shared folder automatically and access the files without pormpting for the user input for login, becuase I am using a job scheduler to perform the activities. AND the user should not be able to access the shared folder manually without entering the service account username and password.”
-(to provide more security)
Is there a way?
Maybe i’m not understanding your requirements…
But it seems to me that you want Navision to be able to overrule the domain security, wich to my knowledge can’t (and shouldn’t) be done.
Maybe there is a way to differentiate the AD-accounts that the user logs in with, and the one that runs the Job Scheduler.
And through that you can let Navision access the files without problem, but still have the user blocked initially, by setting the appropriate security on the share.
I haven’t tried this, but if you use an ordinary NAV-client to run the scheduler, maybe you can use the “Run as” feature of Windows, to use another AD-account for the Job Scheduler, than the one the user have used to log on with.
If it’s run in a NAS, then simply change the “Log on as” property on the service.
I am using ‘Run as’ feature from the command prompt, and run the navsql, that uses the service account we created as login. Here we are running a jobscheduler in this navision client.