.net - Viewstate Becomes Corrupt Intermittently?

Apr 13, 2011

I have had a user of my VB.net web app complain he keeps getting an intermittent error message, causing him to crash out of the system.

Stack Trace:
[FormatException: Invalid character in a Base-64 string.]
System.Convert.FromBase64String(Strings) +0
System.web. UI. LosFormatter.Deserialize(String input) +25

[code]...

It appears from the error message that the viewstate keeps becoming corrupt (see screen-dump below), but I don't understand why. He claims it happens every 2-3 minutes, but I've used the system a lot and have never experienced it.I should mention too that he is using the web-app in a very "non-standard" way. To achieve optimum speed he's actually using remote desktop, to connect to our server directly, and running it as localhost. ("Madness!"- yes, I know. I didn't make the decision.) That may not be relevant of course.

View 1 Replies


ADVERTISEMENT

Intermittently Fail To Launch Excel 2003 Via VB Exe

Sep 7, 2010

I have an executable built with VB2005 which is used to launch a password protected excel workbook, and the exe is used to hide the password then run some macros to setup menu commands and protect the workbook so that it can't be altered by the users.

The exe was built by registering the 11.0 version of Microsoft.Office.Interp.Excel in the project, and builds successfully. I can launch the spreadsheet sucessfully on my own desktop using Office 2003 and have tested everything on another 2 other independent desktops using Office 2003 however when I make it available for wider use, I have received a lot of feedback that excel will simply not launch when the exe is run. I had a look at one of the desktops where Excel wouldn't run and there were no associated entries in the Windows Event Viewer that I could see.

It seems that there are no problems running the exe using Office 2007.

My development machine was recently re-imaged with Office 2007 and I re-installed Office 2003, and re-registered the Excel PIA to allow it to work with Excel 2003. NOt sure if this could be hangover of having originally built the exe with Office 2007 then reverting of '2003.

Apologies if this is fairly basic stuff but I'm at a bit of a loss what to look for to identify why the exe will sucessfully launch Excel on some PCs but not others using the same operating system and version of Excel.

View 5 Replies

Intermittently Fail To Launch Excel 2003 Via VB Exe?

Jan 17, 2009

I have an executable built with VB2005 which is used to launch a password protected excel workbook, and the exe is used to hide the password then run some macros to setup menu commands and protect the workbook so that it can't be altered by the users.The exe was built by registering the 11.0 version of Microsoft.Office.Interp.Excel in the project, and builds successfully. I can launch the spreadsheet sucessfully on my own desktop using Office 2003 and have tested everything on another 2 other independent desktops using Office 2003 however when I make it available for wider use, I have received a lot of feedback that excel will simply not launch when the exe is run. I had a look at one of the desktops where Excel wouldn't run and there were no

View 9 Replies

Programmatically Created Controls Show Up Intermittently?

Feb 22, 2009

Now everybody knows that creating GUIs that have lots of repeated elements that are evenly spaced by hand is for chumps; all the cool kids use loops and add them at runtime. Given that being one of the cool kids is one of my top priorities I decided to give this a go - as my current project involves creating a grid of check boxes and then chunking them together under one event handler. In my experience - an nice effective way of dealing with grid like structures (2D arrays if you will) is to use nested loops such as:

For intY = 0 To 9
For intX = 0 To 9
Dim chk As New CheckBox

[code].....

View 3 Replies

VS 2008 Getting A Null Exception Error Intermittently

Dec 30, 2009

I'm hoping someone can assist. I'm still learning VB so excuse my lack of knowledge. The below code is a mashup of a code snippet I found that effectively reads from an SQLite database. The initial code snippet consisted of a textbox for input, a textbox for output, and also consisted of a datagrid to store the contents and a button to activate the lookup.

[Code]...

View 20 Replies

Check If A File Is Corrupt?

Aug 15, 2011

I am working on hex values of a file.Now to test it i delete single byte and then try to write the file using the remaining bytes.Well the file gets corrupted but still the file is constructed.

View 9 Replies

VS 2008 Mem Corrupt Error In Win XP?

Oct 21, 2009

I keep getting the following error in XP only (not Vista or Windows 7) Attempted to read or write protected memory. This is often an indication that other memory is corrupt The interesting thing is that the error is on a line that basically just creates a bitmap:

vb
Dim B as New Bitmap(400, 300)

This is in a timer and doesn't always happen the same time - eg sometimes it happens in 2 seconds sometimes it gets to 10 seconds - the interval is 50ms?

View 1 Replies

Transfer From One FTP To Another - Destination File Corrupt

Mar 17, 2011

I'm transferring from one FTP (a Dev site) to another FTP (a Test site). Spare me the thoughts of changing this process. In any case, here's my method:

