% @Language = "VBScript" %>
<% Response.buffer = true %>
<%
Dim oFS,oFSPath
Dim servername,serverinst, path
Dim oDefSite,sDefDoc,sSitePath,sDocName
Dim aDefDoc
Dim success
Dim infoobj, administ
Dim bind,binditems,port,adminURL
adminURL = ""
success = false
Set infoobj=GetObject("IIS://localhost/w3svc/info")
Set administ= GetObject("IIS://localhost/w3svc/" & infoobj.AdminServer)
bind = administ.ServerBindings(0)(0)
binditems = split(bind,":")
port= binditems(1)
adminURL = "http://localhost:" & port & "/"
Set oFS=CreateObject("Scripting.FileSystemObject")
servername=Request.ServerVariables("SERVER_NAME")
serverinst=Request.ServerVariables("INSTANCE_ID")
path = "IIS://" & servername & "/W3SVC/" & serverinst
Set oDefSite = GetObject(path)
thisURL = oDefSite.ADsPath & "/Root" & Request.ServerVariables("URL")
if instr(thisURL,"localstart.asp") > 0 then
thisURL = Mid(thisURL,1,instr(thisURL,"localstart.asp")-2)
end if
Set oDefSiteRoot = GetObject(thisURL)
'Get the default document for this site...
sDefDoc = oDefSite.DefaultDoc
sSitePath = oDefSiteRoot.Path
'parse through the default document string
aDefDocs = split(sDefDoc,",")
'and make sure at least one of them is valid
for each sDocName in aDefDocs
if oFS.FileExists(sSitePath & "\" & sDocName) then
if InStr(sDocName,"iisstart") = 0 then
success = True
exit for
end if
end if
next
%>
欢迎使用 Windows 2000 Internet 服务
<% if not success and err = 0 then %>
您目前没有为用户设置默认文档。
任何尝试连接此站的用户都会收到">“正在创建的页”。
|
<% end if %>
|
欢迎使用 IIS 5.0
Microsoft Windows 2000 的 Internet 信息服务 (IIS)
给 Windows 带来 Web 计算的强大功能。
通过 IIS,您可以轻松地共享文件和打印
并为安全发布信息创建应用程序来改善您的工作。
IIS 是创建和开发电子商务业解决方案的安全平台。
IIS 也会可以轻松地将任务准则应用程序带给 Web。
含 IIS 的 Windows 2000 可以满足您以下的需要:
- 设置个人 Web 服务器。
- 在您的组内共享信息。
- 访问数据库。
- 创建一个企业 Intranet。
由于 IIS 的集成是基于 Windows 的 Internet 标准,因此使用 Web 不需要重新学习发布,管理或开发。
含有 Internet 信息服务的 Windows 2000 是在 Web 上共享信息并运行强大的应用程序的最简单的方法。
|
|
集成的管理
您可以通过 Windows 2000 计算机管理控制台,或通过脚本来管理 IIS。假如您已经安装了 Windows 2000 服务器或 Windows 2000 高级服务器,
<% if port <> "" then %>管理 Web 站点<% else %>管理 Web 站点<% end if %> 也可以用来管理 IIS。
如配置多数常用的 IIS 设置一样,您也可以在目录上单击右键,
并可以通过 Web 共享其内容。
|
|
联机文档
得奖的 IIS 的联机文档包含索引,
完整文字搜索,和按节点或单个的主题打印:
- 获得工作帮助。
- 学习服务器操作。
- 参阅参考资料。
- 查看代码示例。
|
<%
Dim WshShell, ver
Set WshShell = Server.CreateObject("Wscript.Shell")
On Error Resume Next
ver = 0
ver = WshShell.RegRead("HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Printers\DisableWebPrinting")
%>
<% If ver <> 1 or err <> 0 Then %>
|
Web 打印
Windows 2000 在一个易于访问的 Web 站点上动态地列出您的服务器上的所有打印机。您可以浏览该站点监视打印机及其工作情况。您也可以从任何 Windows 计算机通过此站点连接到打印机。
|
<% end if %>
<% err.clear %>
|
(C)1997-1999 Microsoft 公司。保留所有权力。