unc mapping for a WPF C# desktop application

Hi experts,

I have a wpf desktop application using C#.

In my app i call various images that are located in a folder called IMAGES that is located at a location on a server.   Which I will just call MyServer1

So for example this is the path to  2 of my images

\\MyServer1\WORK\IMAGES\image1.jpg
\\MyServer1\WORK\IMAGES\image2.jpg

So when I install this app on various computers connected to the network and i map  a blank drive such as the S: drive on each computer

to :      \\MyServer1\WORK

Then the app works fine.      But if i don't map the drive it won't grab the image.

But we dont want to have to map the drive on all the computers.  Is there a way to put this network location like in my config file to tell it where the network location is and maybe give it my user name and password that gives the app access to this location.

I was googling this and read maybe i have to do it in a .ini fil or something but I have never done that.

Can anyone point me to a good tutorial on this? Or give me some advice so I don't have to map the drive for whatever computer this app gets installed on.

Thank.
LVL 1
maqskywalkerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tsellsCommented:
Just curious why you are not deploying your images with the application?  Pulling images over a network is too risky and there is too great a chance for the images not being present thus causing errors in your application if they are not present.  Not too mention the performance boost you will get from having them local.  
0
maqskywalkerAuthor Commented:
hi tsell,

this might shed some light on the issue.  I have millions of images stored in various folders inside a main folder called images in a network location.

So in the sql server table i have the path to each image stored in a column in the table

So in my WPF application. I have a WPF toolkit datagrid. A user enters 2 parameters in 2 textboxes and clicks submit button. The submit even handler queries the sql server table and then populates the datagrid with certain information for each column and in the path column instead of showing the path, it is showing a thumbnail of the image.

The the reason that i'm not storing the images with the app is because there are over 7 million images.
0
tsellsCommented:
I am going to assume you are on a domain network.  This being said if your path is \\MyServer1\WORK\IMAGES\image1.jpg then mapping a network drive with the letter s will do NOTHING to resolve the path.  The only thing it might have done was pass a username and password to the server for authentication.  What kinda of network storage is this?  Is it domain aware?  


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.