473,406 Members | 2,390 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,406 software developers and data experts.

Web Service failing URGENT

I am working on web service which in turn call com components. if # of users
using the web service increases. Web service fails is there some why I can
prevent max # of concurrent users using the web service.

Thanks
Ajit
Jan 16 '06 #1
6 1460
Ajit,

Could I have a little clarity? Do you want to a) stop your web service from
falling over after a particular number of concurrent users or do you want to
b) deny access to users after a particular number of concurrent users has
been reached?

For situation a) have you considered using threading? This allows other
processes to begin in their own memory space. Also, does your calling method
require a response from your web service? If not you specify that the
webservice doesn't need to return a response, thereby allowing it to complete
it's task in it's own time and not rush to perform it's operation.

Hope these suggestions are helpful.

--
Kurt Farrar
..NET Developer & Computer Enthusiast

"ajit" wrote:
I am working on web service which in turn call com components. if # of users
using the web service increases. Web service fails is there some why I can
prevent max # of concurrent users using the web service.

Thanks
Ajit

Jan 16 '06 #2
Thanks Kurt,
I want to do this deny access to users after a particular number of
concurrent users has been reached?

Thanks
Ajit

"Kurt Farrar" wrote:
Ajit,

Could I have a little clarity? Do you want to a) stop your web service from
falling over after a particular number of concurrent users or do you want to
b) deny access to users after a particular number of concurrent users has
been reached?

For situation a) have you considered using threading? This allows other
processes to begin in their own memory space. Also, does your calling method
require a response from your web service? If not you specify that the
webservice doesn't need to return a response, thereby allowing it to complete
it's task in it's own time and not rush to perform it's operation.

Hope these suggestions are helpful.

--
Kurt Farrar
.NET Developer & Computer Enthusiast

"ajit" wrote:
I am working on web service which in turn call com components. if # of users
using the web service increases. Web service fails is there some why I can
prevent max # of concurrent users using the web service.

Thanks
Ajit

Jan 17 '06 #3
Ajit,

You can store a 'counter' type variable in an Application variable. Each
time the web service is called you increment the number. You'll need to make
sure you properly deduct one each time the web service finishes or if an
exception occurs.

Example of how to use the webservice in VB.NET is as follows:

<WebMethod()> _
Public Function IncrementTest() As Integer
Dim niTest As Integer = Application("Test")
niTest += 1
Application("Test") = niTest
Return niTest
End Function

Example of how to use the webservice in C#.NET is as follows (I think):

Public int IncrementTest
{
int niTest = Application["Test"];
niTest ++;
Application["Test"] = niTest;
Return niTest;
}

If you invoke this method you'll see that the returned value keeps going up
by one even though they are seperate calls.

Hope this helps.
--
Kurt Farrar
..NET Developer & Computer Enthusiast

"ajit" wrote:
Thanks Kurt,
I want to do this deny access to users after a particular number of
concurrent users has been reached?

Thanks
Ajit

"Kurt Farrar" wrote:
Ajit,

Could I have a little clarity? Do you want to a) stop your web service from
falling over after a particular number of concurrent users or do you want to
b) deny access to users after a particular number of concurrent users has
been reached?

For situation a) have you considered using threading? This allows other
processes to begin in their own memory space. Also, does your calling method
require a response from your web service? If not you specify that the
webservice doesn't need to return a response, thereby allowing it to complete
it's task in it's own time and not rush to perform it's operation.

Hope these suggestions are helpful.

--
Kurt Farrar
.NET Developer & Computer Enthusiast

"ajit" wrote:
I am working on web service which in turn call com components. if # of users
using the web service increases. Web service fails is there some why I can
prevent max # of concurrent users using the web service.

Thanks
Ajit

Jan 17 '06 #4
Kurt,

For situation a) have you considered using threading? This allows other
processes to begin in their own memory space. Also, does your calling method
require a response from your web service? If not you specify that the
webservice doesn't need to return a response, thereby allowing it to
complete
it's task in it's own time and not rush to perform it's operation.

isnt threading handled internally by .NET framework. Can you explain this
further.
I also see that we can change max # of threads using config. file.
"processes to begin in their own memory space." Can you detail this further.
Thanks
Ajit

