Unrecognized attribute 'xmlns'解决办法

Symptoms
When using VS.NET Web Developer Express Edition, you may have a site that compiles fine in the development environment but fails when you copy it to the local IIS server.

Cause
ASP.NET 2.0 is not the default .NET version used by IIS.  It works in the development environment because VS.NET compiles a virtual web server with the proper .NET version before code compilation begins.

Thinking it occurred because the virtual directory wasn't identified as an application, I created a site (called personal) that mapped to the directory I copied, but still failed.

As it turns out, 'xmlns' is a component in ASP.NET 2.0, and will generate that error when compiled on an IIS server running ASP.NET 1.1.  This is delightfully easy to fix:

  • Open Internet Information Services and navigate to "Default Web Site" (or the site you're using as your default).
  • Right click the Site icon (the one with the globe).
  • Select the ASP.NET tab.  You'll see a drop-down with the available versions (if you're getting the error, odds are, you'll see 1.1).
  • Select the proper build of ASP.NET 2.0.
  • Restart IIS.

Your page should now work.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值