GVKun编程网logo

Sys.WebForms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误。”

8

在这里,我们将给大家分享关于Sys.WebForms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误。”的知识,同时也会涉及到如何更有效

在这里,我们将给大家分享关于Sys.WebForms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误。”的知识,同时也会涉及到如何更有效地"System.OutOfMemoryException" exception when you execute a query in SQL Server Manageme...、AJAX 中Sys.WebForms.PageRequestManager的事件激发顺序、appium 报错:selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occu、appium启动服务,链接app报错elenium.common.exceptions.WebDriverException: Message: An unknown server-side erro的内容。

本文目录一览:

Sys.WebForms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误。”

Sys.WebForms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误。”

我在页面上有几个更新面板和jquery选项卡。另外,我正在更新面板上加载几个用户控件。用户等待几分钟后(未检查的时间约为40分钟)。当用户从“提交”按钮发送请求时,出现以下错误?

''Sys.WebForms.PageRequestManagerServerErrorException:Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0'' when calling method: [nsIDOMEventListener::handleEvent]

我无法解决此问题。但我相信。这是由Ajax引起的。大师,如果您知道解决方案。请告诉我。

答案1

小编典典

当您有一个控件注册为AsyncPostbackTrigger多个更新面板中时,有时会出现此问题。

如果这不是问题,请尝试在脚本管理器声明之后立即添加以下内容:

<script type="text/javascript" language="javascript">    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);    function EndRequestHandler(sender, args){        if (args.get_error() != undefined){            args.set_errorHandled(true);        }    }</script>

这里讨论了更多解决方案:http :
//forums.asp.net/t/1066976.aspx/9/10

"System.OutOfMemoryException" exception when you execute a query in SQL Server Manageme...

Symptoms


When you use Microsoft SQL Server Management Studio (SSMS) to run an SQL query that returns a large amount of data, you receive an error message that resembles the following:

An error occurred while executing batch. Error message is: Exception of type ''System.OutOfMemoryException'' was thrown

 

 

Cause


This issue occurs because SSMS has insufficient memory to allocate for large results.

 

Note SSMS is a 32-bit process. Therefore, it is limited to 2 GB of memory. SSMS imposes an artificial limit on how much text that can be displayed per database field in the results window. This limit is 64 KB in "Grid" mode and 8 KB in "Text" mode. If the result set is too large, the memory that is required to display the query results may surpass the 2 GB limit of the SSMS process. Therefore, a large result set can cause the error that is mentioned in the "Symptoms" section.

 

 

Workaround


To work around this issue, try one of the following methods.


Method 1: Output the results as text
Configure the query window to output the query results as text. A text output uses less memory than the grid, and it may be sufficient to display the query results. To make this change, follow these steps:

  1. Right-click the query window.
  2. Click Results to.
  3. Click Results to Text.


Method 2: Output the results to a file
Configure the query window to output the query results to a file. A file output uses a minimal amount of memory. This reserves more memory for storing the results set. To make this change, follow these steps:

  1. Right-click the query window.
  2. Click Results to.
  3. Click Results To File.
  4. Run the query, and then select the location in which to save the results file.


Method 3: Use sqlcmd
Use the sqlcmd tool instead of SSMS to run the SQL queries. This method enables queries to be run without the resources that are required by the SSMS UI. Additionally, you can use the 64-bit version of Sqlcmd.exe to avoid the memory restriction that affects the 32-bit SSMS process.

 

原文链接

 

AJAX 中Sys.WebForms.PageRequestManager的事件激发顺序

AJAX 中Sys.WebForms.PageRequestManager的事件激发顺序

AJAX 中Sys.WebForms.PageRequestManager的事件激发顺序

测试代码:

