473,662 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"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 1624

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.publi c.dotnet.framew ork.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
1966
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 Basic .Net application. I have researched MSDN for help and found the example article 321900 (see below) and set up a test and everything works fine when I use SQL Server 2000 but when I modify the code and use data from Access 2000 using an...
2
22790
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: operator delete(void*) (vg_replace_malloc.c:156) ==11604== by 0x804A1BA: __gnu_cxx::new_allocator<Foo>::deallocate(Foo*, unsigned) (new_allocator.h:86) ==11604== by 0x8049C08: std::_Vector_base<Foo, std::allocator<Foo> >::_M_deallocate(Foo*,...
1
3964
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 = Server.CreateObject("Scripting.Dictionary") I get this error: ActiveX component can't create object: 'Scripting.Dictionary' In the same asp page this works fine: Set conn = Server.CreateObject("ADODB.Connection")
2
3198
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 State is invalid for this page and might be corrupted. Stack Trace: System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +150 System.Web.UI.Page.LoadPageViewState() +16
2
4427
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 my local machine. However, after deployment to a server that has Windows 2003 Sever installed, the mail function is able to attach the file created by the application. However, when users attach some files selected from their local machines, it...
4
3052
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 says: "Invalid parameter used". The gif an bmp files are valid image files, I can open them in any graphics software and windows can do the preview.
0
1248
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:/). 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...
10
4025
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 whether or not 2-dim list constitutes a "magic square" (i.e. all the rows, columns and diagonals equal each other when added). We are to create several definitions, and I have had no problem reading from the file, creating the list, and getting the...
4
3334
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 blog where it was posted, it seems that it works for everyone who posted replies...not a single "this is not working for me" post. The errors I receive are as follows: IE7: expected ";" and then "conditional compilation is turned off" FF &...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7368
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1754
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.