使用 Infragistics WebDialogWindow 的回发过程中“指定的参数超出了有效值的范围”

发布于 2024-08-08 22:17:35 字数 1955 浏览 6 评论 0原文

处理回发时,我在网页上遇到了非常奇怪的问题。以下是错误的解释:

错误: 指定的参数超出了有效值的范围。 参数名称:值 描述:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的来源的更多信息。

异常详细信息:System.ArgumentOutOfRangeException:指定的参数超出了有效值的范围。 参数名称:值

源错误:

当前 Web 请求执行期间生成未处理的异常。有关异常来源和位置的信息可以使用下面的异常堆栈跟踪来识别。

堆栈跟踪:

[参数超出范围异常: 指定的参数超出了 有效值的范围。参数名称: 值]
System.Web.UI.WebControls.Unit..ctor(字符串 值、CultureInfo 文化、UnitType 默认类型)+8670188
System.Web.UI.WebControls.Unit.Parse(字符串 s,CultureInfo 文化)+31
Infragistics.Web.UI.Framework.ControlObject.ConvertToUnit(对象 obj,单位定义,布尔值allowNegative) +399 Infragistics.Web.UI.LayoutControls.WebDialogWindow.get_Top() +74 Infragistics.Web.UI.LayoutControls.DialogWindowBot.LoadClientPropsTransactionList(字典`2 列表)+350
Infragistics.Web.UI.Framework.ObjectBase.LoadTransactionList(布尔值 deferLoadPostDataProcessing) +57
Infragistics.Web.UI.Framework.RunBot.LoadClientData() +57 Infragistics.Web.UI.Framework.RunBot.HandleLoadPostData(字符串 postDataKey、NameValueCollection 收藏后) +14
Infragistics.Web.UI.Framework.ControlMain.LoadPostData(字符串 postDataKey、NameValueCollection 后收藏)+19
System.Web.UI.Page.ProcessPostData(NameValueCollection postData,布尔值 fBeforeLoad) +693
System.Web.UI.Page.ProcessRequestMain(布尔值 includeStagesBeforeAsyncPoint,布尔值 includeStagesAfterAsyncPoint)+1743

说明

如果您查看堆栈跟踪,我们很容易发现 .NET 仍然没有通过我的代码,因此我无法放置任何断点。更奇怪的是,对于完全相同的过程但具有不同的数据(在我的页面上),它工作得很好。请帮助我,我花了大约3个小时!

更新

我必须说,当它失败时(目前只有 2 个对象,例如 30 个测试对象),它仅在回发时失败。它在页面上使用:Infragistics webdialogwindow 和 webcontrol 来处理“可见”属性(隐藏或正常而不是大小)。但正如下面有人所说(抱歉不记得你的名字),这肯定与网络对话框窗口有关,但我只是不处理它的位置......

更新2

我们已经尝试过从数据库中删除了 varchar(max) 列的值,现在它可以工作了!哇,我们不知道该怎么想,因为一切看起来都很好。问题是我们必须保留此列的值!有人知道对此有何看法吗?此 varchar(max) 在数据列表上显示为 Eval("DescriptionMemo")。

I've got realy weird problem on a web page when processing a post back. Here is the error will fallow an explication :

Error :
Specified argument was out of the range of valid values.
Parameter name: value
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.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: value

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:

[ArgumentOutOfRangeException:
Specified argument was out of the
range of valid values. Parameter name:
value]
System.Web.UI.WebControls.Unit..ctor(String
value, CultureInfo culture, UnitType
defaultType) +8670188
System.Web.UI.WebControls.Unit.Parse(String
s, CultureInfo culture) +31
Infragistics.Web.UI.Framework.ControlObject.ConvertToUnit(Object
obj, Unit def, Boolean allowNegative)
+399 Infragistics.Web.UI.LayoutControls.WebDialogWindow.get_Top()
+74 Infragistics.Web.UI.LayoutControls.DialogWindowBot.LoadClientPropsTransactionList(Dictionary`2
list) +350
Infragistics.Web.UI.Framework.ObjectBase.LoadTransactionList(Boolean
deferLoadPostDataProcessing) +57
Infragistics.Web.UI.Framework.RunBot.LoadClientData()
+57 Infragistics.Web.UI.Framework.RunBot.HandleLoadPostData(String
postDataKey, NameValueCollection
postCollection) +14
Infragistics.Web.UI.Framework.ControlMain.LoadPostData(String
postDataKey, NameValueCollection
postCollection) +19
System.Web.UI.Page.ProcessPostData(NameValueCollection
postData, Boolean fBeforeLoad) +693
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint) +1743

Explication

If you look at the stacktrace, we easly see that .NET still aint pass throught my code so i can't put any breakpoint. Something more strange is that for EXACTLY the same process but with differents data (on my page), it works preaty fine. Please help me, im on it for about 3 hours!

UPDATE

