How to read web.config file from a different site?
-
Hi All, We have 2 sites. 1) suppose that one of the 2 sites has been uploaded under following url:- http://www.abc.com/ 2) we need to read above site web.config for our other site which has uploaded in different location. http://www.abctest.com/ How do we read 1) site web.config from second site using c#, asp.net? Thanks in advance.
-
Hi All, We have 2 sites. 1) suppose that one of the 2 sites has been uploaded under following url:- http://www.abc.com/ 2) we need to read above site web.config for our other site which has uploaded in different location. http://www.abctest.com/ How do we read 1) site web.config from second site using c#, asp.net? Thanks in advance.
Just read the file as XML from the file system path.... :rose::rose:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
Just read the file as XML from the file system path.... :rose::rose:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
It is not possible to read web.config from one server to another because web.config is assign to each application not to server.
-
It is not possible to read web.config from one server to another because web.config is assign to each application not to server.
If it is in another server you need to read it using Unc path.. You cant access Web Config from http requests as they are secure to the web site. Web config is applied to a virtual directory in the IIS. So you can have web.config file for each folder within your project. If not found it applies the parent. :rose:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.