+2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * HttpContext.cs: try to load App_GlobalResouces.dll if it has not
+ been set but it exists in 'bin'.
+
2009-09-28 Marek Habersack <mhabersack@novell.com>
* HttpContext.cs: GetResourceProvider - renamed the 'key' argument
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed partial class HttpContext : IServiceProvider {
+ static bool tried_load_global_resx;
+ static Assembly global_resources;
internal HttpWorkerRequest WorkerRequest;
HttpApplication app_instance;
HttpRequest request;
set { AppDomain.CurrentDomain.SetData (app_global_res_key, value); }
}
#else
- internal static Assembly AppGlobalResourcesAssembly;
+ internal static Assembly AppGlobalResourcesAssembly {
+ get {
+ if (!tried_load_global_resx && global_resources == null) {
+ string file = Path.Combine (HttpApplication.BinDirectory, "App_GlobalResources.dll");
+ try {
+ global_resources = Assembly.LoadFrom (file);
+ } catch {
+ }
+ tried_load_global_resx = true;
+ }
+ return global_resources;
+ }
+ set { global_resources = value; }
+ }
#endif
ProfileBase profile = null;
LinkedList<IHttpHandler> handlers;