Unrecognized attribute xmlns解决办法_.NET_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > .NET > Unrecognized attribute xmlns解决办法

Unrecognized attribute xmlns解决办法

 2011/12/1 8:39:59  chenhsong  http://chenhsong.iteye.com  我要评论(0)
  • 摘要:SymptomsWhenusingVS.NETWebDeveloperExpressEdition,youmayhaveasitethatcompilesfineinthedevelopmentenvironmentbutfailswhenyoucopyittothelocalIISserver.CauseASP.NET2.0isnotthedefault.NETversionusedbyIIS.ItworksinthedevelopmentenvironmentbecauseVS
  • 标签:解决办法 解决 XML

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.

发表评论
用户名: 匿名