Author: igorz
Date: 2007-03-27 12:15:02 -0500 (Tue, 27 Mar 2007)
New Revision: 75032
Modified:
trunk/mcs/class/System.Web/System.Web/ChangeLog
trunk/mcs/class/System.Web/System.Web/XmlSiteMapProvider.cs
Log:
2007-03-27 Igor Zelmanovich <[EMAIL PROTECTED]>
* XmlSiteMapProvider.cs: fixed:
resolve app-relative path from config such siteMapFile="~/Web.sitemap".
Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog 2007-03-27 17:09:24 UTC
(rev 75031)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog 2007-03-27 17:15:02 UTC
(rev 75032)
@@ -1,5 +1,10 @@
2007-03-27 Igor Zelmanovich <[EMAIL PROTECTED]>
+ * XmlSiteMapProvider.cs: fixed:
+ resolve app-relative path from config such siteMapFile="~/Web.sitemap".
+
+2007-03-27 Igor Zelmanovich <[EMAIL PROTECTED]>
+
* SiteMapNode.cs:
* XmlSiteMapProvider.cs: fixed: Localize Site-Map Data.
Modified: trunk/mcs/class/System.Web/System.Web/XmlSiteMapProvider.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/XmlSiteMapProvider.cs 2007-03-27
17:09:24 UTC (rev 75031)
+++ trunk/mcs/class/System.Web/System.Web/XmlSiteMapProvider.cs 2007-03-27
17:15:02 UTC (rev 75032)
@@ -285,11 +285,11 @@
if (file == null && file.Length == 0)
throw new ArgumentException ("you must provide
a file");
-
- if (UrlUtils.IsRelativeUrl (file))
- file =
Path.Combine(HttpRuntime.AppDomainAppPath, file);
+
+ if (HttpContext.Current != null)
+ file = HttpContext.Current.Request.MapPath
(file, HttpRuntime.AppDomainAppVirtualPath, false);
else
- file =
UrlUtils.ResolvePhysicalPathFromAppAbsolute (file);
+ throw new InvalidOperationException
("HttpContext is missing");
if (File.Exists (file)) {
watcher = new FileSystemWatcher ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches