"Invalid Function" reading files on Win2003 Server from IIS

Discussion in 'ASP General' started by mtanq, Sep 29, 2006.

  1. mtanq

    mtanq Guest

    My project is an ASP-based web page, with C# as the language of choice.

    I have written a simple tree view that displays the structure of a file
    system mounted as 'MVFS' (On my system, it's W:/). This is a clearcase file
    system that is version-aware.

    The code populates the tree as folders and files very much like Explorer and
    when a user clicks on a node that refers to a file, it will send the file to
    the user to open or save as any normal web page would do.

    This all works fine on my local XP workstation. However, the problem I have
    run into is when I copy the web project onto a Windows 2003 Server. I can
    load the web page and the tree populates with no issue. Folder and file names
    are as expected. However, when I click on a file node, and exception "Invalid
    Function" is thrown.

    Now, I have noticed that if I get on the server and open a file in Notepad,
    and then go back to the Web Page and click the file node, it will be
    available for download as expected.

    I have tried various things such as running the DOS "type" commanding from
    C# on the file as the link is clicked to make it available. However, no file
    action from within the ASP code seems to be effective until some external
    application does an operation on it.

    Another test I have done is to write a simple C# File.Copy() function to
    copy a file from W:/ to C:/temp in the ASP code. This function throws
    "Invalid Function". Then, I used the same File.Copy() in a tiny C#
    application (non-ASP) and it works fine. After running that tiny app, the ASP
    will copy the file with no problem.

    It seems to be isolated to IIS on Windows2003. I would very much like to
    hear any ideas regarding what I can do to get around the "Invalid Function"

    Thanks in advance for any time you spend considering this puzzle.
    mtanq, Sep 29, 2006
    1. Advertisements

  2. Mike Brind

    Mike Brind Guest

    mtanq wrote:
    > My project is an ASP-based web page, with C# as the language of choice.

    This newsgroup covers classic asp. Dotnet is a different technology
    and has its own group. Try microsoft.public.dotnet.framework.aspnet.

    Mike Brind
    Mike Brind, Sep 29, 2006
    1. Advertisements

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. Johanna
    Oct 13, 2004
  2. =?Utf-8?B?TWFyZWsgRw==?=

    Win2003 IIS and webforms

    =?Utf-8?B?TWFyZWsgRw==?=, Jan 20, 2006, in forum: ASP .Net
    Jan 26, 2006
  3. dgk
  4. Brent White
    Cowboy \(Gregory A. Beamer\)
    Nov 9, 2007
  5. Rbrt