why default.aspx is automatically attached to url?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I am little confused but at some point, this was not the case when I installed nopCommerce. But after last week, it always generate a postfix with "/default.aspx" for any url that is not ending with ".aspx" I thought it was iis setting but when I tried nopCommerce demo, the same thing happens. To test it, just type "http://demo.nopcommerce.com" on address bar of your web browser and it will add "/default.aspx" at the end, I suspect this issue prevents developer from using jquery ajax and other useful tools.

Anyone know how to fix this issue??
13 years ago
I haven't looked into this, but I have noticed it. I believe that this is so that anyone who happens to come across a non-existing page on your site will be redirected to something else... or something like that. It may be a setting in the web.config file or something.

I do know that it has not prevented me from using ajax or jQuery or any of that, though I have no tried to use a web service with nopCommerce...
13 years ago
Well, after messing with this a couple of days, I found that this is because of DefaultPage attribute in UrlRewritingNet library. Although NopCommerce authors know about the exact reason for this - I really hoped it was documented somewhere -, but I would like to know the reason because this behavior is totally unnecessary for certain pages.  For now, I removed the attribute although I don't know about the implication.
13 years ago
how to fix the problem?
it's big problem for extra dev.
thank you very much.
13 years ago
statcom wrote:
To test it, just type "http://demo.nopcommerce.com" on address bar of your web browser and it will add "/default.aspx" at the end

It's caused by our IIS version. It's IIS 6.0 and it always adds "default.aspx". It'll not be added fi you're using IIS 7.0 (or above)
13 years ago
I'm getting this too...I contacted my host (Arvixe) and I am on II7 and they do not know why it adds default.aspx all the time either.

I get this in my error logs:

Log type:  Unknown  
Severity:  11  
Message:  The file '/category/12-toddler-12m-2t/default.aspx' does not exist.  


Thoughts?

Thanks
13 years ago
As I said, the issue's less related to IIS than to UrlRewritingNet library NopCommerce is using.  To fix the problem,
find UrlRewriting.config and remove DefaultPage attribute in the corresponding element. The problem will go away. Hope it helps.
12 years ago
Thank you for this! I was going crazy!

We use Reverse Proxying with Content Rewriting to load a wordpress blog from a backend apache server to /blog on our Nop site (we just migrated to Nop last night). The forced display (and its rewrite rule), of default.aspx was wreaking serious havoc with our apache .htaccess rewrite rules.

Thanks for pioneering this question and solution! I just wish I had searched "nopcommerce default.aspx" on google last night: I would have been a better hero to have had this operational this morning. :-)

Dan
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.