[c-sharp] view plain copy
  1. 测试代码如下:
  2. <%@PageLanguage="C#"AutoEventWireup="true"CodeBehind="Test.aspx.cs"Inherits="AjaxCtpWebDemo.Test"%>
  3. <!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <htmlxmlns="http://www.w3.org/1999/xhtml">
  5. <headrunat="server">
  6. <title>无标题页</title>
  7. </head>
  8. <body>
  9. <formid="form1"runat="server">
  10. <asp:ScriptManagerID="ScriptManager1"runat="server">
  11. </asp:ScriptManager>
  12. <%=DateTime.Now.ToString()%><hr/>
  13. <asp:UpdatePanelID="UpdatePanel1"runat="server">
  14. <ContentTemplate>
  15. <%=DateTime.Now.ToString()%>
  16. <hr/>
  17. <asp:ButtonID="Button1"runat="server"Text="Button"/>
  18. </ContentTemplate>
  19. </asp:UpdatePanel>
  20. <mce:scripttype="text/javascript"language="javascript"><!--
  21. Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(
  22. function(sender,e)
  23. {
  24. alert("add_initializeRequest");
  25. }
  26. );
  27. Sys.WebForms.PageRequestManager.getInstance().add_endRequest(
  28. alert("add_endRequest");
  29. }
  30. );
  31. Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(
  32. function(sender,e){
  33. alert("add_beginRequest");
  34. Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(
  35. alert("add_pageLoaded");
  36. Sys.WebForms.PageRequestManager.getInstance().add_pageLoading(
  37. alert("add_pageLoading");
  38. //--></mce:script>
  39. </form>
  40. </body>
  41. </html>

最终结果如下:

1.页面第一次进入时,会首先激发add_pageLoaded事件

2.异步提交时,事件的激发顺序如下:

add_initializeRequest

add_beginRequest

add_pageLoading

add_pageLoaded

add_endRequest

add_pageLoaded

转:http://www.cnblogs.com/fifastar/archive/2008/06/02/1212225.html

获取PageRequestManager的实例:var prm = Sys.WebForms.PageRequestManager.getInstance();
属性prm.get_isInAsyncPostBack():判断一个异步回送是否正在进行中

方法prm.abortPostBack():把一个正在执行中的异步回送取消。

客户端页面的生命周期

1、initializeRequest:
触发时机:当一个异步请求的回送被初始化之前引发。
添加事件处理代码:Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(initFunc);
移除事件处理代码:Sys.WebForms.PageRequestManager.getInstance().remove_initializeRequest(initFunc);
initFunc是该页面初始化之前要执行的客户端方法。该方法的声明为:
function initFunc(sender,args)
{
//args的数据类型是:InitializeRequestEventArgs类型。
//args.get_postBackElement():取得初始化异步回送的元素对象。
//args.get_postBackElement().id取得初始化异步回送的元素对象的id号
//args.get_postBackElement().value取得初始化异步回送的元素对象的value值
//args.set_cancel(bool):取消初始化异步回送,即丢弃该异步回送。
}
如果异步处理的过程比较慢,在异步处理的过程中再次发出同样的请求的话,那后者的异步处理请求会取消掉前一步未处理完的请求。这就是默认的异步请求优先级--“后者优先”。
我们通常回利用initailizeRequest事件来取消一个异步回送(正在进行的回送和将要初始化的回送)。

copy

appium 报错:selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occu

appium 报错:selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occu

appium进行手机浏览器的自动化测试启动代码如下

#使用手机浏览器进行自动化测试
import time
from appium import webdriver

#自动化配置信息
des={
'platformName': 'Android',
'platformVersion': '8.0', #填写android虚拟机的系统版本
'deviceName': 'SamSung galaxy S9', #填写安卓虚拟机的设备名称---值可以随便写
'browserName': 'chrome', # 直接指定浏览器名称参数为chrome【重点添加了这一步】
'udid': '192.168.235.103:5555', # 填写通过命令行 adb devices 查看到的 uuid
'noreset': True, # 确保自动化之后不重置app
'unicodeKeyboard': True,
'resetKeyboard': True,
'chromedriverExecutable': r"C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe" #使用指定的浏览器驱动-匹配手机上的谷歌浏览器
}
driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', des)
driver.implicitly_wait(5)
driver.get('http://hao.uc.cn/') #打开UC网页

 

报错如下:

selenium.common.exceptions.WebDriverException:
Message: An unkNown server-side error occurred while processing the command. Original error: Can't stop process;
it's not currently running (cmd: ''C:/Program Files/Appium/resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/win/chromedriver.exe' --url-base\=wd/hub --port\=8001 --adb-port\=5037 --verbose')

 

原因

折腾了相当久 ,两个晚上 才找到原因,代码没有问题,问题出在浏览器版本与chromedriver版本不一致导致的

解决办法

下载与浏览器版本一致的驱动后,再次启动就成功了。

对应浏览器版本的Chromedriver下载地址:https://npm.taobao.org/mirrors/chromedriver

chromedriver版本匹配地址:https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md

 

appium启动服务,链接app报错elenium.common.exceptions.WebDriverException: Message: An unknown server-side erro

appium启动服务,链接app报错elenium.common.exceptions.WebDriverException: Message: An unknown server-side erro

selenium.common.exceptions.WebDriverException: Message: An unkNown server-side error occurred while processing the command.
Original error: Error executing adbExec. Original error: 'Command 'D:\\tools\\Android\\android_sdk\\platform-tools\\adb.exe -P 5037 -s 3EP7N19314001798 shell
pm install -g /data/local/tmp/appium_cache/3d97225b036c28750562ef8962defee6b1af19a4.apk' exited with code 1'; Stderr: ''; Code: '1'

 

desired_caps = {
"automationName":"UiAutomator2",#使用哪个自动化引擎,appium1.x可以不用写
"platformName":"Android",#使用哪个移动操作系统平台
"platformVersion":'9',#移动操作系统版本
"deviceName":"3EP7N19314001798",#使用的移动设备或模拟器的种类,需要在cmd命令下,敲adb devices查看
"appPackage":"com.ulic.misp.asp",#所要测试的app的包名,获取命令:aapt dump badging apk路径,查看package: name=
"appActivity":"com.ulic.misp.asp.ui.loading.GuideActivity",#所要测试app的入口页面,获取命令:aapt dump badging apk路径,查看launchable-activity: name='
"noreset":True#在此会话之前,请勿重置应用程序状态
}
driver= webdriver.Remote("http://127.0.0.1:4723/wd/hub", desired_caps)


查看报错,appium无法清除应用缓存

1、重启下appinum
2、检查下开发者选项中的配置

今天的关于Sys.WebForms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误。”的分享已经结束,谢谢您的关注,如果想了解更多关于"System.OutOfMemoryException" exception when you execute a query in SQL Server Manageme...、AJAX 中Sys.WebForms.PageRequestManager的事件激发顺序、appium 报错:selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occu、appium启动服务,链接app报错elenium.common.exceptions.WebDriverException: Message: An unknown server-side erro的相关知识,请在本站进行查询。

本文标签: