?
Solved

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

Posted on 2008-10-23
8
Medium Priority
?
919 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 750 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

771 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