473,383 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

"Invalid Function" reading files on Win2003 Server from IIS

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.

Sep 29 '06 #1
1 1595

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

Sep 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Wally | last post by:
I am trying to display images from an Access 2000 database and I get an error "Invalid Parameter Used" when I execute the code line "picBLOB.Image = Image.FromStream(stmBLOBData)" in my Visual...
2
by: hvaisane | last post by:
Valgrind says ==11604== Invalid read of size 4 ==11604== at 0x8048ABB: main (foo.cc:36) ==11604== Address 0x1B92415C is 4 bytes inside a block of size 8 free'd ==11604== at 0x1B90514F:...
1
by: verb13 | last post by:
In an asp page in localhost I have this: Set x = Server.CreateObject("Scripting.Dictionary") And I get this error: Invalid class string If I omit Server like this: Set x =...
2
by: Vinod I | last post by:
Hi Team, When I tryed following code, I am getting the Runtime Error as "The View State is invalid for this page and might be corrupted." Exception Details: System.Web.HttpException: The View...
2
by: GD | last post by:
Hi, An intranet application, with a SMTP mail function that lets users to attach files with emails by selecting files in their local computers (through a file browser component), works perfect on...
4
by: escristian | last post by:
Hello. I'm trying to create an Image so I use something like this: Image newImage = Image.FromFile(filename); Now when it's a bmp file and certain .gif files it gives me an exception that...
0
by: mtanq | last post by:
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:/)....
10
by: jonathanemil | last post by:
Hello, I am a 1st semester Computer Science student in a Python class. Our current assignment calls for us to read a list from a file, create a 2-dimensional list from the file, and check to see...
4
RMWChaos
by: RMWChaos | last post by:
Darnit all, I expect the code I steal from others to work! =D Below is some code that I got to initiate multiple javascripts on page load (rather than using the "onload=" attribute). According the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.