shared folder route in ASP.Net, Framework 2.0

59 views Asked by At

I have this problem: I have a web application that was working ok on accessing shared folder in same server application, but outside of application folder. The route of shared folder is stored in a table (SQL Server 2008 R2), this is query using sqlcommand and datareader, including credentials to access the shared folder. Suddenly that part of application stop working, the problem I found is that the path of shared folder appears without the char '\', something like this \IP_SERVERsharedfolder altough in database it is stored as \\IP_SERVER\sharedfolder, if the query is executed on sql server managment, it displays the whole path.

Do you have experienced a similar problem.

I appreciate your help.

The problem here is not how to access the shared folder, that means, the problem is when the path is gotten from database where it is stored, I use a data reader object to get from database:

If dtrReader.HasRows Then
    fldPath = dtrReader(3).ToString
    username = dtrReader(4).ToString
    password = dtrReader(5).ToString
End If  

in variable fldPath , I got \IP_SERVERsharedfolder instead \\IP_SERVER\sharedfolder, char \ is removed.

0

There are 0 answers