Tự động khởi động AppPool trên IIS 6.0 trong Windows 2003

Trong môi trường IIS 6.0 sử  dụng Application  Pool, các bạn thỉnh thoảng hay bắt gặp các Application Pool tự  động dừng lại vì một lý do nào đó mà ko xác định được.Dẫn đến thông báo lỗi  SERVICE UNAVAILABLE khi truy cập website.

Để khắc phục lỗi này chỉ đơn giản là vào IIS và khởi động Application Pool nào bị stop lên là ok.

Nhưng nếu lỗi này xảy ra thường xuyên hơn mong đợi,thì mình giới thiệu các bạn một đoạn mã VB sau thật đơn giản,nhằm khắc phục lỗi này.

Đọc tiếp »

Configuring Application Pools in IIS 6.0

One of the best improvements in IIS 6.0 over earlier versions was the introduction of Application Pools (often called App Pools for short). When IIS 6.0 is running in Worker Process Isolation Mode (the default in a new installation of Microsoft® Windows Server™ 2003), every IIS 6.0 site runs in an app pool. Each pool is associated with one instance of w3wp.exe, which is the host process for your applications assigned to the pool. These are referred to as “worker processes,” hence the name W3 (for www) WP (worker process) .exe.
Technically speaking, I should say “one or more instances of w3wp.exe” since you can configure a pool to have more than one worker process, but this is rarely useful. So for the sake of simplicity, and since it’s true at least 95 percent of the time, I’ll work from the assumption that each application is associated with one instance of w3wp.exe.
IIS 5.0 Process Model

Application Pools làm việc thế nào?

Khi bạn chạy IIS 6.0 trong chế độ worker process isolation, bạn có thể tách biệt những ứng dụng web và vị trí web vào trong những nhóm được gọi là application pool.
Một application pool là một nhóm của một hoặc nhiều URLs mà được phục vụ bởi một worker process. Bất kỳ một thư mục web hoặc thư mục ảo có thể được gán để trở thành một application pool.

Mỗi ứng dụng trong cùng một application pool chia sẻ cùng worker process.Bởi vì mỗi worker process điều khiển như là một instance riêng lẻ của worker process thực thi đó, worker process mà phục vụ cho một application pool được tách riêng từ worker process đó để phục vụ cho cái khác.Mỗi worker process riêng lẻ cung cấp một tiến trình để mà khi một application được gán đến một application pool, những vấn đề trong những application pool khác không ảnh hướng đến đến application đó.Điều này bảo đảm rằng nếu một worker process lỗi, nó không ảnh hưởng đến application đang chạy trong những application pool khác.
Đọc tiếp »

Vấn đề download tập tin .EXE trên IIS 6.0 có cài đặt UrlScan Security Tool

Gần đây mình thấy có rất nhiều câu hỏi trên mạng về việc thực thi hoặc download tập tin .EXE tren web server IIS 6.0.
Nhưng tất cả các câu trả lời đều không thoả đáng và rất mơ hồ.Nên mình viết bài này
“MẶC ĐỊNH IIS 6.0 CHO PHÉP DOWNLOAD TẬP TIN .EXE VÀ MỘT SỐ TẬP TIN CÓ PHẦN MỞ RỘNG KHÁC.”

Khi duyệt một vị trí web nào có tập tin có tinh thực thi thì sẽ xảy ra những hành động sau đây,phụ thuộc vào thiết lập trên IIS cho vị trí đó

Đọc tiếp »

UrlScan Security Tool 2

Thiết lập URLScan để bảo mật những ứng dụng web asp.net
Thiết lập URLScan bật những ASP.NET file name extensions chuẩn mà người dùng thường yêu cầu

Mở tập tin Urlscan.ini trong thư mục \windows\System32\Inetsrv\Urlscan\
1.Cho phép
Trong AllowExtensions thêm những extensions chuẩn theo sau

* .ashx
* .aspx

Đọc tiếp »

UrlScan Security Tool 1

UrlScan version 2.5 là một công cụ bảo mật dùng giới hạn những kiểu yêu cầu về HTTP mà IIS Internet Information Services sẽ xủ lý.
Với việc chặn những yêu cầu HTTP chỉ rõ UrlScan security tool giúp ngăn chặn những yêu cầu có tính phá hoại đến server
UrlScan 2.5 dùng cho cài đặt trên servers chạy IIS 4.0 trở về sau.

1.UrlScan Security Tool cung cấp thêm 3 tính năng mới sau đây mà các phiên bản trước không có
* Changing the log file directory
* Logging long URLs
* Restricting the size of requests

Đọc tiếp »

Application Pool Health (IIS 6.0)

Important

