Hi All,
I have a solution that has a asp.net app project and webservice project in it
When I debug the asp.net app...and then terminate it...the webservice is
still live...and aspnet_wp.exe is still live w/ it. I have to end task
aspnet_wp.exe in order for the webservice part of the solution to end
Is there a "right" way to terminate a webservice project when it is called
from a asp.net project in a solution?
Regards,
Mekim 9 2301
Hi Mekim,
Your web service request ends as long as your method finishes its execution. The aspnet_wp.exe keeps running because it is part of IIS. As such IIS keeps it running to handle subsequent requests without having to ‘warm up’ the service on every request. What do you mean by ‘the webservice part of the solution to end’? Which part is not ended when your method finishes?
You can use iisreset.exe to restart IIS.
Regards,
Martin Kulov www.codeattest.com
Hi Martin...thx for your response
In the the webservice portion of the solution...the global.asax is still
live ...even though the "start up project" 's debug session has been
terminated.
And...the only way to terminate that is to terminate the apnet_wp.exe :-/
Regard,
Mekim
"Martin Kulov" wrote: Hi Mekim,
Your web service request ends as long as your method finishes its execution. The aspnet_wp.exe keeps running because it is part of IIS. As such IIS keeps it running to handle subsequent requests without having to ‘warm up’ the service on every request. What do you mean by ‘the webservice part of the solution to end’? Which part is not ended when your method finishes? You can use iisreset.exe to restart IIS.
Regards, Martin Kulov www.codeattest.com
Hi mekim,
That's the idea of global.asax file. What do you trying to achieve? Generally speaking it is not recommended practice to write custom code in global.asax file.
Martin
Hi Martin,
In the webservice's global.asax file I create an object (private myClass1 as
new classWhatever) on app_start to persist data between calls.
The problem is that the object is not destroyed in app_end since it's not
called when I terminate the main project during debug. hmmm...come to think
of it...I'm not sure how app_end is ever called in a webservice project
Regards,
Mekim
"Martin Kulov" wrote: Hi mekim,
That's the idea of global.asax file. What do you trying to achieve? Generally speaking it is not recommended practice to write custom code in global.asax file.
Martin
Hi mekim,
App_end is never called because the debugger gets detached from the aspnet_wp.exe process when you stop debugging. When detaching, it does not end the execution of the process. The process will end after some timeout elapse. You can add trace statements to see when this happen.
IMHO it is better to avoid adding code to global.asax file in order to manage state. Why do not you use Session, of better yet – Cache class which can store your session state?
Martin
Hi Martin,
well...that's silly...if I'm ending the debug session...it's good-bye app
time...but I guess not...:/
A/w...in ref to your session pt...I'll tell u why i didn't use session...and
p/ correct me
1-session adds overhead to each webservice call
2-what's wrong w/ using global.asax?
Regards,
Mekim
"Martin Kulov" wrote: Hi mekim,
App_end is never called because the debugger gets detached from the aspnet_wp.exe process when you stop debugging. When detaching, it does not end the execution of the process. The process will end after some timeout elapse. You can add trace statements to see when this happen. IMHO it is better to avoid adding code to global.asax file in order to manage state. Why do not you use Session, of better yet – Cache class which can store your session state?
Martin
Hi mekim, 1-session adds overhead to each webservice call
The problem with session was that is could not scale well. However in current ASP.NET version there are ways to store session state in database. It won't add any other overhead more than your class adds in global.asax
2-what's wrong w/ using global.asax?
Nothing. I consider it bad practice since the code is placed in a location that does not belong to any page. Since web request are considered stateless and every page is alone for itself I prefer writing code in into each page source file. I makes finding the problems easier. From the ages of ASP 3.0 modifing the global.asa file causes the web server to restart the application and may be I am used not to touch global.asa? files also.
Regards,
Martin Kulov www.codeattest.com
i just want to confirm that i need the aspnet_wp.exe to end after the
webservice because i'm writing to a text file in the webservice method,
so if the process of the aspnet_wp.exe doesnt end, the output file is
still in use... so how can i overcome this issue?
--
torkish
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message1206760.html
I beleive that I disagree with everything stated above.
aspnew_wp.exe should terminate after you stop debugging. The fact that it doesn't is a problem. Also if you have multiple copies running (the number increases each time you debug again) then you will lose the ability to terminate them. Try taskkill, but it won't work when there are multiple copies. The best solution I've found so far is to always terminate the process manually after you quit debugging (each time).
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: HG |
last post by:
Hi gurus
Sorry the rather long post...
I am facing a real world problem here, and I dunno how to approach it.
Don't even know if this is the right group...but since my app is ASP.NET I
tried...
|
by: bluewind44 |
last post by:
Hello, all.
Is there any case that session vaiables expire before the time-out?
Now, I'm developing the UI project that use the webservice project.
Ocationally I met the situation that I...
|
by: jb |
last post by:
*Please* help --- I'm tearing my hair out.
I want to use sessionstate in a webservice, accessed from a client, written
in script (JScript, InfoPath).
I have written my webservice (C# .NET). I...
|
by: ST |
last post by:
Hello everyone, Can anyone help me with this error above when I debug my web
app project in vstudio.net?? I can't figure it out! It was working fine for
months, and now all of a sudden it's not!!...
|
by: Monster |
last post by:
is it possible to manually create and destroy a session object in a
webservice? My original client and server were done with SOAP in c++ (isapi
dll and mfc/atl). I managed to write an intermediate...
| |
by: Epetruk |
last post by:
Hello,
In VS2003, I used to have two solutions - a debug and release solution.
Each solution had a webservice project and several other class library
projects. The webservice project...
|
by: ^MisterJingo^ |
last post by:
Hi all,
I have to build a webservice which allows users to login through it
(using a ticket system). What I'm unsure on is does the server start a
session for remote webservice requests? I ask...
|
by: ad |
last post by:
I add an WebService (.asmx) in a WebApplication.
I have a line :
Session= "This is a Test";
but it always fail in run time.
Can I use Session in WebService?
|
by: nagvisu |
last post by:
Hai all
THanks in Advance hoping solution
when im trying to run a .net project,it is giving an error like this (that some files are written using c++)
---------------------------
Microsoft...
|
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,...
|
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...
| |
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...
|
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: 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,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |