• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Network install problem (.NET program)

xoggoth

More fingers than teeth
Joined
Jul 8, 2005
Messages
17,132
Likes received
4,950
Thanks received
1,184
Location
xoggoth towers
A school is having a problem running one of our programs in VB.net. It's Windows 7 on an RM network.

Teachers can run it ok with an admin login but not pupils. It reports access denied on the folder used for temporary files although the path (C:\ProgramData\companyname\program\version) is the correct one for windows 7 and obtained using standard code. He says he's done all the standard things to set permissions.

An oddity is that the error message also lists an application path that I would expect to see on another of our programs. The programs contains no references whatever to each other and the application path is read in standard way from the AppPath variable. Anyone have any idea why .NET AppPath should contain a wrong value?

I suspect some network problem and the app path begins with \\BMS-SR-001\RMPublic\ (whatever that is!). Trouble is I know nowt about networks.

Cheers
 
Network install problem (.NET program)

\\server\directorypath

Check if its pingable
 
\\server\directorypath

Check if its pingable

to be clear
ping BMS-SR-001 otherwise open windows explorer and type \\BMS-SR-001\RMPublic\ into the address bar.
 
I think RMPublic share isn't writeable by students from memory. Staff can, students cannot. So no good for temporary files.
Don't forget each user should be saving their own temp files to their profile or home drive, depending on how the app works - ie does it need to convert temp files into the real thing later. They shoud not all be writing temp files to the same directory - as they will overwrite each other and cause all sorts of chaos.
 
Don't forget each user should be saving their own temp files to their profile or home drive, depending on how the app works - ie does it need to convert temp files into the real thing later. They shoud not all be writing temp files to the same directory - as they will overwrite each other and cause all sorts of chaos.

WHS. ProgramData isn't the right place for temporary files, it's for system wide application data that needs to be changed at runtime. You can see why that would get locked down for unprivileged users.

I'm guessing the RMPublic path is where the program is running from.
 
Yeah should use

Environment.GetEnvironmentVariable("temp");
or
System.IO.Path.GetTempPath();

To obtain the proper temporary path for the current user.
 
Ta for answers. I was being a bit lazy saying temp files, actually the only file stored is the user settings file.
 
Has the program has been installed on a network drive? If so you may want to look at code access security in .NET. When a .NET program is run from a network path it runs with far lower security permissions than when it is installed on a local drive (by default). This can give access denied errors.
 

Advertisers

Back
Top