URL rewriting stopping .ashx errors? Please respond!

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
moopa
Lieutenant (LT)
Lieutenant (LT)
Posts: 59
Joined: Tue May 13, 2008 10:11 am

URL rewriting stopping .ashx errors? Please respond!

Post by moopa » Fri Mar 06, 2009 6:27 am

I can type mysite.com/anything.ashx and i do not get a 404.
I am trying to debug my handler and even forcing an exception shows no error in the browser.

Is it possible to turn rewriting off? Would there be something else that would be doing this?
All the other sites on the server will show exceptions in the browser and 404 on ficticious .ashx files.

Thanks

User avatar
moopa
Lieutenant (LT)
Lieutenant (LT)
Posts: 59
Joined: Tue May 13, 2008 10:11 am

Re: URL rewriting stopping .ashx errors? Please respond!

Post by moopa » Fri Mar 06, 2009 6:50 am

I have turned off rewriting and i have the same issue.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: URL rewriting stopping .ashx errors? Please respond!

Post by jmestep » Wed Mar 11, 2009 10:30 am

I don't know the answer, but I think it is pretty complicated in .net and might have to do with http handlers. You might search Google on that subject.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: URL rewriting stopping .ashx errors? Please respond!

Post by Logan Rhodehamel » Wed Mar 11, 2009 11:29 am

Perhaps are custom errors defined in the web.config?

Code: Select all

	<system.web>
		<customErrors mode="On" defaultRedirect="~/Errors/GeneralError.aspx">
			<error statusCode="404" redirect="~/Errors/PageNotFound.aspx" />
		</customErrors>
This can mask the expected behavior.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
moopa
Lieutenant (LT)
Lieutenant (LT)
Posts: 59
Joined: Tue May 13, 2008 10:11 am

Re: URL rewriting stopping .ashx errors? Please respond!

Post by moopa » Wed Mar 11, 2009 4:58 pm

Thanks for the response.
I must stress that aspx shows errors fine.
I have turned off able rewriting and nothing like ClearError() in the global.asax.

Can someone else try going to anything.ashx on their dev server and seeing if u get the same?

Thanks

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: URL rewriting stopping .ashx errors? Please respond!

Post by nickc » Wed Mar 11, 2009 5:16 pm

I get default.aspx?aspxerrorpath=/anything.ashx (what I expected).

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: URL rewriting stopping .ashx errors? Please respond!

Post by jmestep » Thu Mar 12, 2009 6:10 am

On my test site, I don't have customErrors set to On, so I don't get the redirect, but I do get it with a site where customErrors is set to On.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: URL rewriting stopping .ashx errors? Please respond!

Post by Logan Rhodehamel » Thu Mar 12, 2009 10:56 am

moopa wrote:Can someone else try going to anything.ashx on their dev server and seeing if u get the same?
On my install I have URL rewriting on and custom errors off. I access anything.ashx and it returns HTTP 404.

To troubleshoot, you might want to do something like rename your web.config, then see if you can get 404. If so, then create a new web.config file and start adding pieces back in until you determine where the problem is originating. If renaming the web.config does not fix the problem, then it would seem to indicate it's something with the webserver setup.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
moopa
Lieutenant (LT)
Lieutenant (LT)
Posts: 59
Joined: Tue May 13, 2008 10:11 am

Re: URL rewriting stopping .ashx errors? Please respond!

Post by moopa » Mon Mar 16, 2009 8:16 am

Hi all.

Thanks for the response.

I have setup a new local dev version of the site and i also get the correct behaviour (on an XP box).
Strangely this issue is only affecting our Win2003 64bit dev server. I have no idea why but at least i can locally debug now :)

Best Regards

Post Reply