What's the problem in the category.aspx file when I publish.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 лет назад
HELLO. ADMINI

I found that the category navigation on the homepage has some problem, like this:
when i click the product category link, it's URL is http://localhost/category/1-boy.aspx, in fact. "category/1-boy.aspx" is a page name, not a URL, it  spared by '/' string, So on my web hosting provider, it doesn't work, the error is 500 page not found. but on my local server, it can run. what's problem with it? is the code error or web hosting configure error?
can I change the spare string '/' to any other charter instead in the dbo.not_setting table?


Anyone who knows, please do me a favor? thanks.
13 лет назад
did you setup the store name in global settings?
13 лет назад
deccks wrote:
did you setup the store name in global settings?


I didn't setup de store name, the store name is use default. and is it direct to this result?
I public it on my local server, it's normal, but public on web hosting server, it ran error. I trace the code page URLrewritemodule.cs, the filed of table[dbo.nop_setting] in  'SEO.Category.UrlRewriteFormat' parameter is '{0}Category/{1}-{2}.aspx'. when I click the catetory link, it changed to '~/Category.aspx?CategoryID=2&' by'RewriteURL()' method.  so it can ran rightly on local server. Is there any setting I haven't config?
13 лет назад
{0}Category/{1}-{2}.aspx

When you setup your store, nopCommerce will place your store name in the {0}, it will place the ID of the category in the {1} and the name of the category in the {2}.  Your store name should be setup like: http://www.yourstore.com/
13 лет назад
deccks wrote:
{0}Category/{1}-{2}.aspx

When you setup your store, nopCommerce will place your store name in the {0}, it will place the ID of the category in the {1} and the name of the category in the {2}.  Your store name should be setup like: http://www.yourstore.com/


I know what you write, and I aslo set the store name and store url, It can open the homepage, but when I click category href, then it can't ran, throw error "file not found. "  you know the file 'yourstore/category/1-manshoe.aspx' dosn't exist in physcial path. is virtual path which is handle by urlReWritting.config. but I don't know how  it work. so I guess the problem maybe come out from here.

the problem hasn't solved. Thank you all the same.
13 лет назад
I have never had virtual URL's work on my local machine.  I have better luck with them when I upload the application to the web server.
13 лет назад
deccks wrote:
I have never had virtual URL's work on my local machine.  I have better luck with them when I upload the application to the web server.


the problem has benn solved lunckly.
I read some teachnique article from internet.  It casued by URL Redirect. if you dont't config the IIS correctly, it will cause this problem: 404 page not found. the configure on IIS is like this: right click your website->property(r)-->virtual directory tag-->configure-->app mappings-->select the .aspx extension-->EDIT-->check the files if exist(don't selected)   this is the key point, if you select the option"check the files if exist", then the problem will produce.

That is reason why the problem does not appear on my local server while appear on web hosting service, because the web hosting provider change this configure(default is not selected). if this option is selected, the page like:\category\1-manshoe.aspx will be check when it being redirect. but this file is not a physcial file. it is only vir url which is produce by regex. so IIS will just throw the 404 page not found. that is my analyse.

Deccks. Thanks you all the same.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.