This feature of IIS 6.0 is available only when running in worker process isolation mode.In worker process isolation mode, application pools can be configured to monitor the health of their worker processes as well as the health of the entire pool. Monitoring the health of a worker process includes detecting that the worker process is not able to serve requests and taking appropriate action. For example, if a worker process fails to respond to a ping request by the World Wide Web Publishing Service (WWW service,) the worker process probably does not have threads available for processing incoming requests. When this happens, the WWW service will either terminate the worker process, or release the worker process and leave it running, and start a new worker process to replace it. An administrator can pre-configure an action to take when an unhealthy worker process is released, such as attaching the worker process to a debugger.

Đọc tiếp »

Cài đặt IIS 7.0

Bài này sẽ giới thiệu những vấn đề cơ bản về cài đặt Internet Information Services 7.0 và một số chế độ cài đặt khác có sẵn khi có thể sử dụng và những lợi ích thu được từ chúng.

Web Server IIS 7.0 có thể được cài đặt theo hai cách khác nhau với Windows Server 2008

  • Như một phần trong chế độ Core Server, nơi mà IIS 7.0 được cài đặt như một trong những Server Role.
  • Cách thông thường thông qua giao diện GUI, nơi mà IIS 7.0 được cài đặt như một trong những Server Role.

Như đã nói trên, bài này sẽ giới thiệu các cài đặt cho IIS 7.0 trên Windows Vista. Ở phần cuối của bài sẽ giới thiệu đến việc cài đặt không giám sát của IIS.

Đọc tiếp »

Thêm .FLV MIME vào IIS webserver

Định dạng .flv tở ra ưu việt và trở lên khá phổ biến. Khi bạn up file .flv lên web chạy OS Windows server 2003 hay bất kỳ OS nào khác nhưng nó không chạy được bạn cần khai MIME (Multipurpose Internet Mail Extensions) để server biết định dạng này.

Với IIS của windows thì khai như sau :
1) Chọn site cần khai thêm định dạng .flv trong IIS hoặc có thể khai cho cả cụm các site, bấm chuột phải chọn “Properties”
2) Bên dưới Tab HTTP Headers , chọn “File Types” và chọn “New Type”
3) Đánh “.flv” là định dạng đuôi file và content type. là “video/x-flv
4) Chọn “OK” và Restart lại IIS là ok happy

Với apache bạn cần khai thêm MIME trong file mime.types, cú pháp:
video/x-flv flv
Tương tự bạn có thể khai bất kỳ loại MIME nào khác, tham khảo định dạng của các loại MIME tại :
MIME Reference

You are not authorized to view this page

You are not authorized to view this page

You do not have permission to view this directory or page due to the access control list (ACL) that is configured for this resource on the Web server.

—————————————————————————————-

Đây là lỗi khá đơn giản khi chạy web trên IIS

Xem lại user duyệt web có bị deny hay không?

How do I configure FTP in IIS?

One of the most common, and simplest way to upload information to your server is through FTP (File Transfer Protocol). This allows a user to connect to a specific location on the server without having full access to the server. FTP users can be created with read and/or write access. FTP users can be configured on the server through IIS.

To configure an FTP site in IIS, please follow these steps:

Đọc tiếp »

“Unexpected Error 0×8ffe2740 Occurred” Error Message When You Try to Start a Web Site

“Unexpected Error 0×8ffe2740 Occurred” Error Message When You Try to Start a Web Site

———————————————————————————————————————————————-

SUMMARY

When you try to use Internet Information Services Manager (IIS Manager) to start a Web site, the Web site does not start, and you may receive the following error message:

Unexpected error 0×8ffe2740 occurred

Đọc tiếp »

Contention, poor performance, and deadlocks when you make Web service requests from ASP.NET applications

When you make calls to XML Web services from an ASP.NET application, you may experience contention, poor performance, and deadlocks. Clients may report that requests stop responding (or “hang”) or take a very long time to execute. If a deadlock is suspected, the worker process may be recycled. You may receive the following messages in the application event log.

Đọc tiếp »

disallowed path characters

Server.Mappath() error ‘ASP 0175 : 80004005′
disallowed path characters
/index.asp, line 2
The ‘..’ characters are not allowed in the path parameter for the Mappath method.

——————————————————————-

Enable parent path là ok liền .

How to set up an ASP.NET web site with IIS

Objective

The objective of this tutorial is to show the steps that have to be followed in order to set up an already created ASP.NET web site with IIS 5.0/6.0 web server.

Pre-requirements

In order to follow this tutorial, you have to meet the below conditions:
- IIS 5.0/6.0 web server installed on your PC
- .NET 2.0 framework installed on your PC
- ASP.NET web site that will be published with IIS web server

Please make sure that .NET 2.0 framework is installed after the IIS web server is. If you first installed the framework, please use the below command line:

C:\[WinDir]\Microsoft.NET\Framework\[Version]\aspnet_regiis.exe -i

Đọc tiếp »