操作系统:日文XP
IIS版本:5.1
工程:Asp.NET
后台语言:VB现象:在工程中有个asp文件,直接显示没问题,但是想从aspx跳转到这个asp页面就出错错误信息
'/TMC' アプリケーションでサーバー エラーが発生しました。
--------------------------------------------------------------------------------../mymenu/Control.asp の子の要求を実行中にエラーが発生しました。 
説明 : 現在の Web 要求を実行中に、ハンドルされていない例外が発生しました。エラーに関する詳細および例外の発生場所については、スタック トレースを参照してください。 例外の詳細: System.Web.HttpException: ../mymenu/Control.asp の子の要求を実行中にエラーが発生しました。
スタック トレース: 
[HttpException (0x80004005): ../mymenu/Control.asp の子の要求を実行中にエラーが発生しました。]
   System.Web.HttpServerUtility.ExecuteInternal(String path, TextWriter writer, Boolean preserveForm)
   System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
   System.Web.HttpServerUtility.Transfer(String path)
   TMC.Cnr08_1000.Page_Load(Object o, EventArgs e) in E:\WebApplication\TMC\contract\Cnr08_1000.aspx.vb:106
   System.Web.UI.Control.OnLoad(EventArgs e)
   System.Web.UI.Control.LoadRecursive()
   System.Web.UI.Page.ProcessRequestMain() 

解决方案 »

  1.   

    ASP.NET 2.0 and "Validation of ViewState Mac failed" exception   
    If you get this Exception   [HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.]   and   you know *for sure* that you aren't using a web farm    
    it seems that it appears when using built-in databound controls such as GridView, DetailsView or FormView which utilize DataKeyNames.    
    it appears if you have a large page which loads slowly for any reason   
    If following preconditions are true and you click a postbacking control/link while the Page hasn't loaded completely, you might get the "Validation of ViewState MAC failed" exception. In this case be sure to check following post on ASP.NET Forums where this has been discussed quite thoroughly : http://forums.asp.net/1173230/ShowPost.aspx   It appears because GridView using DataKeyNames requires ViewState to be encrypted. And when ViewState is encrypted, Page adds <input type="hidden" name="__VIEWSTATEENCRYPTED" id="__VIEWSTATEENCRYPTED" value="" /> field just before closing of the <form> tag. But this hidden field might not bet yet rendered to the browser with long-running pages, and if you make a postback before it "gets down", browser initiates postback without this field (in form post collection)   End result is that if this field is omitted on postback, Page doesn't "know" that viewstate is encrypted and causes the prementioned Exception. E.g Page expects to be fully-loaded before you can make a postback. And by the way similar problem is with event validation since __EVENTVALIDATION field is also rendered on the end of the form.   A way to overcome the problem is to set in web.config    
    <pages enableEventValidation="false" viewStateEncryptionMode ="Never" />
    Just note the security implications of these!你瞧瞧这个有没帮助
    恩,召唤胖翻译官~
      

  2.   

    使用Response.Redirect("URL"); , 不要使用 Server.Transfer("URL");和Server.Execute("URL");
      

  3.   

    aspx往asp迁移的时候不能用Server.Transfer
    只能用Response.Redirect希望对大家有所帮助