Public Function TransferFile(originalFile As String, destinationFile As String) As String
Try
'FileStream for holding the file
Dim uploadRequest As FtpWebRequest = WebRequest.Create(destinationFile)
uploadRequest.Method = WebRequestMethods.Ftp.UploadFile
[Code] .....

This works perfectly for ASPX files and their .vb code behinds. When we try to transfer .DLL files, they show up on the server as 0 bytes, and sometimes actually transfer. The problem is that, despite being the same size as the original, they act as if they are corrupt.

View 2 Replies

VS 2008 Starting Excel By Itself - Corrupt App?

Jul 27, 2010

I�ve had a problem iwht my app for some time now. It�s very slow and above all it takes forever to startup. I�ve been adressing som issues that has to do with the database behind it.Recently I noticed that the app is starting an instance of excel, which seems to be what�s taking it so long in the starting process. The app is using access as db, and the db has some linked excelsheets. The app is also running some code in excel, but it�s starting, and terrminating, separate instances for that.The linked excelsheets are also "live-linked" to another app (third party), fetching real time data via DDE I think.

View 1 Replies

WMI SWbemRefresher - Strange Results / Objects In It Get Corrupt?

Jan 14, 2011

I am working on which is displaying "Live" CPU stats for a remote Server.I am creating a SWbemRefresher and everything works great, for about 2 minutes. Then I start getting "Odd" results, almost like the objects in it get corrupt.Let me explain. So I create my Refresher like this and iterate through each item in the collection, writing the results to a database:[code]....

The above works fine but after I while I start seeing strange results.So I may see things like 5 processes with the same ProcessID (which is impossible, or so I beleive?).Processes with apparently the same CPU usage which I know is incorrect.I also see processes with the incorrect ProcessID, so for example I may see ProcessID 123 and Process name CALC and then all of a sudden I will get ProcessID 123 process name winlogon, so the results are out of sync with each other.Attached is an example screenshot of what I mean which only shows two processes, but it does seem the longer I run the code (so say for 5 minutes) the more processes appear like the screenshot.

My thoughts are - the objRefresher.Refresh() does not finishfinishes half way through the loop, resulting in "skewed" results. I dont konw how I can wait or check to see if the Refresh has finished?I have tried everything I can think of and it doesnt make sense to me. Maybe a fresh pair of eyes will spot an obvious mistake .The target server is a Windows 2003 x86 SP1 box, the code is running on a Windows 7 x64 box.

View 4 Replies

Writing Of Files Leaves Corrupt NTFS?

Jul 3, 2007

Basically, we have an application which batch creates a large amount of files (pairs of PNG plus ASCII). The file count can exceed the one million.The first time the application ran the results were quite disappointing. The files get stored in folder structures of maximum 2000 files per folder. The tree depth gets only to two levels (root + packs folders). So the results would be stored in folders like "pack1","pack2"..."packn" each containing no more than 2000 files (1000 pairs in essence).

So getting back to the results, what happened was that although the application reported over 1.4 million files written, the results were that files were missing from the filesystem and others were corrupt (PNG cant be read and ASCII were blank filled with spaces).The speed that the files were written was not anything great (about 7 files per sec) and the total size ranged from 160K to 1.5M (rarely). The PNG images are 2000x2000 in size although I doubt it has anything to do with my problem.

Everything is done in pure .NET (image and ascii generation).The OS that has been tried was Win 2000 Advanced Server, Win 2003 Server plus XP Pro. The hardware ranged from Dual Core Workstation to high spec servers. The irony is that on the XP system the number of corrupt files was quite low where on the other two all hell broke loose. There were event logs written stating Event ID 2021 on the Win 2000 system and Paging faults on XP, which lead me to the next approach.

We wrapped the code to do an Application.DoEvents every second and refresh various statistic UI components. We obviously added Stream.Flush().Plus we added code to check the files (re-read them) once they are written. Even added "WriteThrough" option to avoid the OS cache! The result was stuggering as no errors were report yet the NTFS table again got corrupted!Now we inserted Thread.Sleep(100) after writing and then reading to confirm the file. Obviously this is slowing down the process but hope to have more stable results.

Reading and article about Event ID 2021 we saw it was suggesting to modify registry values, but the IT dep did not wish to accept this as they believe it is an application error.In pseudo code, here is more or less what is done:

<try>
<Create Image in memory>
<Open stream to filesystem>

[code]....

View 11 Replies

Check For A Value In ViewState?

Sep 17, 2010

I am new at the ViewState and i am looking to see what values are stored within it. I know how to loop through an array to check for a value but i do not know how to go about doing that for a ViewState("test") property.

