Sign in to follow this  
devronious

[.net] Problem accessing deployed files during runtime...

Recommended Posts

OK, so I created an application. I created a deployment application for it. I created files and deployed them in the application directory. My customers are all getting System.IO.FileNotFound exceptions. The files are in the directory and the path of the FileInfo object appear to be correct, but opening is causing errors. I can't seem to reproduce them on any of the three machines that I have here. I'm stumped. Here's the loading logic: this.applicationPath = Application.StartupPath; if (System.IO.File.Exists(this.applicationPath + \\MyFile.txt)) { "Open File and Do Stuff"... "do stuff".. }

Share this post


Link to post
Share on other sites
When you say "deployment application", do you mean a ClickOnce setup? If so, what's the security settings for it and where was it deployed from? Just because the file exists doesn't mean it can be accessed depending on where it resides, the security settings of the app and the CAS on the machine.

Share this post


Link to post
Share on other sites
You make complete and utter sense!!! From the user's problems, this sounds like exactly what the problem is.

In the Visual Studio 2005 Add New Project menu it is under "Other Project Types->Setup Project"

I'm not sure how to set permission or security.

Thanks,

Devin

Share this post


Link to post
Share on other sites
Any help on how to handle this sort of thing would be super!!!

[edit] When I say "any" I really mean "any" help would be super!!!

[Edited by - devronious on May 15, 2007 8:15:51 AM]

Share this post


Link to post
Share on other sites
For that project type I don't believe there's a way to handle security on the client machine. There's plenty of info out there on using ClickOnce setups where security is setup on the client machine. Here's one.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this