473,767 Members | 7,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Writing files through windows share fails

Hello!

I have created a program, that receives files, and then stores them locally
for later access. This program is run on a Windows 2000 Server computer as a
system service. Some of the files also need to be copied over to another
computer, that is running Windows 2000 Professional version. This goes all
right for some time, but then I start receiving the following error.

IOException: No more connections can be made to this remote computer at this
time because there are already as many connections as the computer can
accept.

Currently, I am using FileInfo.CopyTo method to relocate the file to the
remote computer, by using windows shares. But I have also tried wiriting the
file there with FileStream (since I have it in memory), but that too causes
the above error after some time.

I guess this has something to do with the operating system being a
workstation version, which has probably a limited number (10?) of
connections available. I just don't know why the connections are not closed
and reused. I tested the program with Task Manager, to see if any handles
are leaking, but they are not.

What could be a solution to this situation?

Thanks

-Lenard
Nov 16 '05 #1
4 2018
Is your application the only one accessing the win 2k pro box? If not other
people or apps could be causing the connections to max out. One way to tell
for sure would be to restart the service when the error occurs and see if it
takes a bit for it to occur again or if it starts right away when the
service restarts.

--
Thanks
Wayne Sepega
Jacksonville, Fl
"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein

"Lenard Gunda" <ar************ **@vipmail.hu> wrote in message
news:ei******** *****@TK2MSFTNG P14.phx.gbl...
Hello!

I have created a program, that receives files, and then stores them locally for later access. This program is run on a Windows 2000 Server computer as a system service. Some of the files also need to be copied over to another
computer, that is running Windows 2000 Professional version. This goes all
right for some time, but then I start receiving the following error.

IOException: No more connections can be made to this remote computer at this time because there are already as many connections as the computer can
accept.

Currently, I am using FileInfo.CopyTo method to relocate the file to the
remote computer, by using windows shares. But I have also tried wiriting the file there with FileStream (since I have it in memory), but that too causes the above error after some time.

I guess this has something to do with the operating system being a
workstation version, which has probably a limited number (10?) of
connections available. I just don't know why the connections are not closed and reused. I tested the program with Task Manager, to see if any handles
are leaking, but they are not.

What could be a solution to this situation?

Thanks

-Lenard

Nov 16 '05 #2
Actually it isn't the only one accessing the remote machine.

We checked the 2k pro machine, and there are other users accessing it by
using Windows shares. Could it be that the other users who access it, take
up the windows sharing slots (if there is such a limit), and my service
program is blocked out?

Would it help, if the program would open a file on the remote machine when
it starts, and keep it open until it stops, thereby reserving for itself a
session?

-Lenard
"Wayne" <Me******@commu nity.nospam> wrote in message
news:uh******** ********@TK2MSF TNGP12.phx.gbl. ..
Is your application the only one accessing the win 2k pro box? If not
other
people or apps could be causing the connections to max out. One way to
tell
for sure would be to restart the service when the error occurs and see if
it
takes a bit for it to occur again or if it starts right away when the
service restarts.

--
Thanks
Wayne Sepega
Jacksonville, Fl
"When a man sits with a pretty girl for an hour, it seems like a minute.
But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein

"Lenard Gunda" <ar************ **@vipmail.hu> wrote in message
news:ei******** *****@TK2MSFTNG P14.phx.gbl...
Hello!

I have created a program, that receives files, and then stores them

locally
for later access. This program is run on a Windows 2000 Server computer
as

a
system service. Some of the files also need to be copied over to another
computer, that is running Windows 2000 Professional version. This goes
all
right for some time, but then I start receiving the following error.

IOException: No more connections can be made to this remote computer at

this
time because there are already as many connections as the computer can
accept.

Currently, I am using FileInfo.CopyTo method to relocate the file to the
remote computer, by using windows shares. But I have also tried wiriting

the
file there with FileStream (since I have it in memory), but that too

causes
the above error after some time.

I guess this has something to do with the operating system being a
workstation version, which has probably a limited number (10?) of
connections available. I just don't know why the connections are not

closed
and reused. I tested the program with Task Manager, to see if any handles
are leaking, but they are not.

What could be a solution to this situation?

Thanks

-Lenard


Nov 16 '05 #3
Defiantly could be the other users and there is defiantly a share limit on
PRO versions of the OS, I believe it's 10 as you stated before. As far as
keeping an open file, sounds like it should work, but I don't know for sure.

Wayne
"Lenard Gunda" <ar************ **@vipmail.hu> wrote in message
news:uT******** ******@TK2MSFTN GP14.phx.gbl...
Actually it isn't the only one accessing the remote machine.

We checked the 2k pro machine, and there are other users accessing it by
using Windows shares. Could it be that the other users who access it, take
up the windows sharing slots (if there is such a limit), and my service
program is blocked out?

Would it help, if the program would open a file on the remote machine when
it starts, and keep it open until it stops, thereby reserving for itself a
session?

-Lenard
"Wayne" <Me******@commu nity.nospam> wrote in message
news:uh******** ********@TK2MSF TNGP12.phx.gbl. ..
Is your application the only one accessing the win 2k pro box? If not
other
people or apps could be causing the connections to max out. One way to
tell
for sure would be to restart the service when the error occurs and see if it
takes a bit for it to occur again or if it starts right away when the
service restarts.

