WinForms application not working

JetmansDad

New member
Joined
Jan 12, 2022
Messages
3
Programming Experience
5-10
Hi there,

I have thrown together a simple WinForms application using an Access database for data storage, and the progam seems to work well. However, if I try to run it on any machine other than one essentially identical to the one I wrote it on, it just doesn't work ... no crash, no exceptions thrown, just hit the icon, the wheel spins for a second or two and then nothing.

I have tried to run the program elsewhere by simply copying the files from the Release folder, and that works on any PC attached to the same network as the machine I wrote it one but nowhere else, and by creating an installer from VS2019 but both fail to run in exactly the same way on other machines. Can't try out the installation on the network PCs as I don't have administrative privileges.

The installed .NET framework versions are the same on all the machines I have tried to run it on.

It is frustrating ... this doesn't feel like something that should be this difficult!

Any help anyone can suggest would be most welcome.

Thanks,
David
 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
4,643
Location
Sydney, Australia
Programming Experience
10+
no exceptions thrown
Are you absolutely sure about that? Are you handling the UnhandledException event of the application and logging anything it catches?

Does the application do anything before the main form is displayed that might account for this, e.g. attempt to connect to a database that may not exist?
 

JetmansDad

New member
Joined
Jan 12, 2022
Messages
3
Programming Experience
5-10
First ... thanks to whoever moved this to the correct forum. New here, so still finding my way around.

I thought I had but will go back and check.

D
 

JetmansDad

New member
Joined
Jan 12, 2022
Messages
3
Programming Experience
5-10
It appears to be set up to catch exceptions wherever they might happen, but I haven't got it logging. Need to look at that.

What is interesting to me is that the files are all stored in OneDrive, and I can go to the Release folder on any of the school PCs that I use and it works perfectly by clicking on the application icon in my synchronised OD folder. If I go to the exact same synchronised folder at home, it doesn't work at all (the application and .accdb file are both stored in that same folder and the application is definitely using that copy of the database). It also doesn't work by sharing the files with someone else.

I am clearly missing something, just not sure what I should be looking at.

D
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
5,698
Location
Chesapeake, VA
Programming Experience
10+
I have tried to run the program elsewhere by simply copying the files from the Release folder, and that works on [any PC attached to the same network as the machine I wrote it one
Or perhaps there is a network resource that you are trying to access that is not accessible from the other machines?
 
Top Bottom