Solved

I get error that the file does not exists, but it does.

Posted on 2008-10-23
8
855 Views
Last Modified: 2012-05-05
Hello

I get this error every once and a while. The errors come in bulks. For example I get 10-15 errors in 5 seconds, then the error disappear and may not come back for a couple of days.

---
Error Message: The file '/mypage.ashx' does not exist.
Stack Trace:    at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
   at System.Web.UI.SimpleHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-----

---
0
Comment
Question by:Brimba
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 4

Author Comment

by:Brimba
ID: 22793765
There were no recycling or application restart during the period of the errors.
0
 
LVL 10

Expert Comment

by:jinn_hnnl
ID: 22794148
'/mypage.ashx is that the file name ascx or aspx?

I have several times met this kind of issues, it just the IIS or VS setting screw up for some reasons. Especially when you render the usercontrol dynamically, and when you refer to the non-dot net oriented path. (let say dot net prefers this ~/folder/name.aspx, if you goes: ../folder/name.aspx then it doesn't like much.

This shouldn't happen after you publish your websites. Normally I close everything stop dot net development (laid on the system tray when you debug).

I agree this is odd.

JINN
0
 
LVL 4

Author Comment

by:Brimba
ID: 22794394
mypage.ashx is a httphandler.

I have this in web.config
<httpHandlers>
<add path="mypage.ashx" verb="POST,GET" type="myHttpHandlers.Merger, myHttpHandlers"/>
</httpHandlers>

So, in fact the error is correct in that way, the file does not exist. But since we have this httphandler configured in web.config asp.net should never respond saying that the file doesn't exist.

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:jinn_hnnl
ID: 22794535
Well that's weird

machine.config
<httpHandlers>
 <add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory"/>
 <add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory"/>
. . . . . .
 . . . . . .
</httpHandlers>

look at the error again, I guess, IIS must have been configured properly. The onlything I can think of is your mypage.ashx failed during complication (which unncessarily means the code is wrong, it's just failed to compile or render at runtime). IIS then refuses to map your file the the associated extension and handler.

What I do is odd, but I restart everything :(.

Another time when we worked with rails extension, we accidently remove one of our handler mapping extension and it took me a while to figure out we have to add it again.

(just incase you want another reference, here how you add new extension)



Extension-mapping-IIS.JPG
0
 
LVL 4

Author Comment

by:Brimba
ID: 22819574
I dont know how this can help me.
Since the problem only exists for a ouple of minutes and without making a restart or anything it goes away for days.
0
 
LVL 10

Accepted Solution

by:
jinn_hnnl earned 250 total points
ID: 22820165
Yes, I agree this is odd, but this is IIS and Dotnet Framework problems, we have to live with that. As I said, at some states, IIS just fail to compile and map your handler in a proper way.

This is really annoying. May be you can report to these Ms people for fixing what really going on

JINN
0
 
LVL 4

Author Comment

by:Brimba
ID: 22832016
ok, thanks.
0
 
LVL 2

Expert Comment

by:Dinesh Subramanian
ID: 35250101
The ashx isn't a page, it's a mapping. For the sake of anyone else having issues with this, the problem was a configuration problem in the web.config. IIS 7 requires that the handlers are declared in 2 different sections: system.web and system.webServer. I was missing the declaration in system.webServer.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question