473,799 Members | 2,900 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to control the application end time then 2-nd instance started?

Hello.

I have a working ASP.NET service. I am using .NET Framework 1.1; IIS V6.0.
(web garden not used)

When I change web.config file or load new *.dll, my service restarts,
and about 90 seconds two versions(instan ces) of my application exists.

Is anybody know how to minimize the time between starting of the new
version(instanc e) of application and the application end of previous
instance. (I am using asynchronous request processing in my service.)

Alexander.
Nov 19 '05 #1
5 1763
Hi Alexander,

Welcome to ASPNET newsgroup.
As for the application restarting , this is a normal behavior since
changing web.config or private "bin" folder will make the current
application's setting invalid so the runtime will stop the current
appdomain and restart new one.

Also, the actual point on when the orginal appdomain shutdown and the new
one started can not be retrieved exactly since the runtime need to do some
additinoal resource backup and colleciton operations before end the old
instance or do some initialization steps before start up new one.
Currently the only events we can make use of are the

Application_Sta rt and Application_End events in the Global.asax class

Is it possbile that we put our own customized backup and initialization
code there?

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




Nov 19 '05 #2
Some of my external programs (let's call it "Receivers" ) permanently
connected to the ASP.NET
application, and processing long running requests (receiving data that
other external programs calling "clients" send). "clients" connects to
ASP.NET
application every time they want to send data (many times a second).
When new version of ASP.NET application started, there are 2 instances
of ASP.NET application and "clients" begin connecting to the new
ASP.NET instance. In this point of time "Receivers" still connected to the
previous
instance of ASP.NET (they reconnect only after Application_End event).
In that period of time, about 90 seconds, "clients" and "Receivers"
works in different instances and can't send data to each other using
application internal arrays of data.
Tell me please how to reconnect long running "Receivers" at the time when
new instance start or to speed up Application_End event for the previous
instance?

In ASP.NET I am using asynchronous request processing for the
"Receivers" :

public IAsyncResult BeginProcessReq uest(HttpContex t ctx,
AsyncCallback cb,
object obj)
{
AsyncRequestSta te reqState =
new AsyncRequestSta te(ctx, cb, obj);
AsyncRequest ar = new AsyncRequest(re qState);
ThreadStart ts = new ThreadStart(ar. ProcessRequest) ;
Thread t = new Thread(ts);
t.Start();

return reqState;
}
Thanks in advance,
Alexander.
Nov 19 '05 #3
Thanks for your further description Alexander,

So the connection between the "receivers" and ASP.NET are established when
you start the async thread in your asynhandler's BeginProcessReq uest, yes?
How does the external program(receive rs) interact with asp.net?

Anyway, currently we haven't any means to maually inject into the
Applciation's Restart steps to speed up or delay the shutdown period. If
you do need to avoid the receivers program continue connecting to the old
appdomain(when restart occurs), I think we may need to provide our custom
Synchorizing code , such as using a global event object to identity whether
new appdomain started and reject all the processes from old appdomain.

BTW, I'm confused as you use ASP.NET as the middle tier of your system.
clients send request to ASP.NET and ASP.NET connect to recievers to let it
process requests. Since ASP.NET is designed for user interactive web
application, it's buildin HTTP async pipline may not suit your scenario
well. Is it possible that we consider some other services as the middle
tier, such as .net remoting or MSMQ?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4
Thanks for replay. Now it's not possible to rewrite applications,
but in future, we will do it as you say (ASP.NET will connect to
other middle tire that will work with recievers).

About asynchronous request processing:
Yes. I am using async thread in my application as written below:
Asynchronous Handler with Custom Threads
http://msdn.microsoft.com/msdnmag/is.../06/Threading/
How does the external program(receive rs) interact with asp.net?

Receivers connects to the ASP.NET service and then only continuously
receive some string data (one very long query). Receivers reconnects only
on network, software or other error.

Thank you ever so much.
Alexander.
Nov 19 '05 #5
You're welcome Alexander,

If there'r anything we can help later, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #6

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

Similar topics

2
11127
by: Randy Birch | last post by:
Reposted as the original is reported as deleted from the server. re: MSComCtl Listview control cashes after installing VB6/VS6 SP6 I have been advised that this problem has been reproduced and a hotfix has been prepared. The supporting KB article and hotfix download link have yet to be posted, but I can provide you with the following information for those requiring an immediate fix:
20
2515
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to the site, and then i have to select the file to upload.. i used sendkeys.. and i worked perfect.. BUT ... the computer must be locked for security ( obviusly ) reazons.. so..i think this probable solutions to unlock the computer and run the...
9
3976
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it will not set the value of the control and will leave the checked status of the checkbox to false when a user selects a new date. this works fine when using the control on a win2k machine but if we use it on a win XP box and call
3
1942
by: Dennis M | last post by:
Hey everyone, I am curious what the performance impact of a custom control would be if it had a significant hierarchy of children. For example, 40 child controls, 5 levels deep, each control on average has 20 properties. What would be the best way to implement such a thing? The book I am reading uses templated controls and basically reconstructs the entire hierarchy everytime page is accessed based on the tags in the .aspx file, but...
5
3597
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact that for server control component , code is running on the server side. But if I take as example a Label. I place on a webform an HTM label control and a WebForm label control, I could see that properties are different for
12
7641
by: VJ | last post by:
I am using the web browser control.., I would like to add the control at runtime... I was adding the web browser control at desgin time. Now I decided to add the control at run time so I removed the control from the form and also the refrences to AxSHDocVw and SHDocVw, then I added the following statments Dim axwbOfficeDocEditor As New AxSHDocVw.AxWebBrowser Me.Controls.Add(axwbOfficeDocEditor) axwbOfficeDocEditor.Dock = DockStyle.Fill
3
1093
by: Daniel Friend | last post by:
I have an application and use custom user controls as plugins. Is there any way to communicate back and forth from control to app. NOTE: The control is not refrenced in the app, it will act as a plugin and will be dynamically loaded to the app. Example: 1. My application as a public variable 2. The control must receieve the value of the public variable 3. The control will do some math and encryption of the variable
15
6523
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then i added this line "" before my custom control class (i dont know what this line does). Now
0
2207
by: morathm | last post by:
I have a windows client database management application written in C# that connects to remote web services to do all the heavy work. The thin-client app uses strong typed datasets, all maintained at the web service, with a web reference to those datasets via exposed s on the web service. The client app has a series of windows forms designed to manage particular types of data. For example, there's a manage users form. On each of these...
17
7973
by: Cesar | last post by:
Hello people. I'm having a Winform app that contains a webbrowser control that keeps navigating from one page to another permanentrly to make some tests. The problem I'm having is that after a while, the application is using more than 100 or 150 Mb in RAM, and if I let it continue, it can leave the system without memory. I've been watching in some pages that other people has the same problem with this control when keep navigating for a...
0
9687
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
9541
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,...
0
10252
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10231
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
10027
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9073
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
7565
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
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
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

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.