File.Exists

Discussion in 'ASP .Net Web Services' started by Meelis Lilbok, Oct 13, 2006.

  1. Hi

    I have problme with my webservice(VB.Net 2.0)

    If i use File.Exists() it always returns false.
    File is 100% there, all permissions are set, but i get False

    Any Ideas?


    Meelis
     
    Meelis Lilbok, Oct 13, 2006
    #1
    1. Advertising

  2. Meelis Lilbok

    Tim_Mac Guest

    hi meelis,
    are you absolutely sure of the identity that is running your code, and that
    it has read permissions on the file?

    if the path is correct and the file does exist, then as an experiment you
    could try to open a stream to the file using the FileMode.CreateNew, this
    should throw an IOException if the file is already there.

    FileStream f = new FileStream(path, FileMode.CreateNew...

    this would at least serve as a double check as to the existence of the file
    and adequate permissions. if you get a different exception when opening the
    stream, post it here.

    hope this helps
    tim

    "Meelis Lilbok" <> wrote in message
    news:%...
    > Hi
    >
    > I have problme with my webservice(VB.Net 2.0)
    >
    > If i use File.Exists() it always returns false.
    > File is 100% there, all permissions are set, but i get False
    >
    > Any Ideas?
    >
    >
    > Meelis
    >
     
    Tim_Mac, Oct 13, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chad Crowder
    Replies:
    7
    Views:
    21,556
    hemant.yadav
    Oct 24, 2009
  2. Totan
    Replies:
    0
    Views:
    966
    Totan
    Apr 17, 2006
  3. Max
    Replies:
    4
    Views:
    10,935
    Kevin Spencer
    Aug 11, 2006
  4. Ulf Meinhardt
    Replies:
    8
    Views:
    6,159
  5. Help Needed
    Replies:
    1
    Views:
    272
    Jason M. Murray
    Sep 19, 2003
Loading...

Share This Page