I've got to say that, when it fails (for now only 2 objects on somethings like 30 tested), it fails ONLY on a Postback. It become on page that using : Infragistics webdialogwindow and a webcontrol to handles the "visible" like property (Hidden or normal not the size). But as someone said below (sorry don't remember your name), it's for sure regarding to the webdialogwindow but i just DON'T handle the position of it ...

UPDATE 2

We've tried to removed a varchar(max) column's value from database and now it's workin'!! Wow, we don't know what to think because everyting looks to be ok.The problem is that we MUST keep this column's value!!! Anyone know what to think about that? This varchar(max) is shown as a Eval("DescriptionMemo") on a datalist.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

绝影如岚 2024-08-15 22:17:35

鉴于您的更新,这是一个有根据的猜测。

我对 Infragistics WebDialog 组件了解不多,但大多数对话框都在页面上居中。如果您的列与对话框的位置有关,则它可能会根据正在显示的数据的大小来计算对话框的位置。

如果数据太大而无法显示,则可能会将对话框置于理论上超出 Unit 类可接受的值范围的位置。

如果该列被隐藏,则一切都很好,因为对话框将适合窗口,并且坐标(特别是顶部坐标,如堆栈跟踪中所示)将为负数。如果它显示,对话框也不会显示,因为它会超出浏览器窗口的范围。

这只是理论和猜测,但它是基于我们在这里看到的。

Given your update, here's an educated guess.

I don't know much about the Infragistics WebDialog componen, but most dialogs are centered on the page. If your column has anything to do with the positioning of the dialog, it may be calculating the position of the dialog based on the size of the data that is being displayed.

If the data is too large to display, that may put the dialog at a position that is theoretically outside the bounds of the Unit class's acceptable range of values.

If the column is hidden, everything is fine, because the dialog would fit on the window, and the coordinates (specifically, the Top coordinate, as shown in your stack trace) would be negative. If it's displayed, the dialog would not, because it would stretch beyond the confines of the browser window.

That's all just theory and speculation, but it's based on what we can see here.

情愿 2024-08-15 22:17:35

您正在使用无效的参数集调用 System.Web.UI.WebControls.Unit 的构造函数,或者以某种方式不正确地初始化它。

您是否在 aspx 页面的 WebControl 上的某个位置设置了单位?

You are calling the constructor for System.Web.UI.WebControls.Unit with an invalid parameter set or somehow initializing this improperly.

Are you setting a unit somewhere on a WebControl in your aspx page?

把昨日还给我 2024-08-15 22:17:35

我的猜测是您正在发送无法解析的内容:

System.Web.UI.WebControls.Unit..ctor(String value, CultureInfo Culture, UnitType defaultType)

如何:设置 Web 服务器控制单元属性

My guess is that your are sending something it can't parse:

System.Web.UI.WebControls.Unit..ctor(String value, CultureInfo culture, UnitType defaultType)

How to: Set Web Server Control Unit Properties

好听的两个字的网名 2024-08-15 22:17:35

根据MSDN,当Unit类的构造函数抛出ArgumentOutOfRangeException时, value 参数超出范围(不在 -32768 和 32767 之间)。不知何故,这就是传递给页面上该元素的值。

现在,您已经说过您在不同的请求中传递不同的值,并且这些请求有效。您在这项工作中传递的价值观是什么?你传递了哪些失败的价值观?

编辑:我看到您正在使用 Infragistics WebDialogWindow,并且您正在尝试获取对话框的最顶层坐标。那是关闭的坐标。它超出了 Unit 类的有效值范围。现在最大的问题是为什么会这样?

According to MSDN, ArgumentOutOfRangeException is thrown by the Unit class's constructor when the value argument is out of range (not between -32768 and 32767). Somehow, that's the value being passed to that element on the page.

Now, you've said that you are passing different values in different requests and that those requests work. What are the values that you are passing that work? What are the values that you pass that fail?

EDIT: I see that you are using the Infragistics WebDialogWindow, and that you're trying to get the topmost coordinate of the dialog. THAT is the coordinate that is off. It's outside the valid range of values for the Unit class. The big question now is why is that the case?

野鹿林 2024-08-15 22:17:35

哇哇哇!没关系!我只能说:
如果您使用 Infragistics webdialogwindow 并将 IntialLocation 设置为“居中”。将其放在页面顶部(无论如何,它是一个“弹出窗口”,因此它“位于”页面内容之上)。因为我的问题是,当页面有超过 32000px 长度(不知道确切的长度)时,弹出窗口无法正确定位窗口,因为它无法将其放入 int32 中......哇。多么错误啊

Wowwwww! It's ok! All I can say is :
If you'r using Infragistics webdialogwindow with IntialLocation set to "Centered". Put it at the top of your page (It's a "popup" anyway so it "over" your page content). Because my problem were that when the page having, says more that 32000px lenght(dunno the exact length) popup were unabled to locate correctly the window cuz it can't put it in a int32... wow. What a bug

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文