tags:

views:

24

answers:

1

Hi there, I have a small program that opens a file on a server share accross a local network. This app is deployed to client machines in various sites. The infacstructure across these sites varies quite a bit and is quite shakey. We have succesfully deployed this app to a few sites with no problems. However our latest deploy the local share is on Small Business Sever 2003 (instead of windows server 2003). We're getting an UnauthorizedAccessException when the the code tries to open a file on the server. Looking at the File.Open documentation:

I can see that this exception might be thrown because "This operation is not supported on the current platform."

Has anyone had any similar problems with small business server 2003?

I know it may seem like I'm jumping to conclusions, but this is extremley difficult to test remotely because of infastructure problems. I'm really just trying to rule stuff out.

Thanks in advance!

A: 

There are two layers of access you require:

  • The Share: Do you have the correct access to the share.
  • The directory / files: Do you have access to the files

Is the SBS in the same domain as the client?

Try connecting to the SBS before you run the progam.

Shiraz Bhaiji
Thanks for answering, fixed the problem by using a longer constructor for file stream, had to specify FileMode and FileAccess enums (also specified fileShare i think aswell).
bplus