zoukankan      html  css  js  c++  java
  • 运行Asp.net页面过程中出现的错误及解决方案

    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.1
    	Port: 
    	Referer: http://localhost:50713/Test1.aspx
    	Path: /Test2.aspx
    	User-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:

  • 相关阅读:
    累加和校验算法(CheckSum算法)
    云锵投资 2021 年 09 月简报
    云锵投资 2021 年 08 月简报
    断言与忽略断言
    出现 undefined reference to `cv::String::deallocate()'的解决方法
    about of string
    esp32: A stack overflow in task spam_task has been detected.
    IDEA部署Tomcat报错:No artifacts marked for deployment
    在safari浏览器上使用php导出文件失败
    laravel中使用vue热加载时 Cannot read property 'call' of undefined BUG解决方案
  • 原文地址:https://www.cnblogs.com/mingmingruyuedlut/p/2244371.html
Copyright © 2011-2022 走看看