Hi all,
i want to add my Account Credentials in app.config manually and after that i want to read my credential from app.config in code behind..
plz help thanx...
sumitk
Hi all,
i want to add my Account Credentials in app.config manually and after that i want to read my credential from app.config in code behind..
plz help thanx...
sumitk
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Blocked AccountPosted Sep 19, 2012, 11:47 PM
I am enclosing sample project in which I am accessing values from app.config
Sumit KumawatPosted Sep 20, 2012, 5:51 AM
Do u have any idea how to read app config from the window service?
i am writhing the code in on start method same as wpf button click.
i m uploading my demo project.
Sumit KumawatPosted Sep 20, 2012, 1:46 AM
Blocked AccountPosted Sep 20, 2012, 1:40 AM
change one thing in your demo project
Rename your App1.config to App.config
your problem will be resolved.
Sumit KumawatPosted Sep 20, 2012, 1:18 AM
thanx a lot for ur help...but still there is some problem..
im uploading one demo in which im using ur code but in my project itz still giving a null ex plz have look on my demo im not able to find the reason why null ex coming in my demo...
Sumit KumawatPosted Sep 19, 2012, 7:52 AM
below is my app config
and in code behind ob button click im using this
i tried in every way but still its giving null :(
im not getting why it is happening can u plz share some link or demo project for this.
its will b worthy for me...
thnx
Blocked AccountPosted Sep 19, 2012, 7:23 AM
ConfigurationManager.AppSettings["UserName"].ToString();
Sumit KumawatPosted Sep 19, 2012, 6:02 AM
thanx for the reply but this code is giving null exception.
Blocked AccountPosted Sep 19, 2012, 2:24 AM
add key in your App.Config like that