VS 2010 fails debugging: HttpException invalid file name for file monitoring in LoadControl

Viewed 5947

I've really been struggling for days on this matter.

I have migrated a asp.net 3.5 project in VS2010 to a asp.net 4 project. Everything worked fine for several weeks.

Somehow, I get a strange error since a few days. To clarify what this project looks like:

The Application

It's a UserControl based application and the app areas are composed of nested UserControl Hierarchies, that load their children Controls in OnInit(), in order to get the event system to work.

(Note: everything works great in VS2008 and .net 3.5!)

The Error

Now when I start debugging the webapplication in VS2010, sometimes (!!!), a HttpException is thrown, with the message:

Invalid file name for file monitoring.

in LoadControl()<- and now it gets interesting, the parameter for LoadControl is a ~/ prefixed UserControl-Path eg. ~/Controls/Home/Partial.ascx BUT in the Exception it is shown as a Directory, somewhere in the Controls Directory.

Probably VS uses such an approach to internally track changed files to reload?

Has anyone encountered the same issue? If so, have there been any solutions?

Edit: when deploying the webapplication, the error vanishes. It only occurs when debugging. I have currently disabled HttpExceptions in the debug->exceptions menu. But i would be very glad to catch those again too ..

3 Answers
Related