星期二, 4月 05, 2011

[Asp.Net] 重新註冊IIS .NET Framework

以下程式碼為簡單的範例:請自已修正安裝的.net framework路徑

REM This batch file addresses "Server unavailable" error
@echo off

REM "Changing to the Framework install directory"
cd /d C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

echo "Stopping IIS"
iisreset /stop
echo "----------------------"

echo "Stopping the ASP.NET state service if it is running"
net stop aspnet_state
echo "----------------------"

echo "Re-registering ASP.NET"
aspnet_regiis -i
echo "----------------------"

echo "Restarting IIS"
iisreset /start
echo "----------------------"

沒有留言:

張貼留言

留個話吧:)