Job Fails - Security Issue

G

Guest

Hello, I have a console application which I run from a server. When I
remotely log on to the server and sumit the application it runs just fine.
When I schedule the job and use my login ID and password, the job fails when
it attempts to access a shared drive. I'm not sure why. There must be some
difference which being experience for this mapped drive when I am directly
logged on vs. when the scheduled job runs.

On the server, I have a mapped drived "D:" which is the drive which is
failing. Is this drive not mapped when the scheduled job uses my login ID
and password? What should I be looking for?
 
W

Willy Denoyette [MVP]

Jim Heavey said:
Hello, I have a console application which I run from a server. When I
remotely log on to the server and sumit the application it runs just fine.
When I schedule the job and use my login ID and password, the job fails
when
it attempts to access a shared drive. I'm not sure why. There must be
some
difference which being experience for this mapped drive when I am directly
logged on vs. when the scheduled job runs.

On the server, I have a mapped drived "D:" which is the drive which is
failing. Is this drive not mapped when the scheduled job uses my login ID
and password? What should I be looking for?

Don't use mapped drives, use UNC paths to do file IO. The reason why it's
failing is that drve mappings are session bound, that means a drive is
mapped for a single logon session only, so your 'D' drive which is mapped
for your interactive session isn't 'visible' in your scheduled task even if
the logon ID is the same.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top