void Execute (string path, TextWriter writer, bool preserveForm, bool isTransfer)
{
if (path == null)
throw new ArgumentNullException ("path");
if (path.IndexOf (':') != -1)
throw new ArgumentException ("Invalid path.");
string queryString = null;
int qmark = path.IndexOf ('?');
if (qmark != -1) {
queryString = path.Substring (qmark + 1);
path = path.Substring (0, qmark);
}
string exePath = UrlUtils.Combine (context.Request.BaseVirtualDir, path);
bool cookieless = false;
#if NET_2_0
SessionStateSection config = WebConfigurationManager.GetWebApplicationSection ("system.web/sessionState") as SessionStateSection;
cookieless = SessionStateModule.IsCookieLess (context, config);
#else
SessionConfig config = HttpContext.GetAppConfig ("system.web/sessionState") as SessionConfig;
cookieless = config.CookieLess;
#endif
if (cookieless)
exePath = UrlUtils.RemoveSessionId (VirtualPathUtility.GetDirectory (exePath), exePath);
IHttpHandler handler = context.ApplicationInstance.GetHandler (context, exePath, true);
Execute (handler, writer, preserveForm, exePath, queryString, isTransfer, true);
}