开发者

Any way to wrap code to detect App pool crashs IIS 7 MVC 3.0

I have an MVC 3.0 application that when deployed crashs the app pool every time a certain page is run.

This page is not doing anything different to any of the other pages, basically Grabs a database record and presents the information using a view.

I have not been able to figure out why it crashes causing the app pool to shut down and shutting down the entire site. I have install ELMAH log tracking and have wrapped a base controller but as the app pool crashes no logs get written to ELMAH

I have tried to catch all unmanaged exceptions using this method

http://support.microsoft.com/kb/911816 however the app pool still crashs and I am no closer to finding a solution.

None of the code is unmanaged so I am not sure why this is happening except for calls to the database that could be failing but see no errors in the database logs. I am using DynamicMethod to generate IL code to map to the database structure to my models but the same implementation works for every other model and the broken call works ok on my dev machine.

Question 1 If this IL generated code fails should the exception still be caught in the standard request error handling?

Event logs are cryptic and next to useless.

Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP      000007FEFA352648 (000007FEFA350000) with exit code 80131506.

DebugDiag for 64 bit windows only allows me to analyze dump files and I am unable to attach it to app pool or IIS process.

Application runs perfectly in Debug and release mode in VS2010.

Question 2 I am developing on 32 bit but deploying to 64 bit. Is there any scenario where something works fine in 32 bit but fails in a 64 bit environment?

Question 3 I am not sure what other log开发者_高级运维ging or approach I can do to find this problem. Is there any other logging or code I can wrap my request with to try and track the issue.

I am pretty sure it must be a crash in the Dynamic method code, so if anyone can answer Question1 then that will really help


Ok The problem was with the DynamicMethod generate IL code was failing.

If the field type and database type did not match up it crashed the entire app-pool

Any type mismatches should of been found on the development server however the The issue was a database type of int and field type of Decimal did not break on the 32 bit dev machines but broke on the 64 bit deploy server.

Generating IL Code to a dll and running PEVerify showed the problem.

Question 1. No,
Question 2. In this situation yes
Question 3. PEVerify, if you are generating IL code always run it through PEVerify.


The error you are getting is a fatal CLR crash.

1) No

2) You need to build for appropriate runtime.

3) Without sharing information on what you do in the code and what unmanaged resources you use, it is impossible to help any further.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