conneceting to a XML credentials file, stored in App_Data
|
| conneceting to a XML credentials file, stored in App_Data | In a webservice I need to store the credentials in a xml file.Of course the password string is hashed. The XML is stored in App_Data. Now I need to open this file for read/write. I've tryed a lot of paths but none worked. Cassini tries to open a file from "'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\App_Data\Users.xml' and IIS is not far from that.
I've tryed the followind parths: "~/App_Data/Users.xml" @".\App_Data\Users.xml" @"App_Data\Users.xml" "..\\App_Data\\Users.xml"
and many other varietions but I've got the same result.Cassini and iis tryed to open the xml in program files. I feel that is something to write in web config but I don't have a clue. Any ideas?
| | Try this System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase and then append it with your directory i-e app_data
"Victor Paraschiv" wrote:
> doc.Load(Server.MapPath(@"~/App_Data/Users.xml")); > > Victor Paraschiv wrote: > > In a webservice I need to store the credentials in a xml file.Of > > course the password string is hashed. > > The XML is stored in App_Data. > > Now I need to open this file for read/write. > > I've tryed a lot of paths but none worked. > > Cassini tries to open a file from "'C:\Program Files\Microsoft Visual > > Studio 8\Common7\IDE\App_Data\Users.xml' and IIS is not far from that. > > > > I've tryed the followind parths: > > "~/App_Data/Users.xml" > > @".\App_Data\Users.xml" > > @"App_Data\Users.xml" > > "..\\App_Data\\Users.xml" > > and many other varietions but I've got the same result.Cassini and iis > > tryed to open the xml in program files. > > I feel that is something to write in web config but I don't have a clue. > > Any ideas?
|
|
|
|
|
 | Members Area | |
|
 | Last Web Marketing |
|
|
|
|
 | Last Programming Tips |
|
|
|
|
 | Last News |
|
|
|
|
|
|