如何让你发布的项目拥有VS2005 的Web Site Administration Tool

远程管理的WEB界面:    C:/WINDOWS/system32/serverappliance/web


使用VS2005开发时,在IDE 菜单中选择 Web Site -- Asp.net Configuration
    可以通过自带管理页面可视化配置你的项目。

    可是发布项目的机器上并没有安装VS2005,仅安装了framework 2.0。
    按照以下步骤即可使用此工具:   

    1. 在开发的机器上(安装VS2005)通过菜单配置你的项目,记下此时的url,我的是:http://localhost:4343/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=D:/source/TaskSystem/&applicationUrl=/TaskSystem
    2. 在目标机器上将次目录C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/ASP.NETWebAdminFiles通过IIS建立一个Application ,可以使用默认的名字,当然也可以改名,配置属性支持asp.net 2.0。
    3. 发布你的项目比如TaskSystem到C:/Inetpub/wwwroot/TaskSystem
    4. 修改上面的url,http://localhost/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=C:/Inetpub/wwwroot/TaskSystem/&applicationUrl=/TaskSystem
    5. 通过此url配置你的应用程序:) 最好把它加到收藏夹里面,就不用记了。


I have been able installed WebAdminTool for Production Servers using the following steps:

Create a virtual directory ASP.NETWebAdminFiles in IIS that point to C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/ASP.NETWebAdminFiles

Open properties windows of the new virtual directory, make sure that it is configured to run with ASP.NET 2.0, and in Security tab, uncheck Anonymous Access, check Integrated Windows Authentication.

After that, you will be able to connect to WebAdminTools using the following syntax
http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=XXX&applicationUrl=/YYY
in my case, it is:
http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=D:/Tasks/Libranyon/Photonyon/&applicationUrl=/Photonyon

Although I don't recommend to do it, if you want to access WebAdminTool from other computer, open WebAdminPage.cs from (C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/ASP.NETWebAdminFiles/App_Code) and comment the following code block
            if (!application.Context.Request.IsLocal) {
                SecurityException securityException = new SecurityException((string)HttpContext.GetGlobalResourceObject("GlobalResources", "WebAdmin_ConfigurationIsLocalOnly"));
                WebAdminPage.SetCurrentException(application.Context, securityException);
                application.Server.Transfer("~/error.aspx");
            }
WebAdminTool still be protected by Intergrated Windows Authentication, so you still some have some defense here.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值