Accessing a remote file over the network

Discussion in 'ASP .Net' started by Gopi, Jul 8, 2005.

  1. Gopi

    Gopi Guest

    Hi all,
    I need to find the size of a file which is located on a remote unix box.I
    have been given Samba mount acces for the shared folder through which i can
    access the file. I am using Fileinfo object to find the attributes of the
    file.When i use the Fileinfo object from a console application everything
    seems to be working fine,but when i use it from a web application it throws
    a
    "FILE NOT FOUND" exception. Does anybody have any clue what's going wrong
    here?

    Thanks in advance
    Gopalkrishna
    Gopi, Jul 8, 2005
    #1
    1. Advertising

  2. The folder needs to have web access permissons.
    --
    Staff Consultant II
    Enterprise Web Services
    Cardinal Solutions Group

    Future Business Model
    Loan Origination Services
    National City Mortgage


    "Gopi" wrote:

    > Hi all,
    > I need to find the size of a file which is located on a remote unix box.I
    > have been given Samba mount acces for the shared folder through which i can
    > access the file. I am using Fileinfo object to find the attributes of the
    > file.When i use the Fileinfo object from a console application everything
    > seems to be working fine,but when i use it from a web application it throws
    > a
    > "FILE NOT FOUND" exception. Does anybody have any clue what's going wrong
    > here?
    >
    > Thanks in advance
    > Gopalkrishna
    >
    >
    >
    =?Utf-8?B?TWljaGFlbCBCYWx0aWM=?=, Jul 8, 2005
    #2
    1. Advertising

  3. Gopi

    Shawn Guest

    The web app runs by default under the ASPNET account, but a win app runs
    under the current logged on user's account. The ASPNET account doesn't have
    rights to access the file, thats why you get the FILE NOT FOUND error. You
    have to impersonate another user to get to the file. Check out this link:
    http://msdn.microsoft.com/library/d...ipalwindowsimpersonationcontextclasstopic.asp

    Shawn



    "Gopi" <> wrote in message
    news:...
    > Hi all,
    > I need to find the size of a file which is located on a remote unix box.I
    > have been given Samba mount acces for the shared folder through which i

    can
    > access the file. I am using Fileinfo object to find the attributes of the
    > file.When i use the Fileinfo object from a console application everything
    > seems to be working fine,but when i use it from a web application it

    throws
    > a
    > "FILE NOT FOUND" exception. Does anybody have any clue what's going wrong
    > here?
    >
    > Thanks in advance
    > Gopalkrishna
    >
    >
    Shawn, Jul 8, 2005
    #3
    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. Jane Davis

    Network Service account over network

    Jane Davis, Jun 22, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    445
    Kevin Spencer
    Jun 22, 2005
  2. Replies:
    1
    Views:
    10,462
    Shawn
    Oct 17, 2005
  3. Replies:
    7
    Views:
    6,707
    Alex Molochnikov
    Feb 23, 2005
  4. dylpkls91
    Replies:
    16
    Views:
    607
    dylpkls91
    Jul 19, 2006
  5. Gopi

    Accessing a remote file over the network

    Gopi, Jul 8, 2005, in forum: ASP .Net Security
    Replies:
    1
    Views:
    136
    Paul Clement
    Jul 11, 2005
Loading...

Share This Page