473,732 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE8 "Data Execution Prevention" error thrown when setting hidden field value

Frinavale
9,735 Recognized Expert Moderator Expert
I've been trying to test my web application using Internet Explorer 8 (release candidate 1) and have been experiencing some major problems. I'm hoping you can help me with this one.

I have a JavaScript Object that tracks the horizontal scroll position of a <div> element on the page. It sets a hidden field so that when the page is submitted to the server, the server code is able to retrieve the current scroll position. When the page is sent back to the browser, the server side code initializes the JavaScript Object with the scroll position retained.

This has all been working for quite some time now....but with the new IE8 RC1 I'm getting a Data Execution Prevention error message. It's displayed in a prompt informing me that:
Data Execution Prevention helps protect against damage from viruses and other security threats.
When I hit the "close message" button in this prompt IE8 proceeds to crash.

This message appears when I am storing the scroll position of the <div> in the hidden field used to relay the scroll position to the server:

Expand|Select|Wrap|Line Numbers
  1.     _onScroll: function() {
  2. //this.get_element retrieves the <div> element
  3.         if (this.get_element()) {
  4.             this._LeftScrollPosition = this.get_element().scrollLeft;
  5. //scrollPositionMessenger is the hidden field that relays the scroll position to the server
  6.             var scrollPositionMessenger = document.getElementById(this._ScrollPositionMessengerName);
  7.             if(scrollPositionMessenger != null)
  8.             {
  9. //Error thrown here
  10.             scrollPositionMessenger.value=this._LeftScrollPosition;
  11.             }
  12.  
  13.         }
Does anyone know how to get around this problem?

Thanks for your time,

-Frinny
Mar 16 '09 #1
14 8469
acoder
16,027 Recognized Expert Moderator MVP
I don't know why it triggers that error, but a quick search on "Data Execution Prevention" shows that you can switch it off in non-64bit versions of IE8. Does that help?
Mar 17 '09 #2
Frinavale
9,735 Recognized Expert Moderator Expert
It doesn't help because the end users shouldn't have to be playing around their browser settings while using my web application.

I'm attempting to find a solution that doesn't involve a hidden field...but have no idea how I'm going to accomplish this yet.
Mar 17 '09 #3
acoder
16,027 Recognized Expert Moderator MVP
You could use the URL or cookies.
Mar 17 '09 #4
Frinavale
9,735 Recognized Expert Moderator Expert
After much debugging I determined that I am able to set the value of the HiddenField using my JavaScript Object; however, setting it during the "onscroll" event is causing IE to crash. It does a nice little memory dump. I think that the scrolling action is too fast for it to properly manage the memory it takes to grab a reference to the HiddenField and set it's value. (I think this because if I set breakpoints during the scrolling it sets the HiddenField properly and doesn't crash, but under normal usage it causes the Data Execution Prevention exception...or, if I scroll too quickly, it just crashes)

Instead of setting the HiddenField during the onscroll event I would love to set the HiddenField before the page is submitted... is it possible to implement the JavaScript Object in such a way that it is aware of a page submit?
Mar 17 '09 #5
Frinavale
9,735 Recognized Expert Moderator Expert
I found the answer to my question....
You can access the beginRequest event using the PageRequestMana ger in the .NET Ajax Framework.

My problem now is that the HiddenField has an empty string when it the request gets to the server.

At least IE's not crashing any more.

Thanks for your help Acoder.

[edit]
I thought I had found the answer but apparently I cannot set the HiddenField during the beginRequest nor can I set it in the InitializeReque st Event...the value never makes it to the server.

This is very disappointing
[/edit]
Mar 17 '09 #6
acoder
16,027 Recognized Expert Moderator MVP
@Frinavale
Try the onsubmit event. When the page is submitted, you can set the hidden field just the once.
Mar 18 '09 #7
Frinavale
9,735 Recognized Expert Moderator Expert
I tried your recommendation and it didn't work....

Sorry, I should have been more clear about what I meant when I said "page submit". The scroll position needs to be stored in the hidden field during an asynchronous post back to the server (Ajax call). So, the onsubmit event never occurs in this situation.
Mar 18 '09 #8
acoder
16,027 Recognized Expert Moderator MVP
Well, why not set it just before the Ajax call or pass the scroll value in the URL (GET) or in the send() method (POST)?
Mar 18 '09 #9
Frinavale
9,735 Recognized Expert Moderator Expert
That's what I'm trying to do.

