Hello KF,
From your description, I understand that you're trying to author some
script or a program to programmaticlly turn off ASP.NET application in IIS
server and perform database backup task in SQL Server, correct?
I'm wondering whether your database will be used by the ASP.NET application
only or if you only care about the data accessing from ASP.NET web
application? If you only care about the data accessing from ASP.NET
application, you can consider the following means:
1. stop and start IIS service as you mentioned
2. If you're using IIS6, you can also stop the application pool if the
ASP.NET application only.
here are some IIS management related script resources:
http://www.microsoft.com/technet/tec...ideMSCOM/defau
lt.aspx
http://technet2.microsoft.com/Window...7-c6c3-4748-a4
6a-43710abceddb103 3.mspx?mfr=true
http://www.microsoft.com/technet/pro.../Library/IIS/0
03ed2fe-6339-4919-b577-6aa965994a9b.ms px?mfr=true
http://blog.crowe.co.nz/archive/2006/07/11/669.aspx
3. For ASP.NET 2.0, there is a new feature. You can put a "App_Offline.ht m"
file in the certain ASP.NET 2.0 application's main directory. Then, any
sequential requests won't be processed(deny by ASP.NET applcation runtime).
You can use this feature to stop the ASP.NET application's processing.
http://weblogs.asp.net/scottgu/archi...06/426755.aspx
Hope this helps some.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.