TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dc
NA
663
0
C# app.config for directory location
Jan 29 2013 8:31 AM
I have a question about 2 C# 2010 windows applications that I am running:
In one program I am <appSettings>
<add key="FileLocation" value="D:App\Staging" />
</appSettings>
String filesaveLocation = null;
filesaveLocation = ConfigurationSettings.AppSettings["FileLocation"] + "\\" + Format_Date + "\\";
if (Directory.Exists(filesaveLocation))
The above works.
In the other program I am using
<appSettings>
< add key="FileLocation" value="D:App\\Staging" />
< /appSettings>
String filesaveLocation = null;
filesaveLocation = ConfigurationSettings.AppSettings["FileLocation"] + "\\" + Format_Date + "\\";
if (Directory.Exists(filesaveLocation))
this works fine on my windows 7 workstattion.
However when I move the code to a production server, the code does not work.
Do I need to have the '\\" in the directory path set to a different value?
Thus can you tell me what you think could be going wrong and show me code on how to solve the problem?
Reply
Answers (
1
)
C#.net
how to get data into dictionary collecion in c#.net?