Solved

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

Posted on 2008-10-23
8
797 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
  • 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
 
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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:dinudany
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now