+
+ /* invoked from System.Web */
+ internal static IInternalConfigSystem ChangeConfigurationSystem (IInternalConfigSystem newSystem)
+ {
+ if (newSystem == null)
+ throw new ArgumentNullException ("newSystem");
+
+ lock (lockobj) {
+ // KLUDGE!! We need that when an assembly loaded inside an ASP.NET
+ // domain does OpenExeConfiguration ("") - we must return the path
+ // to web.config in that instance.
+ string t = newSystem.GetType ().ToString ();
+ if (String.Compare (t, "System.Web.Configuration.HttpConfigurationSystem", StringComparison.OrdinalIgnoreCase) == 0)
+ systemWebInUse = true;
+ else
+ systemWebInUse = false;
+
+ IInternalConfigSystem old = configSystem;
+ configSystem = newSystem;
+ return old;
+ }
+ }