我得到通過rewitting網址的錯誤:ASP重寫URL路徑
if (!IsPostBack)
{
string req = Request.QueryString["prodID"];
if (req != null)
{
int prodID = int.Parse(Request.QueryString["prodID"]);
koszyk.Dodaj(prodID);
//del prodID from url:
string url = Request.Url.AbsolutePath;
System.Web.HttpContext.Current.RewritePath(url, "", "");
}
}
錯誤消息: 虛擬路徑進行映射到另一個應用程序,這是禁止的。
FULL LOG: System.Web.VirtualPath.FailIfNotWithinAppRoot()3116542 System.Web.HttpContext.RewritePath(VirtualPath文件路徑,VirtualPath PATHINFO,字符串的queryString,布爾setClientFilePath)63 System.Web.HttpContext.RewritePath (String filePath,String pathInfo,String queryString)+48 Zakupy.Page_Load(Object sender,EventArgs e)in c:\ Documents and Settings \ Informatyk \ Pulpit \ NAI \Moduł11\ Problem 1,2,3 The Zakupy.aspx.cs :30 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,Object o,Object t,EventArgs e)+14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,EventArgs e)+35 System.Web .UI.Control.OnLoad(EventArgs的E)+91 System.Web.UI.Control.LoadRecursive()+74 System.Web.UI.Page.ProcessRequestMain(布爾includeStagesBeforeAsyncPoint,布爾includeStagesAfterAsyncPoint)2207
出現這種情況時,我想補充一點,以籃子
有什麼想法嗎?
什麼是你的'Zakupy.aspx.cs'頁面中的第30行? – enb081 2013-03-28 09:19:44
System.Web.HttpContext.Current.RewritePath(url,「」,「」); – NightKn8 2013-03-28 09:53:08