ASP.NET 1.1 Error: System.Xml.XmlReader is inaccessible due to its protection level

July 30th, 2007 by Joe

imageWhile recompiling an ASP.NET 1.1 (legacy) application recently I was met with a series of errors that “System.Xml.XmlReader is inaccessible due to its protection level” (along with other System.Xml related messages). I couldn’t find a good answer to why I would be getting an error like this searching online, so I figured I’d share what I found in the hopes that I someone else having the same problems won’t have to dig as deep as I did.

imageBackground: This is a legacy ASP.NET 1.1 solution that I need to support in a Virtual Machine development environment. We lost the VM that the solution was developed on but had a copy of the source code backed up. I created a new solution in Visual Studio.net 2003 and dropped all the files into the solution (including those in folders). When I tried to run the app I was met with 13 build errors regarding System.Xml inaccessibility.

imageSolution: Looking at the references I noticed that System.Xml was missing. Right-click References and click Add Reference. Find System.Xml.dll from the list, double-click it (to move it to the Selected Components) and click OK.

Even thought the .cs codebehind file had the appropriate “Using” statement, the reference to the corresponding .dll was required.

Hope it helps!

Posted in ASP.NET

2 Responses

  1. Michael

    Joe, thanks for the easter egg! Was trying to get a legacy app working today and couldn’t open the project, so just renamed the .proj files and recreated teh app. But when I added the old project files into the new project, I also got this error. Googled and found your explanation, project was back online in minutes. Thank-you for taking the time to post your findings for others –Michael

  2. Joe

    Glad I wash able to help out! That’s one of the main reasons I have my blog, to post the problems and fixes that I’ve found in my wanderings!

    Thanks for the visit! Don’t be a stranger! :)

    - http://www.JoeLevi.com

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

About Greener Living thru Technology

JoeLevi.com is the personal web log of Joe Levi -- an ASP.NET Web Developer by trade and by hobby. Joe's love of technology isn't just limited to the web, he's also interested in green and environmentally friendly technology and technological solutions. If it has to do with technology, improving the quality of life, geek humor, tech politics, self-defense, environmental stewardship, or anything related, you'll probably find it at www.JoeLevi.com.

Site statistics:
Average: ~1.3 P/V; Visits: ~3,000; Pageviews: ~3,600; Google PR: 4; TechnoratiAuthority: 17; Technorati Rank: 487,964





Watch the latest videos on YouTube.com