"Kurt Farrar" wrote:
Ajit,

You can store a 'counter' type variable in an Application variable. Each
time the web service is called you increment the number. You'll need to make
sure you properly deduct one each time the web service finishes or if an
exception occurs.

Example of how to use the webservice in VB.NET is as follows:

<WebMethod()> _
Public Function IncrementTest() As Integer
Dim niTest As Integer = Application("Test")
niTest += 1
Application("Test") = niTest
Return niTest
End Function

Example of how to use the webservice in C#.NET is as follows (I think):

Public int IncrementTest
{
int niTest = Application["Test"];
niTest ++;
Application["Test"] = niTest;
Return niTest;
}

If you invoke this method you'll see that the returned value keeps going up
by one even though they are seperate calls.

Hope this helps.
--
Kurt Farrar
.NET Developer & Computer Enthusiast

"ajit" wrote:
Thanks Kurt,
I want to do this deny access to users after a particular number of
concurrent users has been reached?

Thanks
Ajit

"Kurt Farrar" wrote:
Ajit,

Could I have a little clarity? Do you want to a) stop your web service from
falling over after a particular number of concurrent users or do you want to
b) deny access to users after a particular number of concurrent users has
been reached?

For situation a) have you considered using threading? This allows other
processes to begin in their own memory space. Also, does your calling method
require a response from your web service? If not you specify that the
webservice doesn't need to return a response, thereby allowing it to complete
it's task in it's own time and not rush to perform it's operation.

Hope these suggestions are helpful.

--
Kurt Farrar
.NET Developer & Computer Enthusiast

"ajit" wrote:

> I am working on web service which in turn call com components. if # of users
> using the web service increases. Web service fails is there some why I can
> prevent max # of concurrent users using the web service.
>
> Thanks
> Ajit

Jan 18 '06 #5
Kurt,

Can I use Threadpool.GetAvailableThreads() method to do this?

Thanls
Ajit

"Kurt Farrar" wrote:
Ajit,

You can store a 'counter' type variable in an Application variable. Each
time the web service is called you increment the number. You'll need to make
sure you properly deduct one each time the web service finishes or if an
exception occurs.

Example of how to use the webservice in VB.NET is as follows:

<WebMethod()> _
Public Function IncrementTest() As Integer
Dim niTest As Integer = Application("Test")
niTest += 1
Application("Test") = niTest
Return niTest
End Function

Example of how to use the webservice in C#.NET is as follows (I think):

Public int IncrementTest
{
int niTest = Application["Test"];
niTest ++;
Application["Test"] = niTest;
Return niTest;
}

If you invoke this method you'll see that the returned value keeps going up
by one even though they are seperate calls.

Hope this helps.
--
Kurt Farrar
.NET Developer & Computer Enthusiast

"ajit" wrote:
Thanks Kurt,
I want to do this deny access to users after a particular number of
concurrent users has been reached?

Thanks
Ajit

"Kurt Farrar" wrote:
Ajit,

Could I have a little clarity? Do you want to a) stop your web service from
falling over after a particular number of concurrent users or do you want to
b) deny access to users after a particular number of concurrent users has
been reached?

For situation a) have you considered using threading? This allows other
processes to begin in their own memory space. Also, does your calling method
require a response from your web service? If not you specify that the
webservice doesn't need to return a response, thereby allowing it to complete
it's task in it's own time and not rush to perform it's operation.

Hope these suggestions are helpful.

--
Kurt Farrar
.NET Developer & Computer Enthusiast

"ajit" wrote:

> I am working on web service which in turn call com components. if # of users
> using the web service increases. Web service fails is there some why I can
> prevent max # of concurrent users using the web service.
>
> Thanks
> Ajit

Jan 18 '06 #6
Threading is handled by .NET, yes, so you don't need to worry about hooking
into the APIs of the Operating System. As for getting the syntax to access
threading, I'm not sure, it's been a while since I've needed to use
threading.

If I remember correctly threating has it's own namespace in .NET...
System.Threading? I'm sure the MSDN Library will have this information.

Once again, I hope this helps.

--
Kurt Farrar
..NET Developer & Computer Enthusiast

