This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.
Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.
Before posting questions here you might want to review the developer documentation.
Hi,
I am using 2.4.0.3 of the mojoPortal in which I am facing a problem with handling 404.
If I will enter URL like http://mydomain/nopage.aspx which does not exists then it properly navigates me to Page Not found and this page has default site skin also, but when i enter a URL like http://mydomain/nopage (without .aspx) then I get crash with error "HTTP Error 404.0 - Not Found".
So I want to redirect user to Page Not Found in both the cases (page with .aspx andwithout .aspx).
so how can I achieve this?
Thanks,
Dilip
I have resolved this problem using below code which is added under <system.webserver>
<httpErrors errorMode="Custom" existingResponse="Replace"> <remove statusCode="404"/> <error statusCode="404" responseMode="ExecuteURL" path="/pagenotfound.aspx"/> </httpErrors>
And this is useful for IIS7 and above only, it will not solve problem for IIS6.
Nice one - this also solved a similar problem for me on 2.4.0.8.
On my site, with extensionless URLs, entering a bad url without aspx gave a standard 404, and entering a bad url ending in .aspx crashed the site (which I think is the opposite of what you had). This was on Server 2008 R2, .Net 4.5, Integrated app pool.