I was attempting to set the HiddenField value in the beginRequest event, or in the initializeReque st event. Both of these events occur before the Ajax call is executed; however, at this point, (I think) the request has already been created and so changing the HiddenField value in these events is useless.

I'm not sure how I would pass the value via the URL (GET method) using JavaScript.

Since my web application uses POST, I'm more interested in how I would pass the value using the send() method....since I don't know how to do this I'm going to look into it now.

Thanks for the suggestion!

-Frinny
Mar 18 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

3
5368
by: Will Atkinson | last post by:
Hi All, I'm a relative newbie to SQL Server, so please forgive me if this is a daft question... When I set "Show Execution Plan" on in Query Analyzer, and execute a (fairly complex) sproc, I note that a particular query is reported as having a query cost of "71% relative to the batch" - however, this is nowhere near the slowest executing query in the batch - other queries which take over twice as long are reported as having costs in...
1
1527
by: Esben Rune Hansen | last post by:
Hi I am working on a PHP-script and need javascript to set the value of a hidden field in a form. This field happens to be an entry in an array data according to my example. How can I do this? Below is listet two PHP-pages: one that doesn't work (to my dismay), and another that does work, but do not use an array entry in the hidden field. Thanks
0
1010
by: gorella | last post by:
Under tools in VS 2003, when I select "Connect to Database" or if I press the icon under Server explorer, nothing happens. I've uninstalled and reinstalled 3 times. I've reinstalled MDAC and still have the same problem. I'm using VS 2003 under XP.
3
3318
by: Bill Davidson | last post by:
All: I recently upgraded a VC++6 COM Server Exe project to VC++7.1 (w/ the latest PSDK). After a couple of minor hurdles, I got the project to compile and self-register. Unfortunately, when I tried to call into the server from either a VB6 or a VC6 test client, an error occurs at object creation time. Looking at Task Manager, the server .Exe never actually launches.
2
7334
by: Ravi J | last post by:
I am trying to load Microsoft Word and create a document in ASP.NET (C#). But the call to application creation 'Word._Application app = new Word.ApplicationClass();' takes quit a bit of time, and eventually "Server Execution Failed" page appears. "Exception Details: System.Runtime.InteropServices.COMException: Server execution failed ... " The same call inside a WIndows Form succeeds. But for some reason, in ASP.NET it doesn't. Quick...
7
10300
by: Benton | last post by:
Hi there, I have a text box which will receive its value from a pop-up date picker. The user should not be able to edit this field with the keyboard or mouse. I am using ASP.NET. If I set the readonly property of the textbox to true, it won't let the user change it and it can receive its value from the pop-op calendar, just what I need. Problem is, after a postback, value is lost. So I think Javascript may come to the rescue here. Is...
3
3294
by: Mejmeyster | last post by:
Hi Everyone, I have a table in which one of the text fields has become too small (since it only holds 255 characters). To remedy that, I'm trying to change the data type of that field to "memo" in design mode. However, when I go to save the new settings of my table, the error message "Record is too large" pops up and won't allow me to save the table. What am I doing wrong? I work with Access 97 in Windows XP. Thanks for your help!
1
6928
by: Javilen | last post by:
Hello, edit: added some more info I am trying to set up a job to run a SSIS package in SQL 2005, the SQL 2005 is installed on a Windows server 2003 machine. start Edit I have the Management studio (I am working from) installed on windows XP (fully up today with the SPs). I have the installed on this machine the integrated Services, I do not know if they have been installed on the Windows 2003 machine that has the DB. end Edit
3
6794
by: martin DH | last post by:
I would definitely appreciate any help with this problem as soon as possible. Thanks! I have a report that should display the results of a query based on two tables (tblClient and tblResult, linked by ClientID). When trying to open the report I receive the following error: "Data Type Mismatch in Criteria Expression" The report worked before, so as an experiment I created a new table with a structure identical to tblResult (so I...
0
8944
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8773
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9445
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9234
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9180
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4805
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3259
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2177
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.