Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 25, 2012 04:57 AM by Angie xu - MSFT
Member
68 Points
105 Posts
Dec 21, 2012 04:42 PM|LINK
I want to read the web.config for my current application.
WebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/")
and
WebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(null)
do not work. What paramter (or other method) will get this information?
Thks!
Dec 21, 2012 04:46 PM|LINK
Use this:
WebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~/")
All-Star
18491 Points
1570 Posts
Microsoft
Dec 25, 2012 04:57 AM|LINK
Hi achalk
I’m glad to hear that you have solved this issue by yourself, and it is very appreciated to share your solution to us.
And welcome to post your question on ASP.NET forums in your future programming.
Kind regards
achalk
Member
68 Points
105 Posts
Reading WEB.CONFIG without knowing the web site name
Dec 21, 2012 04:42 PM|LINK
I want to read the web.config for my current application.
WebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/")
and
WebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(null)
do not work. What paramter (or other method) will get this information?
Thks!
achalk
Member
68 Points
105 Posts
Re: Reading WEB.CONFIG without knowing the web site name
Dec 21, 2012 04:46 PM|LINK
Use this:
WebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~/")
Angie xu - M...
All-Star
18491 Points
1570 Posts
Microsoft
Re: Reading WEB.CONFIG without knowing the web site name
Dec 25, 2012 04:57 AM|LINK
Hi achalk
I’m glad to hear that you have solved this issue by yourself, and it is very appreciated to share your solution to us.
And welcome to post your question on ASP.NET forums in your future programming.
Kind regards
Feedback to us
Develop and promote your apps in Windows Store