ASP.NET mvc 2 app crashed on Windows 2008 R2 64 server - asp.net-mvc-2

I have built a asp.net mvc 2 app, using the .NET framework 4.
It runs OK on my windows 7 (64 bit) machine, but when deploying to the server it gives me the following error:
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
I suspect it has something to do with mixing 64 bit and 32 bit, but I have no clue whatsoever. This happens on different windows 2008 r2 servers, so it's not server (hardware) specific.
I did a BIN deployment of mvc 2 (copying system.web.dll, System.ComponentModel.DataAnnotations.dll, and system.web.routing to the BIN folder)
Update
The error occurs as soon as I try to access the database, a MS SQL 2008 server, via Linq-to-SQL.
Who can help me?

I found out why it crashed.
Most of the time a CLR.DLL error is caused by an infinite loop or something like that, just something really stupid.
In my case an unreachable SQL server (or rather: incorrect configured connection string) was causing the error. In my code, when reading or writing to the database failed the application tried write a log error to the same database. Which, of course, failed as well and caused an endless loop.
Yes, too stupid.

Related

Transient problems executing stored procedures on SQL Server 2008 R2

We are having an issue with SQL Server 2008 R2 64 responding to stored procedure call. About every 2 weeks or so, the database stops responding to stored procedures called from an ADO connection/Command set (4.0 framework). We have been working on this for several months now, with little improvement.
System changes:
We upgraded an existing vendor product from SQL Server 2005 to SQL Server 2008 R2 via their upgrade method. The database instance moved from a 32-bit Windows 2003 Server to 64-bit Windows 2008 Server.
The pattern of failure:
The application is run throughout the day, executed by different users via Citrix without issue. Every few weeks, the application stops responding around the same time frame. Once the database stops responding to the hosted instance of the application, any execution of the procedure from the application hangs (installed on CITRIX server, installed on varied physical systems, or debugging in VStudio 2010). After an hour of checking logs, server status, SQL Monitoring tools, tracing the repeated execution attempts, the server decides to respond to the application without intervention.
Strange thing is, when the server is not responding to ADO.Net calls, we execute the stored procedure from SQL Server Management Studio and receive results in 1 to 2 seconds. We are using the same login to access SQL Server Management Studio, and executing the stored procedure with the same parameters.
Looking at the connection string passed to the ADO connection, I don’t see anything unusual:
connectionString="Data Source=myserver\myinstance;Initial Catalog=databaseName;Persist Security Info=True;User ID=xxxxx;Password=yyyyy;Connect Timeout=45"
Tried so far:
Added extra 2gb of RAM to the OS: no change
Added extra tempdb file, expanded size of tempdb log file from 1 to 5gb: reduced the issue from weekly to every 2nd or 3rd week.
Installed SQL Server 2008 R2 SP3: no change.
The black cloud:
To me, the repeating time pattern of failure implies an issue at the database host (server or resource), but the DBAs do not see load or resource issue. If it were purely a host issue, why does it respond to SQL Server Management calls, and not ADO.NET calls?
The last occurrence lasted over two hours, and was resolved after rebooting the database server. Not a great fallback, but desperate times and all…..
Updating the ADO.NET connection to use named pipes has resolved the issue for our application. Prefixing the database name with "np:" has the connection using named pipes.
connectionString="Data Source=np:myserver\myinstance;Initial Catalog=databaseName;Persist Security Info=True;User ID=xxxxx;Password=yyyyy;Connect Timeout=45"
The issue returned on 5/14. This query timeout posting gave us hints how to force SQL Management Studio to behave like the ADO.NET connection and allowed us to recognize this is a "parameter sniffing" issue. We have applied changes to disable the parameter sniffing within the stored procedure.

Error attempting to install SQL Server 2008

when i try to run the setup.exe to start the installation, i get the following error in windows_xp:
Microsoft .NET Framework CAS Policy Manager has encountered a problem and needs to close.
this is what is in the error signature:
AppName: caspol.exe AppVer: 2.0.50727.3053 AppStamp:4889dd08
ModName: mscorwks.dll ModVer: 2.0.50727.3607 ModStamp:4add5446
fDebug: 0 Offset: 000d0494
i have tried completely removing and reinstalling all of my .net installations and it didn't resolve the issue. it's weird, because one time i tried to run setup i got two application events but subsequent tries did not produce more events.
the first event's id is 1023:
.NET Runtime version 2.0.50727.3607 - Fatal Execution Engine Error (7A09795E) (80131506)
It might be possible that the uninstallation did not remove all objects such as registry keys.
This may be of some use but I cannot verify its success rate having not used it myself.
http://www.justanswer.com/computer/5gtob-microsoft-net-framework-cas-policy-manager-encountered.html

ADO.net SQL Server commands failing on x86 Windows Server 2008

I am deploying project with developer-targeted setup using Inno Setup. I've wrote some code to make some actions that are a bit too custom for the original Inno Setup.
One of such actions was connecting to and running SQL files, thanks to StackOverflow users I've found some code for doing so. The problem is that whenever I try deploying the project on a new Windows Server 2008 machine (x86), I'm getting such cryptic error on every sql command apart from the first one:
"Not enough storage space is available to complete this operation ProgID: ADODB.Connection"
So. The first command fires and works, next stop with error. If I'd run the code again, some of the commands might work, but at some point, the installer would hung. The problem does not exists on windows XP I am writing it on.
I use the code linked above for every SQL command I run (new ole object ADODB.Connection, new command, execute... end) - I don't make the second query for results of insert (as it's there just for showing purpose).
Any thoughts what can be happening here or how can I make a workaround?

What can be the cause of Firebird server (1.5.6) Abnormal Termination

I have a server (Windows 7) machine running Firebird 1.5.6 database. It is accessed by a Delphi 7 application on the client machine running Windows 7 too.
The server is installed as SuperServer.
Very often, but on indefinite times,s the Firebird server process terminates abnormally causing the client application to freeze or to stop for 1 minute.
Does anybody has an idea what can be the cause of this situation?
Looking in the Firebird.log I can find errors like
Firebird Abnormal Termination (4294967295)
When this happens, the server tries to restart several times but 6-10 times in 1 minute and finally it succeeds but the client freezes or crashes.
The error log is very poor. I added BugcheckAbort = 1 in firebird config file to find out more. In meantime does anybody has an idea what is happening?
As far as I know Firebird 1.5 was never tested under Windows 7. You could try Firebird 2.1(.4) or 2.5(.1) to see if this solves your problem.

During Open(), SqlConnection.ServerVersion throws System.InvalidOperationException

When running a webservice, web page that knows how to respond. The service connects to a dbase. During the sqlconnection.open call, ASP .NET code throws the following exception:
sqlConnection.ServerVersion' threw an exception of type 'System.InvalidOperationException'
NOTE: I'm running this on my dev machine. When it runs on live web server, all is well. It is unique to my system.
I'm I missing a configuration setting with Sql Server 2008?
NOTE: recently upgraded from Sql Server 2005 to 2008
This could possibly be caused by a difference in your web.config between the live server and your dev machine. Have you checked that the connection string is properly specified?
Found problem. There was a space in the front of the connection string.