Let's say i have added "bob, tom, Jim" to a ViewState called ViewState("test"). I would like to be able to see if "tom" was in the ViewState("test"). If not then add it but if it exists already then skip it.[code]....

View 4 Replies

How ViewState In ASP.NET Works

Mar 1, 2009

I thought I knew how ViewState worked, but I was wrong.I don't understand why the following ASPX page preserves the value typed into the TextBox after clicking on the Button?(ViewState is disabled for both the page and the TextBox.)

[Code]...

View 2 Replies

Program 2008 Form Is Corrupt And Can't Be Loaded By Designer

Mar 4, 2009

I have coded in the older version of VB for years (VB6 and prior) and Recently I just began learning VB 2008. In my current project I made a mistake in a form name frmAuthors and so far I am unable to recover. The problem is that I tried to have the form inherit a class I had created (first mistake). The IDE generated a popup message stating the error and provided the option of changing from inheritance from system.windows.forms to the class I had created. I said yes just to see what would happen (I was bored so I was up for something new) and that's when the form got corrupted.Is there a way to let frmAuthors go back to recognizing itself as a form object and not a member of the object I had created?

View 2 Replies

WebBrowser Control Printouts Graphically Corrupt With IE9 Installed

Mar 17, 2011

Having installed the IE9 update a couple of days ago, I'm left in the same boat that I found myself in when I tried the IE9 RC. Namely, documents printed via .Print() from a WebBrowser control in .NET no longer print correctly. What the user sees in screen is vastly different from what comes out of the printer. There will be missing characters and whitespace discrepencies virtually every time.

Here is an example:

The top is what inevitably comes out of the printer when the bottom is what the user sees on screen (outside of the pixelized part of the name & address--that was me).

If I uninstall IE9, the problem goes away.

View 20 Replies

Asp.net - Disabling Viewstate Of Whole Page

Dec 31, 2010

Is it possible to make the viewstate false of whole page including all controls at a time.I mean I don't want to set enableviewstate="false" for all controls..In the page directive of the aspx page I have made enableviewstate="false" but still viewstate of all the controls of the is enabled.. And what the EnableViewState="False"actually works within Page directive.

View 3 Replies

Asp.net - ViewState Persisted To Session When Using IE (but Not FF)?

Oct 27, 2009

I have a VB.Net web site and on my sign up page I am storing the ViewState in Session. I am using the following code to achieve this.[code].....

This has been working fine for months, then I started seeing the occasional 'System.NullReferenceException: Object reference not set to an instance of an object.'. The exception is raised when I try to get the value of the Text Property from the SelectedItem of a DropDownList, the problem being the DropDownList does not contain items after the page has posted back.The problem is only present when using IE (7 or 8 according to my logs, but I have only tested with 8), but not when using FireFox 3.5.Reverting to using the normal ViewState persistence mechanism caused the page to work in IE again.There are no ViewState related exceptions logged, it is like the page just 'thinks' it has no stored ViewState.

View 1 Replies

C# - Worth Compressing The ViewState?

Nov 16, 2010

I agree that the best way to shorten the ViewState is to disable it on the ASP.Net controls that don't need it. Keeping it small from the beginning is a great habit.I have also heard that it is already compressed (although can be true... there are ways of compressing it even more, has described in this Stack Overflow question).

My question here is not if it should be compressed... is: when should ViewState be compressed?If we have a ViewState of 410 characters it will weight 410 bytes in a page, while a ViewState of 13.843 characters equals 13.5 KB.

13.5KB is a considerable weight already. And if I compress a CSS file that height 10KB, I think it is also worthy compressing a ViewState of 13.5KB, even if that means a little extra "thinking" on the server.

But is 410 bytes of ViewState worth the extra processing on the server?At what point is it worth compressing?

View 2 Replies

Keep ASP.NET ViewState Without Being Passed Via QueryString?

Jul 19, 2011

I have a form with its method being "get" that passes the variables and their values to the query string, respectively. However, it also passes the viewstate variable in the query string. Now, I have a very long viewstate value on the given page, and if passed in the query string, the viewstate variable will cause the page to error out, due to "too long of a query string" which happens to also be too long of a url.

I cannot merely remove the viewstate variable - I need it. But I need to pass the viewstate variable along via some method other than get when the form is submitted, while the other inputs of the form (the non-hidden inputs) are appended to the query string.

View 1 Replies

Save Array In Viewstate?

Apr 28, 2010

I have Dim a(15) as integer i wont to save this array in Viewstate .

View 2 Replies

Viewstate Does Not Persist After Postback

Mar 21, 2012

I'm having some problems in persisting the viewstate on postback for a Control (vb.net)

here's some code i've put in my control[code]...

