"Arithmetic operation resulted in an overflow." getting this error in ASP.Net after converting to the Azure project

3.5k views Asked by At

I am working on an asp.net application. Now I am working on to move it to windows azure server. After converting the project to the windows azure project it gets started to give me errors in accessing the database. I am able to access the data but the problem occurs where-ever I am selecting longblob type column and bit columns.

When running the application as normal asp.net application everything works perfectly but when I run it as the azure application from my visual studio, it starts to give "Arithmetic operation resulted in an overflow." when filling the data-table. After doing some research for this I found that this type of error occurs in when there are some special type of columns are selected in the select command. In my case the special data types are "longblob" and bit[1] in the mySQL database table.

Please suggest a solution to make this work in windows azure environment too.

5

There are 5 answers

3
Ben B On

I am having the same issue today as of last night. The application has not been updated in weeks. Everything I have read indicates it has something to do with using an int32 and the int being too large but the page the application is crashing on is not using an int in the code behind. I disabled all SQL on the page and it still crashes. I think this is something on the Azure side. Putting in a ticket with them. I'll keep you updated.

0
Ben B On

Here is what fixed it for me.

My Azure Web App was using the Azure Hybrid Connection to access my on-site SQL server. The server running the HCM also runs Azure Backup. One of my admins had updated the Azure Recovery Agent on that server.

After trying all sorts of things, uninstalling the most recent update to the Azure Recovery Services Agent is what resolved the issue. My Web App was able to access my on-site dbs without issue.

0
Gerard E On

If you're running into issues with Azure Hybrid Connections, try uninstalling KB3142036 from the server which runs the Hybrid Connection Manager. Seems to have solved the SQL Server connection issues for me.

1
Paul M On

I had the same error when using an Azure hybrid connection with an onsite SQL Server. I did not have the Azure backup agent installed on the local server, however I did have Windows Server 2012 set to automatically update and there were a lot of updates which were pushed out on May 10 2016.

At this stage, I'm not sure which update specifically caused the problem, but I have narrowed it down to either 3146978, 3146751, 3146604, 3145384, 3144850, 3142026, 3135998, 3134179, 3125424, 3103616 or 3145432.

0
Atanu Sarkar On

This is a known issue for Hybrid Connection to access SQL server.

Please follow the temporary fix mentioned here https://blogs.msdn.microsoft.com/waws/2016/05/17/hybrid-connection-error-with-sql-server-system-overflowexception-arithmetic-operation-resulted-in-an-overflow/