I'm running IIS 7.5 on Windows 7. My ASP .NET application uses a VirtualPathProvider. Most of the files (aspx pages) are returned and rendered fine by my VirtualPathProvider. Static files (css/images) are not. They yield a HTTP 404 error if I try to browse to them directly (or if they're referenced by my virtual aspx page)
I've verified my web.config has the correct handler registered for static file types.
What's weird is this:
If I try to browse to a non-virtual gif file (one that actually exists on the file system under the website root), it renders fine.
If I run using WebDev in Visual Studio instead of IIS, the virtual gif files render fine.
In debug mode, in
VirtualPathProvider.GetFile
, I can SEE my VirtualPathProvider returning a perfectly valid instance of my virtual gif file right before the page returns the 404 error...so I know my VirtualPathProvider is working just fine.
NOTE, when I say IIS, I don't mean in a deployed environment. I just mean switching the project settings to use IIS instead of WebDev.
Any ideas?
Thanks.