Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Problem using URL Key in Web.Config

Hi Everyone,

I am assisting in the debugging and deployment of an application. There is currently the following code in the web.config:


<appSettings>
<add key="SavePrePath" value="../"/>
<add key="BaseURL" value="http://www.url.com" />
<add key="AdminURL" value="www.url.com/new/app/" />
</appSettings>



I want to add a new key, something such as:

<add key="MarkupURL" value="www.url.com/another/path/" />

The other keys are called like this: CommonLib.GlobalData.AdminURL ... or CommonLib.GlobalData.BaseURL. Therefore, I want to be able to access this key through CommonLib.GlobalData.MarkupURL

There is a comminlib.dll in the bin directory

However, when I do this, I got an error that states that MarkupURL is not part of CommonLib.GlobalData, so my application will not build


How can I correct this problem? Thank you!!
[995 byte] By [goodfella] at [2007-11-11 10:29:01]
# 1 Re: Problem using URL Key in Web.Config
I actually found some old source code with the correct globaldata.cs file. Apparently, this file contains the key information that web.config needs. The globaldata.cs file was compiled into a dll, Commonlib.dll. Once I found the file, entered in the necessary code, and re-compiled, everything was fine.

Thanks!
goodfella at 2007-11-11 20:47:32 >