Hi. Is there a way to make a call in ASP.NET that will effectively do exactly
the same thing is when you "touch"/change the web.config file? In other
words, I want to be able to programmaticall y cause the same kind of general
resetting that happens when you touch the web.config file.
Alex 5 2167
Touching global.asax will do an application restart,
and calling appdomain.unloa d will do it, too.
iisreset resets the whole IIS server.
You can also restart individual application pools.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Alex Maghen" <Al********@new sgroup.nospam> wrote in message
news:8C******** *************** ***********@mic rosoft.com... Hi. Is there a way to make a call in ASP.NET that will effectively do exactly the same thing is when you "touch"/change the web.config file? In other words, I want to be able to programmaticall y cause the same kind of general resetting that happens when you touch the web.config file.
Alex
Alex,
see this recent post for some sample code ideas: http://msdn.microsoft.com/newsgroups...8-ac0e39e62326
Watch wrapping on that long url.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"Alex Maghen" wrote: Hi. Is there a way to make a call in ASP.NET that will effectively do exactly the same thing is when you "touch"/change the web.config file? In other words, I want to be able to programmaticall y cause the same kind of general resetting that happens when you touch the web.config file.
Alex
That's a great tip, Peter...
For VB fans...here's the equivalent VB.NET code :
Private Sub KillAspNetProce ss()
Dim processName As String = "aspnet_wp"
Dim os As System.Operatin gSystem = System.Environm ent.OSVersion
'Longhorn and Windows Server 2003 use w3wp.exe
If (((os.Version.M ajor = 5) AndAlso (os.Version.Min or > 1)) OrElse (os.Version.Maj or = 6)) Then
processName = "w3wp"
End If
For Each process As Process In Process.GetProc essesByName(pro cessName)
Response.Write( ("Killing ASP.NET worker process (Process ID:" + (process.Id + ")")))
process.Kill
Next
End Sub
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message
news:6A******** *************** ***********@mic rosoft.com... Alex, see this recent post for some sample code ideas:
http://msdn.microsoft.com/newsgroups...8-ac0e39e62326
Watch wrapping on that long url. Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
"Alex Maghen" wrote:
Hi. Is there a way to make a call in ASP.NET that will effectively do exactly the same thing is when you "touch"/change the web.config file? In other words, I want to be able to programmaticall y cause the same kind of general resetting that happens when you touch the web.config file.
Alex
Juan,
Thanks for the compliment but it wasn't even my idea. Can't remember where I
saw it. Maybe Jon Galloways' blog or something.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"Juan T. Llibre" wrote: That's a great tip, Peter...
For VB fans...here's the equivalent VB.NET code :
Private Sub KillAspNetProce ss() Dim processName As String = "aspnet_wp" Dim os As System.Operatin gSystem = System.Environm ent.OSVersion 'Longhorn and Windows Server 2003 use w3wp.exe If (((os.Version.M ajor = 5) AndAlso (os.Version.Min or > 1)) OrElse (os.Version.Maj or = 6)) Then processName = "w3wp" End If For Each process As Process In Process.GetProc essesByName(pro cessName) Response.Write( ("Killing ASP.NET worker process (Process ID:" + (process.Id + ")"))) process.Kill Next End Sub
Juan T. Llibre, asp.net MVP aspnetfaq.com : http://www.aspnetfaq.com/ asp.net faq : http://asp.net.do/faq/ foros de asp.net, en español : http://asp.net.do/foros/ =============== =============== ===== "Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message news:6A******** *************** ***********@mic rosoft.com... Alex, see this recent post for some sample code ideas:
http://msdn.microsoft.com/newsgroups...8-ac0e39e62326
Watch wrapping on that long url. Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
"Alex Maghen" wrote:
Hi. Is there a way to make a call in ASP.NET that will effectively do exactly the same thing is when you "touch"/change the web.config file? In other words, I want to be able to programmaticall y cause the same kind of general resetting that happens when you touch the web.config file.
Alex This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: JL |
last post by:
Hi there
I have a database with entries like the following:
Id, Name, Goals_season, Goals_total
----------------------------------------
5, John, 5, 23
6, Mike, 2, 14
7, Joe, 10, 34
Every season we have to reset the "Goals_season" column to the default value
|
by: PeteCresswell |
last post by:
I'm working on a new report in an MS Access DB.
The first anomaly was a message "This action will reset the current
code in break mode." when the report was run. Seems TB something
about my Detail1_Print(): if I answer "No" to the dialog the report
just runs. If I answer "Yes", it pops a new dialog seemingly at every
line. Code is below.
The real zinger, however, started on Friday. When I run the report
in question somehow MS...
|
by: hoenes1 |
last post by:
Hi all,
I'm trying to send files to a client following the instructions of
http://support.microsoft.com/?id=812406
Everything works fine, but if files are large and/or if the bandwidth
is small, after a certain time, the error "The connection with the
server was reset" occurs. I think the time span when this error occurs
relates closely to the IIS HTTP Connection timeout setting which is by
|
by: Sanders Kaufman |
last post by:
I'm having a BLAST writing this app as OOP as PHP allows. It's one
thing to discuss the dance, but it's a thing of beauty to see the
performance.
I'm noticing that the constructor is a "reset" switch - just like the
one on the front of my computer. Calling it seems to just dump all of
the old values, free up all of the old resources, and return the object
to a pristine state.
However, I'm a *little* concerned about just using the...
|
by: Frinavale |
last post by:
I think I'm trying to do something impossible.
I have a <div> element with a overflow style set to "scroll". In other words my <div> element allows the user to scroll the content within it.
There are a number of elements within this <div> that cause the <div> to participate in an Ajax call to the server.
In order to maintain the scroll position of the <div> during the Ajax request I store the scroll value in a hidden field so that when...
| |
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...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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,...
|
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...
|
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...
| |
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |