Access violation .Net c# in the client's machine - Crystal Reports - c#

I have developed a C# .Net (4.0) application (using Crystal Reports) in computer 1, when i copy this application's executable to computer 2 (.Net framework 4.0 well installed) this application won't start.
i've checked the task manager : my application's memory use was increasing to attempt 2048 ko and then it stopped immediately, 2 seconds later, the process get killed .
i've used OllyDBG in computer 2 to debug/check the problem, i've get an "access violation" while starting the application
i faced some exceptions, skipped them, and finally access violation to stop all the iterations in the ollyDBG
(even if i made a blank form in computer 1, and copied the executable to computer 2, it works well)
After testing this application in computer 3 (.Net 4.0 well installed) a window has appeared : applicationxxx has stopped working .
i don't think that i've to install VS in the client's machine to run this app
Please is there any way to track the bug ?
thanx a lot

installing CRRedist2005_x86.msi in the client's machine will solve the problem,
in fact without this framework, i've got "the application has stopped working" without any indication to any missing assembly

Related

Third party Exe not running on windows server 2008 R2 from asp.net but running fine manually

Event 1026 error Event 1000 Error I have a third party exe which I am trying to run from my asp.net application.It is running fine in my local machine but not on windows server 2008 R2. It is throwing 3 errors every time I tried running from the application with event ids 1000,1022 and 1026.It is running fine when I run manually.I am getting two .Net runtime errors and one Application Error. The errors are not pointing to any specific line or code. My exe is not even initiated to run.
I get some vague "Faulting Module Name : C:/windows/sysWOW64/kernelbase.dll" error.
My application consists of classic asp pages too. .Net application was pointing to framework 3.5. As this third party exe points to 4.0, I upgraded my existing application to 4.7.1.
I created another independent web application pointing to 4.7.1 and it is able to run the said exe without any issues on the same server.But, my existing application is throwing error.
Please help me in fixing this issue.

c# invalid win32 application

