Monday, October 27, 2008

ASP.net Application generating "Parser Error", and unable to find it's underlying object?

This is one of those things that is talked about heavily online--but I hadn't found anything to fix my specific problem. I had a working application that I was able to publish to my development box without any difficulty. I'm just starting to play with web applications, and I can't see to publish to my application server yet, so I took the final product and copied it to it's own folder under wwwroot on the app server.

Every time I went to the app, it said that it couldn't load it's base object. The application DLL was in the application's BIN folder, and I knew it worked. All of the posts I found referring to the error were essentially the equivalent of "Well, did you turn it on?" I was looking for something a little more intelligent.

It turns out that, if you don't use Publish, you have to create the application as well as the folders. Go into IIS Management, find your folder, right click it, and click Properties. Odds are, "Application Name" is set to Default Application, and it's grayed out. Click the Create button, and it will create a new application (named for the folder). This will cause IIS to look in that folder's BIN folder for the DLL, like it's supposed to.

No comments: