IE8 throwing errors

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

IE8 throwing errors

Post by Brewhaus » Sat Apr 11, 2009 9:51 am

We have had a couple of customers mention that they are unable to access our website- they are getting an error. We were unable to reproduce the problem, so spent some time with one of the customers and have isolated the issue and pulled the actual error (with custom errors off in the web.config file). It seems that only IE8 is a problem, as we have tested with IE6, IE7, and Mozilla/Firefox. The customer found that on IE8 he got an error, but Firefox and Ubutu both work.

We are going to set one of our computers up with IE8 to see if we have the same problem.

In any event, the error is below. Can anyone help us troubleshoot this, as we need to have our sites functioning with all browsers.

Server Error in '/' Application.
--------------------------------------------------------------------------------

String or binary data would be truncated.
The statement has been terminated.
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.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.

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:


[SqlException (0x80131904): String or binary data would be truncated.
The statement has been terminated.]
System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection) +925466
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +800118
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlDataReader.ConsumeMetaDat a() +31
System.Data.SqlClient.SqlDataReader.get_MetaData() +62
System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
System.Data.SqlClient.SqlCommand.ExecuteScalar() +137
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.DoExecuteScalar(DbCommand command) +132
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.ExecuteScalar(DbCommand command) +140
CommerceBuilder.Reporting.PageView.Save() +1180
CommerceBuilder.Services.AbleCommerceHttpModule.a( Object A_0, EventArgs A_1) +4839
System.Web.SyncEventExecutionStep.System.Web.HttpA pplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +64
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: IE8 throwing errors

Post by afm » Sat Apr 11, 2009 11:52 am

My guess is the user-agent string in IE8 is too long for the field in the database.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: IE8 throwing errors

Post by Brewhaus » Sat Apr 11, 2009 11:59 am

I am a bit lost now, as I put IE8 onto one of our computers, and can access the AC sites without any problems.

Does anyone have any ideas based on the error, as it no longer appears to be specifically an IE8 issue.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: IE8 throwing errors

Post by afm » Sat Apr 11, 2009 12:18 pm

It still might be the user-agent string. IE8 includes every version of .NET that is installed on the computer. For example on my computer the IE8 user-agent string is this:

Code: Select all

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.590; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
But on yours is might be this if you only have .NET 2.0 installed:

Code: Select all

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: IE8 throwing errors

Post by AbleMods » Sat Apr 11, 2009 12:31 pm

afm wrote:My guess is the user-agent string in IE8 is too long for the field in the database.
Yeah was a known issue in RC3 and fixed in 7.0 final wasn't it?

I think you can manually fix it by just enlarging the size of the field in the table - if I recall, someone made a post about it some time ago.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: IE8 throwing errors

Post by Brewhaus » Sat Apr 11, 2009 1:40 pm

