473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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?
May 14 '06 #1
2 1913
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?

May 15 '06 #2
Try this
System.AppDomain.CurrentDomain.SetupInformation.Ap plicationBase
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?

May 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dino M. Buljubasic | last post by:
How can I get date stamp of a file stored on an FTP server from a VB.net application? Thank you, -- Dino Buljubasic Software Developer http://rivusglobal.com
13
by: Dino Buljubasic | last post by:
I want to get the size of a file stored in SQL Database (as image data type). Anybody knows how to do this? Any help will be greatelly appreciated
0
by: dphill | last post by:
Hello all I am a beginner .Net programmer so please forgive my ignorance. In brief, I am trying to read from xml file stored in a SQL database table’s field. This is what I used to create...
0
by: MKH | last post by:
Greetings, OS = Windows 2000 Server SP4 SQL = MS SQL 2000 Server SP4 Language = T-SQL I have an excel file stored in a data base table as an image data type. I would like to somehow...
0
by: shaurya.rastogi | last post by:
I need to open an Excel file that has been stored in the Access Database using the insert Object functionality of MSAccess manually. What i am aware of is that i cant just read the field...
2
by: =?Utf-8?B?UHVjY2E=?= | last post by:
I need to retrieve and open a file stored on a Unix server on a network and opens the file as a delimited text file. I'm using VS2005, .net 2.0 and C#. What's the best way to do this and if...
2
by: randomcz | last post by:
Hi, I am trying to use C++ to read a file stored in 16-bit format. It looks like : "D6 CD 2F 01 52 07 01 00-52 07 01 00 52 07 01 00" under a hex editor. The first variable have 4 bytes: "D6...
0
by: newsco | last post by:
Dear all, I use VB6 ADO connect to Access 2007 accdb database, everything is fine except I cannot retrieve image file stored in the Access 2007 attachment data type. Can anyone show me some vb...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.