I am developing wpf application which uses the source to the controls from wcf service that will access a file or folder contents present in another network.My problem is when it开发者_StackOverflow社区 searches in another network,it asks for the Credentials for that network.The Message is "Logon failure: unknown user name or bad password." How can I Solve it?
It is a problem of accessing remote files from code. One of the solutions is using virtual disc drive that is mapped to the network. Another solution is using impersonation.
Check these links, the code can be helpful:
.NET (C#) Impersonation with Network Credentials
Accessing UNC file share with credentials?
精彩评论