OpsanBlog

Michael Coates - Microsoft Pragmatic Evangelist

My Latest Tweet
    Follow my Tweets

    MIX10

    Posted with:
     Windows Live Writer
     Download Live Writer

    My Windows Live Local Collections:
     Las Vegas
     Los Angeles
     San Jose
     Seattle
     Washington, DC
     My Walks

    Article Categories

    Archives

    Post Categories

    Bloggers

    Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition

    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.

    posted on Sunday, August 21, 2005 9:35 AM

    Feedback

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 11/4/2005 9:35 AM Paul Campbell

    Legend!

    Thanks man - very helpful

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 11/7/2005 8:36 AM Raj

    (FORGOT TO ADD THIS: PLEASE EMAIL ME AT raj@rhealsoft.com or raj@xtremebiz.biz if you have a solution for this)

    hi,

    can you help me with this:

    i have an asp.net 1.1 application folder inside an asp.net 2.0 application folder.

    although i have set iis to run the 1.1 application folder under asp.net 1.1 dll, when i try to access my 1.1 application, i get the same xmlns runtime error.

    this is happening because asp.net 1.1 first tries to read the web.config of the upper level folder which infact is 2.0 application's web.config file and so it cant recognize this. is there a work around for this

    thanks in advance,
    raj

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 11/7/2005 10:14 AM opsan

    That is really interesting; can you run a 1.1 application inside a 2.0 folder? Is the 2.0 folder a virtual directory? If so, I -think- it'd be recognized as a 2.0 application.

    That said, what is your need to have a nested 1.1 application? If you run the 1.1 application in it's own 1.1 folder, does it function alongside your 2.0 environment? I would expect IIS to support that.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 11/10/2005 7:34 AM John Doe

    Can't you just add a new web.config file in the ASP.NET 1.1 directory? It should use that file rather than the root web.config.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 11/10/2005 8:09 AM opsan

    Great suggestion; does that work? I seem to recall being able to assign custom .config files rather than the standard web.config, which might also allow.

    I guess I don't quite understand the problem space; maybe Raj can enlighten us.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 11/10/2005 8:16 AM adam

    Thanks a bunch. You are a real life saver.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 11/18/2005 6:20 AM Chris

    Thank you very much, I was getting quite frustrated with this error!

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 11/26/2005 3:34 AM Jim Sneeringer

    I have the same error message, but there is no ASP.NET tab. When I look under C:\WINDOWS\Microsoft.NET\Framework, there is no folder for .NET 2.0, but when I try to reinstall .NET 2.0, it tells me it is already installed. I went to Add/Remove programs to try to uninstall, but only 1.0 and 1.1 are there.

    Anyone have any ideas?

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 11/26/2005 4:05 PM opsan

    It does sound like .NET 2.0 is not installed; is it possible you installed a beta version at one time or another?

    Are there any other post-.NET 2.0 programs installed? WinFX beta, perhaps?

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 11/30/2005 2:02 PM Matthew Parker

    Thanx for the help, solved my problem

    # Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 12/18/2005 12:48 AM Anil Kumar

    Iam using XP O/S with
    .NET Framework 1.1 Configuration

    (version 1.1.4322.573

    An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Unrecognized attribute 'xmlns'

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 12/18/2005 8:55 AM opsan

    Anil, if this is request for assistance, this article covers your issue. Please step through it and advise if it doesn't resolve the problem.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 12/19/2005 1:53 PM unfrustrated

    It worked, thanks!

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 3/8/2006 5:19 AM Taj

    Thanks

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 4/15/2006 8:23 AM Thiru

    Amazing post....i searched for two days to fix this problem.....great...thanx...

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 5/11/2006 8:30 AM Daniel

    Strange! When I follow the advise and change the ASP.NET version under the ASP.NET tab of the Default Web Site Properties from 1.1 to 2.0 this does not have any effect. Instead, after restarting IIS the ASP.NET version is switched back to 1.1

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 5/11/2006 8:48 AM Daniel

    Found the reason!
    When restarting IIS the ASP.NET version seems to be switched to 1.1 whenever there is at least one application that is set to 1.1

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 5/15/2006 8:39 AM Andrea

    Thanks!!! Very Helpfull

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 5/29/2006 4:36 AM Sarfaraz Baldiwala

    Hi,all
    The solution worked out. Thanks

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 6/16/2006 7:49 AM puja

    Thanks! Worked after setting to ASP.Net 2.0

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 7/20/2006 2:59 PM FEVuser

    Sorry,

    i tried everything mentioned in this thread:

    for me it won't work.

    I have a hibernate config section in the web.config file; i setted IIS to 2.0 (+ restart) i get the same error.
    when i cut out the "xmlns"-tag, i recieve ""Unrecognized element."

    Any idea ?

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 8/22/2006 3:27 AM mcg

    good man - thanks for the tip!

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 9/13/2006 7:44 AM shoge

    Its good , I had the same issue and its working now

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 9/15/2006 10:04 AM Brandon

    Thanks a ton. This solved my issue.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 9/18/2006 8:11 AM PJ

    Since there are some quite recent comments here, I'll add my two-pennorth:

    Thanx for this - but I can'tell whether it's helped, as, updating to ASP 2.0 gives another, bigger error (so my error is bigger than yours!)

    I get

    Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

    The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.

    Various fiddles using aspnet_regiis (as suggested by oth bloggers) don't seem to work.

    Any suggestions?

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 10/13/2006 10:12 AM robert fisher

    That was my issue.

    Thanks.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 1/14/2007 3:16 AM Doug P

    If you don't have the asp.net tab then it might just be that you had IIS manager open before you installed .NET 2.0 and haven't restarted it... That's what happened to me. The advice in this thread was a great help. Thanks.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 1/31/2007 7:44 AM Donovan Buck

    Thanks for that tip Doug P (that slap you just heard was my hand hitting my forehead)

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 2/20/2007 9:24 AM Nelman

    Thanks for the help. I was having the same issue with a personal website and the above solution worked. Thank you!

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 2/26/2007 7:14 PM SWSS

    Thanks for the help your a Legend!

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 3/1/2007 12:11 AM Lata

    Thanks .....U are Master.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 3/1/2007 6:34 AM Ichi Olocco

    Excelent! Thank a lot!

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 4/9/2007 11:22 AM harikrishna p

    thanks it works

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 4/17/2007 3:24 AM secure email

    Yep, that work. Was under the assumption that IIS is getting it automatically. Using normally HELM to administer all my sites and forgot to switch ont the ASP.NET 2.0 Checkbox.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 4/18/2007 6:30 AM WillC

    So simple - many many thanks!

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 5/28/2007 4:03 AM Johnny

    Nice!! Jackpot!

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 6/12/2007 3:20 AM Dipesh

    i am having the same problem the web server is on 2.0 but i still get this error "Unrecognized attribute 'xmlns'. Note that attribute names are case-sensitive." i dont even have 'xmlns'in the web.config file please help... :0(

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 6/19/2007 1:57 AM KiranSabinkar

    Thanks. It works.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 6/22/2007 2:04 PM TexasPRd

    I'm in VS2005, but not using IIS. I've been using the ASP.Net Development Server. How can I get around this problem in my environment? Thanks!

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 1/1/2008 3:24 AM irwanmohi

    i have try your solution, but i still can`t fix the issue.

    thanks

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 2/19/2008 4:00 AM Kj

    Thanks a lot man. You saved me a lot of time.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 4/25/2008 7:43 AM Srikanth

    Go to your Dotnet 2.0 framework directory for example: "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" and run aspnet_regiis /i command this will resolve your problem.

    Srikanth

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 7/30/2008 8:09 AM ana

    Very useful. Thanks.

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 9/9/2008 11:17 PM Vijay

    Thanks a lot

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 9/12/2008 4:05 AM Beladev

    Thank you ..

    # re: Unrecognized Attribute 'xmlns' when working with VS.NET Express Edition 11/20/2008 4:04 AM Waqar Ahmad

    i have same problem, but i cant set asp.net version to 2.0 as my application work with 1.1. it is developed using .Net 1.1. so i m still facing same problem. if i set my asp.net version to 2.0 this problem is solved but it generate an other error "Can Start debugging on web server" i m using vs 2003
    can some one help me.

    # cassini vs IIS | hilpers 1/21/2009 6:40 AM Pingback/TrackBack

    cassini vs IIS | hilpers

    Title  
    Name  
    Url
    Comments   

    The opinions expressed herein are my own and are not intended to represent those of my employer.