Open file accross network passing user credentials

I am needing to open a network file and read the tasks. Problem is The Service account doesn’t have access to this network directory.

How can I pass the current users credentials to access this file?

MPPFile file = new MPPFile("\Server\folder\file.mpp");

Cheers

Hello,

You should probably implement file reading by yourself through System.Net namespace or using some another way. At the end you should get file stream. After that you can call MPPFile constructor with Stream parameter.