protected void BTNTEST_Click(object sender, EventArgs e) { string CurrentURL_Path = Request.Path.ToLower(); if (CurrentURL_Path.StartsWith("/urlrewriting/")) { CurrentURL_Path = CurrentURL_Path.Trim(); //string NewsID = "21";// CurrentURL_Path.Substring(CurrentURL_Path.IndexOf("/")); HttpContext MyContext = HttpContext.Current; MyContext.RewritePath("/urlrewriting/test.aspx?News=21"); } }
Server Error in '/urlrewriting' Application. -------------------------------------------------------------------------------- Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)