Friday, November 02, 2007

ASP.NET Configuration - "Unable to read the project. The device is not ready"

ASP.NET configuration is somewhat an hidden and ancient art. Recently, after setting up my new machine, and while changing projects (reconfiguring IIS home directory), one of my web projects refused to open from within Visual Studio (mind you this is Visual Studio 2003 and all of the projects are still ASP.NET 1.1).

The site was accessible from IE, and worked fine.

The error message isn't very helpful: "Unable to read the project webxxx. The device is not ready". As the machine was new, I thought that I forgot to apply some of the steps while configuring the solution. So I rechecked the entire process:

  • Validate that the directory configured in IIS is the correct one (very easy to get wrong when changing between multiple solutions, each with a Web project)
  • Validate that the site is configured for ASP.NET 1.1
  • Validate the authentication for the virtual directory (Integrated windows authentication)
  • Give the apropriate permissions to ASP.NET user in the file system (in despair I even tried giving full permissions to everyone, with no luck)
  • Remove the project from the solution and re-adding it from the web
  • Validating the site URL configuration in the webinfo file (local configuration)

So I resorted to ignorance and re-installed ASP.NET (aspnet_regiis.exe -i).

All to no avail. The web project refused to load. Googling it up, there weren't many answers (I found some forums, but they either wouldn't have any answers or were in an unknown language).

Until I found this: http://www.velocityreviews.com/forums/t112064-unable-to-read-the-project-file.html

    which resolved my problem. It states the problem and solution (removing the hidden suo file), which I should have tried as it's one of the things I do when the settings and synchronization with VSS start to get all messed up.

                          After that, you have to reconfigure the settings for the web project, so it's best to:
                        • Remove all the files from the local directory mapped by in IIS (and the directory itself)
                        • Accept the setting in VS (which should maintain your original directory and not get you into the _N suffix hell. I have seen developers getting to directory _23 in some projects)

                        1 comment:

                        Prabakar said...

                        Thanks i also have the same problem, Now i solved it with the help of u r post .. Thanks Once Again