運行Asp.net頁面過程中出現的錯誤及解決方案

來源:互聯網
上載者:User

1:

Server Error in '/' 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.

Exception Details: System.Web.HttpException: 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.

Source Error:

[No relevant source lines]


Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files\root\7f357fc5\ae304b34\App_Web_mafv2oof.1.cs    Line: 0

Stack Trace:

[ViewStateException: Invalid viewstate. Client IP: 127.0.0.1Port: Referer: http://localhost:50713/Test1.aspxPath: /Test2.aspxUser-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.2)ViewState: /wEPDwULLTE4MjkxNTU5NzhkZOA2RyH6JCzOJ8aEV6HR1UA9ZXaFsICGF2r4Cas3DkKc][HttpException (0x80004005): 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.]   System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +235   System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +14   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +274   System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4   System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37   System.Web.UI.HiddenFieldPageStatePersister.Load() +241   System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +106   System.Web.UI.Page.LoadAllState() +43   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8431   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253   System.Web.UI.Page.ProcessRequest() +78   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21   System.Web.UI.Page.ProcessRequest(HttpContext context) +49   ASP.test2_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\7f357fc5\ae304b34\App_Web_mafv2oof.1.cs:0   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET
Version:4.0.30319.1

 

Cause:驗證檢視狀態MAC失敗,如果此應用程式由網路場或群集承載,請確保<machineKey>配置指定了相同的validationKey和驗證演算法。在叢集中不能使用自動產生的machineKey。【在一個 Web 服務器場中每個用戶端請求可以在每次回傳轉到另一台電腦。由於這種行為的不能使 validationKey 屬性設定為 自動產生 Machine.config 檔案中。而是,您必須為一個由 Web 場上的所有電腦共用的固定字串設定 validationKey 屬性的值。】

Solution:在進行處理的Asp頁面中的Page標籤處 加入 enableViewStateMac="false"

 

2:

Server Error in '/GAUserAuthentication' Application. No http handler was found for request type 'GET'

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.

Exception Details: System.Web.HttpException: No http handler was found for request type
'GET'

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[HttpException (0x80004005): No http handler was found for request type 'GET']   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +685   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET
Version:4.0.30319.1

 

Cause:在web.config檔案中<httpHandlers>節點的內容被clear掉了

Solution:在web.config檔案中的<httpHandlers>節點下將<clear/>節點去掉,保留對http的請求處理

 

3:

Unable to start debugging on the web server. The underlying connection was closed: An unexpected error occurred on a send.

Click Help for more information.

 

Cause:

Solution:

 

4:

Authorization-->Cannot verify access to path(D:\......)

The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that <domain>\<computer_name>$ has Read access to the physical path. Then test these settings again.

Cause:

Solution:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.