AFM- given that your string is likely so much longer than mine, would you mind hitting one of our sites (preferably http://www.brewhaus.com) and let me know if we throw an error. That would pretty much nail down the problem.

Now, we were going to try to get the upgrade to 7.0.2 handled this weekend (time permitting), which I assume would resolve the problem, should the length of the string be the cause. Am I correct?

Oh, and we are running 7.0 final, so if this is the problem, then it must not have been handled in 7.0 final. So, how would I go about enlarging the size of the field? which field / table am I looking for?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: IE8 throwing errors

Post by afm » Sat Apr 11, 2009 3:15 pm

I do not see any errors when I visit http://www.brewhaus.com.

IIRC 7.0 final had the fix Joe mentioned.

Without the code, it is hard to know which table is causing the problem, but since the stack shows the error is occurring in CommerceBuilder.Reporting.PageView.Save(), I'll bet it is the ac_PageViews table, and one of the nvarchar fields: UrlStem, UrlQuery, UserAgent, Referrer, Browser, BrowserName, BrowserPlatform, or BrowserVersion.

Since it seems to be related to IE8, I would narrow down the list to UserAgent, and the 4 Browser* fields.

I would increase UserAgent first and then see if the error goes away. If not, then try BrowserPlatform and BrowserVersion. They are both rather small (40 characters).
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: IE8 throwing errors

Post by Brewhaus » Sat Apr 11, 2009 3:52 pm

I have checked the ac_PageViews table. The length of each is listed below. What specifically is this, as the PageViewID shows a length of 4, but the actual ID's are 7 characters long?

PageViewID- 4
StoreID- 4
ActivityDate- 8
RemoteIP- 15
RequestMethod- 4
UserID- 4
UrlStem- 255
UrlQuery- 255
TimeTaken- 4
UserAgent- 255
Referrer- 255
CatalogNodeID- 4
CatalogNoteTypeID- 2
Browser- 150
BrowserName- 100
BrowserPlatform- 40
BrowserVersion- 40
AffiliateID- 4

Just thinking out loud, but is there any chance that it could have to do with cookies for customers under an affiliate from our old site? I just happened to think of this when I saw the AffiliateID field. We had a couple of affiliates under the old system, and there will be customers with a cookie that still relates to the affiliate referral.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: IE8 throwing errors

Post by afm » Sat Apr 11, 2009 4:30 pm

All the fields with length 4 store INTEGER values. ActivityDate is a DATETIME field. None of those would cause the "truncated" error message.

The rest are character fields and any of them could cause the error, but I think it is likely the UserAgent or Browser* fields.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: IE8 throwing errors

Post by Brewhaus » Sat Apr 11, 2009 4:37 pm

The UserAgent field is already at 255, which I assume will be the maximum. Do you have a suggestion for the value on the Browser fields?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: IE8 throwing errors

Post by afm » Sat Apr 11, 2009 11:17 pm

You're thinking about this too much. Just change one and see if the problem goes away. If not, then change another until it does.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: IE8 throwing errors

Post by Brewhaus » Sun Apr 12, 2009 7:49 am

I will change them and see. The reason that I am trying to nail down the solution as much as possible is to avoid hassling a customer. We are unable to reproduce the error, so I need to rely on someone who is consistently getting the error so that I know whether or not the changes have helped.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: IE8 throwing errors

Post by afm » Sun Apr 12, 2009 9:52 am

If you have access to the server logs, then you can find several details about the request that caused the problem. The log may have the user-agent. Then you can use a tool like Fiddler to recreate the request on demand.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: IE8 throwing errors

Post by Brewhaus » Sun Apr 12, 2009 10:10 am

I have checked our error logs, and we have a tremendous number of pages with the following two errors. I don't know if this is related, but given the type of error and our discussion in this thread, I thought that there may be a connection.

4/12/2009 4:04:32 AM Error Error decrypting data Length of the data to decrypt is invalid
4/12/2009 4:04:31 AM Error Error decrypting data Invalid length for a Base-64 char array

Do you think that there is a connection?

STRIKE THAT- I searched and found that this appears to be brought on by McAfee, and started after we entered an encryption key. Unfortunately, we have tens of thousands of this error, so I am not sure how to delete them. I will ask that on the appropriate thread.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: IE8 throwing errors

Post by afm » Sun Apr 12, 2009 12:29 pm

I meant the web server logs. They have entries like this:

Code: Select all

#Fields: date time c-ip cs-username s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status sc-bytes cs-bytes cs(User-Agent) cs(Cookie) cs(Referer) 
2009-04-10 17:10:06 127.0.0.1 - 127.0.0.1 80 GET /sample.aspx - 200 3203 2367 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.590;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.5.21022;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729) cookie=sample http://172.16.0.100/default.aspx
In your case, it may have status code 500 or similar.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: IE8 throwing errors

Post by Brewhaus » Sun Apr 12, 2009 1:18 pm

I figured that is what you were referring to, but I am afraid that this starts getting a bit beyond me. I know where the log are (I assume that we are looking in the Application logs), but not knowing exactly when an error occurs it could be like the needle in a haystack.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: IE8 throwing errors

Post by Logan Rhodehamel » Mon Apr 13, 2009 9:49 am

The problem is the UserAgent string. Your quickest fix is to increase the maximum length to 500. No, 255 is not the maximum in SQL server. Those field sizes are legacy from the days of MS Access support.

