473,394 Members | 1,781 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,394 software developers and data experts.

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 2003
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*************@TK2MSFTNGP14.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******@community.nospam> wrote in message
news:uh****************@TK2MSFTNGP12.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*************@TK2MSFTNGP14.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**************@TK2MSFTNGP14.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******@community.nospam> wrote in message
news:uh****************@TK2MSFTNGP12.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*************@TK2MSFTNGP14.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*************@TK2MSFTNGP14.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
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...
36
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...
9
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 ? ...
8
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...
1
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 ( ...
10
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...
1
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...
1
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...
0
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.