// computed
string raw_url;
-
+
//
// Constructor used when the target application domain
// was created with ApplicationHost.CreateApplicationHost
return null;
}
}
-#if NET_2_0
public override string RootWebConfigPath {
get { return WebConfigurationManager.OpenWebConfiguration ("~").FilePath; }
}
-#endif
public override void EndOfRequest ()
{
else
local_page = page;
- string path = UrlUtils.Combine (app_physical_dir, local_page);
+ string path = Path.Combine (app_physical_dir, local_page);
if (SecurityManager.SecurityEnabled && (path != null) && (path.Length > 0)) {
new FileIOPermission (FileIOPermissionAccess.PathDiscovery, path).Demand ();
}
{
if (!hosted)
return null;
-
+ if (path != null && path.Length == 0)
+ return app_physical_dir;
+
if (!path.StartsWith (app_virtual_dir))
throw new ArgumentNullException ("path is not rooted in the virtual directory");
string rest = path.Substring (app_virtual_dir.Length);
if (rest.Length > 0 && rest [0] == '/')
rest = rest.Substring (1);
+ if (Path.DirectorySeparatorChar != '/') // for windows suport
+ rest = rest.Replace ('/', Path.DirectorySeparatorChar);
return Path.Combine (app_physical_dir, rest);
}