I'm setting EnableViewState = "true" everywhere i can, but still no result. Do i really need to set those properties here. (ViewStateMode and EnableViewState) If not, where should i handle this and what is the difference between those properties?

View 4 Replies

VS 2010 ViewState Is Not Declared?

Jan 31, 2012

How do I convert the following ASP code (vb.net) to win form (vb.net)? I get a n error on ViewState.

Protected Sub TextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles TextBox1.TextChanged, TextBox2.TextChanged
IsSaveRequired = True
End Sub

Protected Sub SaveButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SaveButton.Click
If IsSaveRequired Then save required.
End If
End Sub

[Code]...

View 2 Replies

FrmAddContract & FrmUpdateContract - VB Designer Code Become Corrupt Or Cause Funky Errors ?

May 18, 2010

I am working with Visual Studio Pro 2008, and trying to build a Visual Basic project for my College Course. The coursework is not my question, it's not difficult just time consuming. My problem appears to be much deeper, and is certainly causing me to take way more time than I should need to debug and completely random occurence. I don't mind posting the source code but it is rather vast, made up of 23 objects, each ranging from 200-700 lines. I am running Windows 7 Pro x64, and since I need Jet4.0 DB Engine or some such I had to set the compiler to target x86 CPUs. I have my suspicions, and as queried in my topic, I was wondering if VB Designer code can become corrupt or cause funky errors?

The layout I have is something like this:

frmMain

-frmCustomer

--frmAddCustomer

--frmUpdateCustomer

-frmContract

--frmAddContract

--frmUpdateContract

Each steps forward using the ShowDialog method. Initially I thought it was a fluke, but I had frmAddCustomer open and when I closed it (the code simply does me.close, nothing fancy), it jumped all the way back to frmMain, skipping frmCustomer. At first I was baffled, I spent some 45 minutes trying to figure out why. No errors or exceptions, so it didn't seem to be anything wrong really. Since I was building this project in stages I loaded the same form from a previous stage and copied/pasted the new code in. This seemed to fix it, but it happened again after coding for another 30 minutes to an hour. It also isn't limited to that form, I have now experienced the same issue with frmAddContract & frmUpdateContract.

View 6 Replies

IDE :: Unable To Retrieve Application Files. File Corrupt In Deployment?

Apr 15, 2009

i am getting "Unable to retrieive application files. File corrupt in deployment" on clickonece technology

Log:-
SOURCES
Deployment url : http://192.168.1.1/Employee/emp.application
Server : Microsoft-IIS/6.0
X-Powered-By : ASP.NET

[Code]...

View 1 Replies

VS 2008 Corrupt Access Table Causing A Concurrency Violation?

Oct 1, 2011

I have a single user app that I wrote and have been using for more than a year that uses an Access 2003 database. Today, out of the blue, I started getting a DB concurrency violation whenever I tried to update one particular table in the database. After trying to troubleshoot what the problem might be, I just deleted that table and recreated it and the problem went away.

View 2 Replies

Invalid Viewstate Information May Be Corrupted

Aug 16, 2011

I keep getting the following error message when I run my vb.net web app:The state information is invalid for this page and might be corrupted.After a good search, I came across this Microsoft page, which describes the problem exactly. The likely cause seems to be "scenario 2":[code]I appear to have prevented this error from happening by using EnableEventValidation="False" in the Page node of the markup as recommended here.

View 2 Replies

Asp.net - User Control ViewState/State?

Dec 7, 2009

I need help making this code work better. Currently, what happens is when it reloads, I loose the third value which is a calculated value . I would like for my page to reload without loosing the values for each property and each instance of the user control on the page.

[Code]...

View 3 Replies

Asp.net Dropdown Listbox Not Holding Viewstate

Aug 5, 2011

I am using VS 2008, VB and using a dorpdown listbox in my asp.net webpage. I select a value from the dropdown, click the submit button, when the page comes back from the server, the value in the dropdown is blank (default). The dropdown controls viewstate is enabled.

[Code]...

View 1 Replies

C# - Can't Hide The VIEWSTATE Hidden Field In ASP.NET

Jan 20, 2010

I have to hide the VIEWSTATE and EVENTVALIDATION hidden fields on my ASP.net page at RUN time.

I managed to remove the EVENTVALIDATION like so.............

<%@ Page enableEventValidation="false" EnableViewState="false" %>

But the VIEWSTATE is still there and I cant get rid of it and I need to. (hard to explain why)

View 5 Replies

Cannot Remove Viewstate Hidden Field?

Jul 2, 2010

I have a massive viewstate hidden field that is causing my application to be unworkable. I have tried:

EnableViewState="false" on every control
EnableViewState="false" in page directive
Page.EnableViewState = false in Page_Init

[code].....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved