"Invalid Function" reading files on Win2003 Server from IIS

M

mtanq

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"
exception.

Thanks in advance for any time you spend considering this puzzle.
 
M

Mike Brind

mtanq said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top