web.config

Discussion in 'ASP.NET / ASP.NET Core' started by MikeKovach, Feb 21, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. How can I reference the _database directory in the web.config so I do not have to always reference the _database directly.

    What I'm thinking about is somthing like the following:

    <appSettings>
    <add key="NWind"
    value="Provider=Microsoft.Jet.OleDb.4.0; data source=<server drive letter>:\\web\\<sitename> \\htdocs\\_database\\Northwind.mdb;";/>
    </appSettings>

    Then in the connect string I would simply have to put the following:

    String strConnection = ConfigurationSettings.AppSettings["NWind"];
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    You should be able to find the root path in the account information section in the control panel.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Thanks Bruce. Shortly after I posted the message I got it working.
     
  4. Well here's another issue with Web.config.


    I added another key value the first dB reference key works fine but the new one states the following:


    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Based on the above I would say there are security limiteations onweb.config so I need to ask that if this is the case is there something I can do to permit multiple keys that you're aware of?
     
  5. Never mind my last got it.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page