【发布时间】:2011-01-19 15:28:06
【问题描述】:
我自己是 URL 路由。 主项目仅包含 URL 路由代码。 不同的网站放在approot上。 例如:我在 approot/webTest/ 部署了 VS2010 test-default-website。 我正在尝试从浏览器打开http://webTest/Account/Login.aspx。 对于该 URL 请求,我正在使用 PageParser.GetCompiledPageInstance() 提供页面,如下所示:
在 URL 路由请求处理程序中,
return PageParser.GetCompiledPageInstance("webTest/Account/Login.aspx", HttpContext.Current.Server.MapPath("webTest/Account/Login.aspx"), HttpContext.Current);
我收到以下异常:
文件“/Account/webTest/Account/Login.aspx”不存在。
PageParser.GetCompiledPageInstance 会自动在实际地址前附加“/Account”,因此无法找到。 我怎样才能让它不附加'/Account'?
谢谢。 最好的问候。
【问题讨论】:
标签: asp.net url-routing