Okay so I've read about, tried fair few solutions but still haven't managed to resolve this problem.
My application when testing on a 32bit machine (I've only tested on 1) instantly crashes on startup with invalid 32 application and no other error messages or information for guidance.
The application is a c# .NET 4.5.2; built in visual studio 2017. I've set it to X86 in the build configuration and the application runs on my 64bit development machine.
For test purposes I made a 32bit windows 7 virtual machine, built the solution and copied everything in the output bin folder to this virtual 32bit windows 7 machine. It runs fine, as expected. However, if I copy that exact folder to the physical 32bit machine, it crashes saying invalid 32bit application.
I even put a condition in to check the IntPtr.Size is 4, to assure my application is running in 32bit.
That made me think maybe a resource is built in 64bit, but if thats the case why would it run in the 32bit virtual environment. O.o
I'm going to try and find another physical 32 bit machine to test on.
Any guidance on how I can troubleshoot, or retrieve more information on the error would be great.
The physical machine has dot net 4.5.2 installed and 99.99% sure vcredist_x86 is also installed.
Not sure why my question has been negative points... But this has now been resolved.
The problem was that Team-viewer was corrupting the files somehow while transferring them. I tried to transfer the files zipped and noticed that the zip was strangely small and not opening. So I went into the office and did the swap by USB and BAM. Working. Annoying or what.

WPF Application designed in VS 2012 won't run on Windows 7 machine

I've designed a WPF C# application using Visual Studio 2012. The application, which is simple enough, runs fine on my Windows 8 machine using the ClickOnce deployment method. The datagrid displays the content from a SQL Server database and performs all of it's other functions just as I've designed it to, but when I attempt to install it on a Windows 7 machine it immediately crashes and I'm not sure why. The Windows 7 computer I'm trying to install the application on has .NET 4.5 running on it, but is there anything else that computer needs to have installed on it in order to run applications developed with VS 2012. This is my first attempt to install an application developed with VS 2012 on a Windows 7 machine, so I'm not sure if there's another step that I'm missing here. Any help you guys can provide would be greatly appreciated. Thank you.
The message you stated "The application has stopped working and that if Microsoft has a solution..." is an indicator of one of the following:
The Framework is disabled; though 4.5 is installed several root instances are built on the foundation which are apart of Framework 2.0. This particular Framework can cause issues for 3.0, 3.5, 4.0, and even 4.5.
The System.EnterpriseServices.dll is damaged in the Framework. Which needs to be connected back to the Global Assembly Cache (GAC).
And another common issue is the machine.config file log in the Framework Folder can be corrupt and needs to be replaced with a valid one.
There are others that can occur within the System Policy Folder as well, which may require you to use the .Net Cleanup Tool and reinstall the Framework. But before you do any troubleshooting you should go to the Event Viewer and get details of what is going on.
Try these steps first for me:
Windows Key + R
When the run prompt appears type: appwiz.cpl
Go to the left hand side: Turn Windows Features On or Off
Turn Framework 3.5 on if it isn't already; if it is already on go to Step 5.
Turn off the Framework; then reboot.
Once rebooted follow steps 1-4 again.
Now at this point I would suggest trying the application again. If it fails try this:
Open Start
Type 'cmd' in Search
Right Click and Run as an Administrator
Type %windir%\Microsoft.Net\Framework\v2.0.50727\ngen.exe update
Then type: sfc /scannow
The Native Regeneration tool will try to repair the Framework back to a factory state; the System-File-Checker will attempt to fix any errors indicated in Windows. If it can't it will say 'it found integrity violations'.
Those are the steps I would do for general support; but you really should try and locate an error message. As the Framework can become a huge ordeal to cleanup and fix. If you provide more information I will revise my response to help address it.
Hopefully that helps.

WPF Error on Non-Development PC - XamlParse

I have an error very similar to the one addressed in this question. I am trying to deploy a small c#/Xaml utility on 6 work machines. 4 of the machines run the utility successfully and 2 do not. All machines are windows XP and have .Net frameworks 1-4 installed (my app is compiled against 4.0 and all machines have both client and extended redistributables installed).
On running the utility, I get the standard "... has encountered a problem and needs to close." On viewing the error report contents, the problem seems to occur in System.Windows.Markup.XamlParse.
I have run .Net 4.0 online installer in "repair" mode and still I get the same problem. I have tried all the suggestions from the post linked above:
The file is deployed alongside a DLL which is present and correct.
UI cultures are identical.
All computers are up to date from Microsoft Update.
The assembly does not contain any external resources which are referenced in XAML.
I don't really know where to start with debugging this one. Any suggestions?
I would suggest setting up remote debugging on the machines that are having the problem and then adding this to the startup code:
while (!System.Diagnostics.Debugger.IsAttached)
{
Thread.Sleep(100);
}

my dotnet application doesn't run on windows server 2003

I've written a server programm lets call it progie , this progie working just like a clock on my windows 7 (my ms VS is installed on windows 7) after compiling the progie and transfer it to windows server 2003 I tried to run the progie but no chance.
here is the symptom :
when i was trying to run the progie I was also monitoring the task manager , in task manager it shows the progie for only couple of seconds and then the poor program vanishes from the task manager or its better to say from the memory.
I'm using .net 3.5 / C#
libraries : generics , diagnostic , IO
installed frameworks on my server :
dotnetfx 2.0
dotnetfx 3.0
dotnetfx 3.5
windows server 2003
Note that your progie runs fine on Windows 7 with VS installed and fails on the server. Possible causes can be,
progie depends on third party libraries, which you did not yet install on the server. Things like DevExpress libraries and so on will lead to such problems. The fix is to deploy the dependencies along with your executable.
Your code raises unhandled exception on server 2003. If so, you should be able to find crash records for progie in Application event log. The fix is to capture crash dump and analyze it. http://dumpanalysis.org
Since it doesn't even crash, just vanishes, it sounds to me like a .Net FW mismatch (i.e. you're missing the right version) or another missing resource. Easiest way to get a hold of this: download SysInternals' ProcMon, and monitor which files/DLLs progie tries to open and fails. That should put you on the right track.

Categories

Resources