"ajit" wrote:
Kurt,

For situation a) have you considered using threading? This allows other
processes to begin in their own memory space. Also, does your calling method
require a response from your web service? If not you specify that the
webservice doesn't need to return a response, thereby allowing it to
complete
it's task in it's own time and not rush to perform it's operation.

isnt threading handled internally by .NET framework. Can you explain this
further.
I also see that we can change max # of threads using config. file.
"processes to begin in their own memory space." Can you detail this further.
Thanks
Ajit

"Kurt Farrar" wrote:
Ajit,

You can store a 'counter' type variable in an Application variable. Each
time the web service is called you increment the number. You'll need to make
sure you properly deduct one each time the web service finishes or if an
exception occurs.

Example of how to use the webservice in VB.NET is as follows:

<WebMethod()> _
Public Function IncrementTest() As Integer
Dim niTest As Integer = Application("Test")
niTest += 1
Application("Test") = niTest
Return niTest
End Function

Example of how to use the webservice in C#.NET is as follows (I think):

Public int IncrementTest
{
int niTest = Application["Test"];
niTest ++;
Application["Test"] = niTest;
Return niTest;
}

If you invoke this method you'll see that the returned value keeps going up
by one even though they are seperate calls.

Hope this helps.
--
Kurt Farrar
.NET Developer & Computer Enthusiast

"ajit" wrote:
Thanks Kurt,
I want to do this deny access to users after a particular number of
concurrent users has been reached?

Thanks
Ajit

"Kurt Farrar" wrote:

> Ajit,
>
> Could I have a little clarity? Do you want to a) stop your web service from
> falling over after a particular number of concurrent users or do you want to
> b) deny access to users after a particular number of concurrent users has
> been reached?
>
> For situation a) have you considered using threading? This allows other
> processes to begin in their own memory space. Also, does your calling method
> require a response from your web service? If not you specify that the
> webservice doesn't need to return a response, thereby allowing it to complete
> it's task in it's own time and not rush to perform it's operation.
>
> Hope these suggestions are helpful.
>
> --
> Kurt Farrar
> .NET Developer & Computer Enthusiast
>
>
>
> "ajit" wrote:
>
> > I am working on web service which in turn call com components. if # of users
> > using the web service increases. Web service fails is there some why I can
> > prevent max # of concurrent users using the web service.
> >
> > Thanks
> > Ajit

Jan 19 '06 #7

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

Similar topics

2
by: Per Bergland | last post by:
I have a system service written in C#. For some reason it fails to start on our external web server (running a tightened Windows 2000). If I try to start the services after logging on, it works...
29
by: Ken Allen | last post by:
I have a number of services developed in C# (.Net), and they have been working fine for the most part. Recently someone reported that ipon occassion (originally rarely, but more frequently on some...
3
by: Manuel Alves | last post by:
Hi all, I've got a windows service that depends on some other services. On the project installer I state this by using: Me.myService.ServicesDependedOn = New String() {"Print Spooler", "Net...
4
by: Jason Richmeier | last post by:
I am sure this has been asked at least once before but I could not find anything when searching. If I set the value of the ExitCode property to 1066 for a windows service, the text "A service...
1
by: BizWorld | last post by:
I am using .NET 2.0 new classed for FTP download purpose. I have requirement to connect with 3 different FTP and download all files list and see if file exist at my end. if not then i need to...
0
by: Temporary | last post by:
C# Web Service in IIS Stops Connecting to Oracle (via ADO.NET) Over Time I have a Web Service, written in C#, published on a Windows XT Web Server under IIS, which repeatedly connects to an...
2
by: Bill Davidson | last post by:
All: I have a Win32 service that takes about 30 seconds to shutdown (give or take a few seconds). I shut the service down via the 'Services' console on Windows Server 2003. When the service...
5
by: Oriane | last post by:
Hi, I have a .Net Visual Studio solution with one asp.net Web application, which uses a Asp.Net Web service. Both are compiled in debug mode, and both are using the Studio development web server...
2
by: Peter | last post by:
Is there a way to automatically update a Windows .NET service, kind of like Click-Once or put a file in the directory and the service would restart it's self and replace the executables or at least...
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
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...
0
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,...
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.