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

how do I force IIS to single thread my web service??

I have a web service running on IIS 5.0. We know the web
service is not threadsafe, and want to force aspnet_wp.exe
to only run one instance of our web service. What
settings do we use to do this.

I have tried modifying the machine.config file and setting
maxWorkerThreads=1. However, then I can't even get
aspnet_wp.exe to load. Can anyone help me out here?
Nov 17 '05 #1
4 4190
What is the problem you are having? Setting a webservice to be single use
works contrary to the design of the service. There may be an alternate route
if your explain your threading problem.

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Jason" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
I have a web service running on IIS 5.0. We know the web
service is not threadsafe, and want to force aspnet_wp.exe
to only run one instance of our web service. What
settings do we use to do this.

I have tried modifying the machine.config file and setting
maxWorkerThreads=1. However, then I can't even get
aspnet_wp.exe to load. Can anyone help me out here?

Nov 17 '05 #2
"Jason" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
I have a web service running on IIS 5.0. We know the web
service is not threadsafe, and want to force aspnet_wp.exe
to only run one instance of our web service. What
settings do we use to do this.

I have tried modifying the machine.config file and setting
maxWorkerThreads=1. However, then I can't even get
aspnet_wp.exe to load. Can anyone help me out here?


Try, at the start of every method in your web service, to do the following:

lock (typeof(MyWebService))
{
// non-thread-safe-code
}

--
John

Nov 17 '05 #3
He will need a stronger lock than a critical section since the critical
section doesn't block threads outside the calling application.

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"John Saunders" <john.saunders at surfcontrol.com> wrote in message
news:OW**************@TK2MSFTNGP10.phx.gbl...
"Jason" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
I have a web service running on IIS 5.0. We know the web
service is not threadsafe, and want to force aspnet_wp.exe
to only run one instance of our web service. What
settings do we use to do this.

I have tried modifying the machine.config file and setting
maxWorkerThreads=1. However, then I can't even get
aspnet_wp.exe to load. Can anyone help me out here?
Try, at the start of every method in your web service, to do the

following:
lock (typeof(MyWebService))
{
// non-thread-safe-code
}

--
John

Nov 17 '05 #4
"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:eN**************@tk2msftngp13.phx.gbl...
He will need a stronger lock than a critical section since the critical
section doesn't block threads outside the calling application.
He said he wanted IIS to single-thread. What other threads outside the
application will be running the same instance of his web service?
--
John
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"John Saunders" <john.saunders at surfcontrol.com> wrote in message
news:OW**************@TK2MSFTNGP10.phx.gbl...
"Jason" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
I have a web service running on IIS 5.0. We know the web
service is not threadsafe, and want to force aspnet_wp.exe
to only run one instance of our web service. What
settings do we use to do this.

I have tried modifying the machine.config file and setting
maxWorkerThreads=1. However, then I can't even get
aspnet_wp.exe to load. Can anyone help me out here?


Try, at the start of every method in your web service, to do the

following:

lock (typeof(MyWebService))
{
// non-thread-safe-code
}

--
John


Nov 17 '05 #5

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

Similar topics

0
by: noah | last post by:
Hi, I'm in the middle of writing a multi-user system with very critical timing issues. I've already implemented a cache and an API to access it (with appropriate locking for multithreaded access)....
6
by: Ganesh | last post by:
Is there a utility by microsoft (or anyone) to force garbage collection in a process without have access to the process code. regards Ganesh
13
by: Andy Fish | last post by:
Hi, I am using COM interop to invoke MS word from my .net app. If word pops up a dialog box, my thread obviously hangs until the dialog is answered. Here's the problem: because the app is...
1
by: benmorganpowell | last post by:
I have a small windows service which connects to a POP3 server at defined intervals, scans the available messages, extracts the required information and inserts the data into a SQL database. I am...
6
by: ben | last post by:
I am needing a web service to be single threaded. Is this possible? Any ideas would be helpful
6
by: kumar_anil_gaya_India | last post by:
Hi All, I am facing one problem. I have one DLL called LogManagement which has ability to write to ExceptionLog and EventLog File. Both are separate file locate in Logs Diectory. I have two ...
7
by: =?Utf-8?B?YWVzcGVy?= | last post by:
Is there such a thing as a single instance web service? Is it possible to have all calls to a web service share one property value by declaring it as static? I know web service should be stateless,...
10
by: Daniel | last post by:
how to force a .net application to use .net 2.0 ? this windows service is about 4 years old and im pretty sure is using .net 1.x runtime. Is there soem setting in the installer that says to use...
5
by: joebloe | last post by:
I know this question comes up from time to time, but 10-15 minutes of googling hasn't produced a useful answer for me. I'm looking for the equivalent of insert_magic_here() in: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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...
0
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,...
0
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...

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.