5

I have created a service in .Net c# that basically send emails periodically.

The service works fine on my x32 XP machine but when i deploy the x64 build on an another 'x64' based Windows Server 2008 R2 machine, the service starts and just stops after few seconds and in event log it has this:

Fault bucket , type 0
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: sentEmailDraft.exe
P2: 4.2.0.0
P3: 538d3cf1
P4: mscorlib
P5: 2.0.0.0
P6: 4ca2b851
P7: 20f4
P8: d4
P9: System.TypeInitialization
P10: 

Attached files:

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_sentEmailDraft._87f56e55f14a51a946ed1a1f9f2a3a31cf693a17_1839149a

Analysis symbol: 
Rechecking for solution: 0
Report Id: b3695789-f45c-11e3-b6c6-005056be2c69
Report Status: 4

I found a similar discussion here and tried the solution but didnt work for me.

Can anyone please suggest something?

Maven
  • 14,587
  • 42
  • 113
  • 174
  • Was it running on a 64-bit version of Windows XP (Which I think was only for Itanium processors)? Sounds like you might have an issue with 32-bit vs 64-bit. – Tim Jun 15 '14 at 07:31
  • yes but i deployed the `x64` build on the `64` machine. – Maven Jun 15 '14 at 07:32
  • when you compile your solution do not target any specific platform chose AnyCPU instead of x64 .net framework it's capable of optimizing this at runtime – BRAHIM Kamel Jun 15 '14 at 07:33

1 Answers1

3

I had a problem similar to this once with the service starting and then quickly stopping afterward. The second computer only had the .NET Framework 4.0 Client Profile installed, while the application relied on features/assemblies that were only present in the full .NET Framework 4.0. Might be worth checking since the full .NET Framework 4.0 is the default when you create a new project.

Lucas
  • 86
  • 1