This is a knonw issue that we have fixed properly. I could swear the fix is in the 7.0.2 release. If you are still on an older release, updating the UserAgent string will work. The issue is not simple to reproduce. It's not just IE8... the problem could happen on any browser if the string got long enough.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: IE8 throwing errors

Post by Logan Rhodehamel » Mon Apr 13, 2009 9:52 am

Brewhaus wrote:4/12/2009 4:04:32 AM Error Error decrypting data Length of the data to decrypt is invalid
4/12/2009 4:04:31 AM Error Error decrypting data Invalid length for a Base-64 char array
This is another unrelated problem. Automated scan tools throw bad data into form fields to see what will happen. We are logging this error, but it's actually a false positive of something going wrong. It was also fixed for the 7.0.2 release. (bug 7403)
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

Brewhaus
Vice Admiral (VADM)
Vice Admiral (VADM)
Posts: 878
Joined: Sat Jan 19, 2008 4:30 pm

Re: IE8 throwing errors

Post by Brewhaus » Mon Apr 13, 2009 10:22 am

I will be upgrading to 7.0.2 in the next couple of days, but will take the quick fix for now. Do I simply select 'Design Table' for ac_PageViews, and when it wants to save the three tables, click 'Yes'? I just don't want to mess with tables any more than I have to.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: IE8 throwing errors

Post by Logan Rhodehamel » Mon Apr 13, 2009 10:42 am

Brewhaus wrote:I will be upgrading to 7.0.2 in the next couple of days, but will take the quick fix for now. Do I simply select 'Design Table' for ac_PageViews, and when it wants to save the three tables, click 'Yes'? I just don't want to mess with tables any more than I have to.
Yes. The other two tables should not modified... this warning is shown because there are key relationships between the StoreId and the UserId fields. You are not modifying these fields and the UserAgent field has no impact on the other two tables.

Extend the length to 500 and it should insulate you from the error until you can complete the upgrade.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: IE8 throwing errors

Post by jmestep » Mon Apr 13, 2009 11:01 am

Logan, the fields are still 255 in two databases I have for 7.0.2.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: IE8 throwing errors

Post by Logan Rhodehamel » Mon Apr 13, 2009 11:13 am

jmestep wrote:Logan, the fields are still 255 in two databases I have for 7.0.2.
Yes. We corrected the error by enforcing the appropriate limit via the code. Extending the database length is only a workaround.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Re: IE8 throwing errors

Post by Jaz » Thu May 14, 2009 1:34 am

I just had a customer get the error with IE 7, so it is not an IE 8 Problem only.

Server Error in '/' Application.
________________________________________
String or binary data would be truncated.
The statement has been terminated.
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.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.

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:

[SqlException (0x80131904): String or binary data would be truncated.
The statement has been terminated.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1950890
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846875
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
System.Data.SqlClient.SqlDataReader.get_MetaData() +83
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
System.Data.SqlClient.SqlCommand.ExecuteScalar() +139
Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteScalar(DbCommand command) +179
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteScalar(DbCommand command) +69
CommerceBuilder.Reporting.PageView.Save() +1386
CommerceBuilder.Services.AbleCommerceHttpModule.a(Object A_0, EventArgs A_1) +5110
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: IE8 throwing errors

Post by Mike718NY » Wed Sep 09, 2009 9:25 am

I changed the field and it fixed the problem.
But if you are using SQL Server 2008, it gives this annoying message when
you try to save the change in the Designer:

"Saving Changes in not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table to be re-created."

You can get rid of that message by doing this:
Menu >> Tools >> Options >> Designers >>
Uncheck “Prevent Saving changes that require table re-creation

But some people (and Microsoft) say you shouldn't uncheck it.
I wasn't sure what to do so I just ran this script instead:

ALTER TABLE ac_PageViews
ALTER COLUMN UserAgent nvarchar(500)

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: IE8 throwing errors

Post by Logan Rhodehamel » Wed Sep 09, 2009 11:22 am

This was resolved in the AC code quite some time ago - for 7.0.1 I believe.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

Post Reply