--
Thanks
Wayne Sepega
Jacksonville, Fl
"When a man sits with a pretty girl for an hour, it seems like a minute.
But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein

"Lenard Gunda" <ar************ **@vipmail.hu> wrote in message
news:ei******** *****@TK2MSFTNG P14.phx.gbl...
Hello!

I have created a program, that receives files, and then stores them

locally
for later access. This program is run on a Windows 2000 Server computer
as

a
system service. Some of the files also need to be copied over to another computer, that is running Windows 2000 Professional version. This goes
all
right for some time, but then I start receiving the following error.

IOException: No more connections can be made to this remote computer at

this
time because there are already as many connections as the computer can
accept.

Currently, I am using FileInfo.CopyTo method to relocate the file to the remote computer, by using windows shares. But I have also tried wiriting
the
file there with FileStream (since I have it in memory), but that too

causes
the above error after some time.

I guess this has something to do with the operating system being a
workstation version, which has probably a limited number (10?) of
connections available. I just don't know why the connections are not

closed
and reused. I tested the program with Task Manager, to see if any

handles are leaking, but they are not.

What could be a solution to this situation?

Thanks

-Lenard



Nov 16 '05 #4
Open a command shell and issue the "net session" command to get the number
of sessions (limit 10 on workstations) and their remote (client) computer
name.

Willy.
"Lenard Gunda" <ar************ **@vipmail.hu> wrote in message
news:ei******** *****@TK2MSFTNG P14.phx.gbl...
Hello!

I have created a program, that receives files, and then stores them
locally for later access. This program is run on a Windows 2000 Server
computer as a system service. Some of the files also need to be copied
over to another computer, that is running Windows 2000 Professional
version. This goes all right for some time, but then I start receiving the
following error.

IOException: No more connections can be made to this remote computer at
this time because there are already as many connections as the computer
can accept.

Currently, I am using FileInfo.CopyTo method to relocate the file to the
remote computer, by using windows shares. But I have also tried wiriting
the file there with FileStream (since I have it in memory), but that too
causes the above error after some time.

I guess this has something to do with the operating system being a
workstation version, which has probably a limited number (10?) of
connections available. I just don't know why the connections are not
closed and reused. I tested the program with Task Manager, to see if any
handles are leaking, but they are not.

What could be a solution to this situation?

Thanks

-Lenard

Nov 16 '05 #5

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

Similar topics

48
8506
by: Joseph | last post by:
Hi I'm writing a commercial program which must be reliable. It has to do some basic reading and writing to and from files on the hard disk, and also to a floppy. I have foreseen a potential problem. The program may crash unexpectedly while writing to the file. If so, my program should detect this during startup, and then (during startup) probably delete the data added to the file and redo the writing operation.
36
16415
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC path with a FSO: Set myFile = Server.CreateObject("Scripting.FileSystemObject").GetFile("\\server2\myshare\myfile.txt") this fails with an Permission Denied. here's the deal:
9
10572
by: Kristijan Marin | last post by:
Hi, Does anyone know how to copy files inside network from mashine one to mashine2 if the mashine2 requires user/pass authentication ?? I need this for Windows platform. Anyone did that ? Thaks.
8
2404
by: John K. | last post by:
Hi I was wondering if it's possible to use the WebRequest class to access a file on windows shared folder with authentication? If yes, what would the syntax be? I've tried to look this up in the references available but to no avail Also, is it safer (better practise) in an LAN environment to use HTTP requests to access shared files (via ASP.NET) rather than UNC file shares TIA Regards John
1
1344
by: Daniel T | last post by:
I have a web application that needs to copy files from a network share. I have been trying to use impersonation to accomplish this. This works if I impersonate my own network account ( domain\username ). However it fails when I use a user local to the machine hosting the share (RemoteMachine\username). Is there a way to copy the file using the (RemoteMachine\username) account through impersonation or other means?
10
4456
by: dermot | last post by:
I have wrriten a small windows service application in visual studio ..net 2003 which listens for incoming FTP files. These files would overwrite over time due to duplicate file names. However any time the windows service tries to rename the file (using flFile.move(source,destination)) it gets an error saying access is denied. The files are on the network, so we though the local system account may not have access We tried changing the...
1
3898
by: Billy | last post by:
Hi All, I'm attempting to use the MapNetworkDrive <snippedbelow from entire code below with very poor performance results. Basically, I have very small 73kb text files that are rewritten daily to a network share using the MapNetworkDrive command to connect to the valid \\servername\share path. After successfully connecting the drive in the ASP code, the text file
1
3801
by: redet | last post by:
A demo created by a person who has since left, runs fine on a local (Windows XP) system within flash player 8, but when we try to access it through the html version (index.html) on a local system or on our server, there is a breakdown when it tries to load .FLV files sequentially. All the files share the same directory. There are no 'subfolders', all files are in the same root folder called group_quote. Given that the sequential loading...
0
1976
by: =?Utf-8?B?VCFN?= | last post by:
Hi All, I've been successfully deploying clickOnce successfully through the 2.0 and 3.X frameworks, but now have a problem with ClickOnce updates in 3.5 SP1. The scenario is this: I want to deploy an *offline* application that can only be installed from behind our organizational firewall (a Win2k3 domain), but can be updated from anywhere (hotels, etc). To do this, the publishing folder location is set to a UNC share path:
0
9575
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9407
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9960
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8840
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
7384
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
6656
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();...
1
3931
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
3534
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2808
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.