Reload the current page in angula6 with MVC - model-view-controller

when we reload the current page(angular6), i got the below error.
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /chapters/chapters
Please help me.

Can you please elaborate a more?
Because if the route is correct and component is correctly defined in routing, then it shouldn't be throwing an error.
Server Error in '/' Application. The resource cannot be found. Description: HTTP 404.
Its clearly saying that route is not found. Please check the routing file.

Related

Spring JAX-RS: End point not working

I followed the same steps defined in this post: https://java2blog.com/restful-web-services-jaxrs-crud-example/#comment-11493 . I did not change any file in my local yet. But finally, http://localhost:8080/JAXRSJsonCRUDExample/rest/countries saying 404 issue. http://localhost:8080/JAXRSJsonCRUDExample/ is showing “Hello World” in the browser.
If the below is working, then configurations are correct
http://localhost:8080/JAXRSJsonCRUDExample/
and then the below url giving 404 issue(file/resource not found)
http://localhost:8080/JAXRSJsonCRUDExample/rest/countries
this means no service is matching with the above url.
please check the path properly (add #Path("") in respective method if needed)

Custom error handling

I am developing a component in joomla 2.5, my component sends a request to some url and gets the response object. If i pass wrong url, joomla takes me to the default page of Error : 500 - No response code found . I want that if user install my component and mistakenly they put wrong url , it should show some custom error message/page which should more meaningful to non-programming person rather than taking user to default error page. Is there some way to add this type of functionality in Joomla without editing template/error.php file in core.
You should have an error.php file in your template, if you don't add one and make it look the way you want. also remember that when you turn debugging off you won't get the stack trace etc.
However error 500 indicates something different than that the url does not exist ("wrong URL"), which would be a 404. 500 is an internal server error and you need to check your logs to figure out what is causing it.

ASP.Net MVC Remote Validation submitting incorrect URL

I am following this walkthrough on how to implement Remote Validation. The remote validation method fires when expected, but it is requesting the wrong url. It is requesting
/Validator/IsUID_Available
instead of
http://localhost:23615/Validator/IsUID_Available.
This results in a 404 not found error. What am I missing?
Sorry my bad! I was registering the Remote attribute incorrectly as follows:
[Remote("IsUID_Available", "ValidationController")]
instead of the correct way like this
[Remote("IsUID_Available", "Validation")]
I would venture to say that your url is correct. Its just giving a relative url which should resolve correctly. I'm guessing you have something wrong with your controller or you haven't registered your controller in your routes table correctly.

MVC3 using nHibernate

I have an MVC3 project using nHibernate, Rhino and Castle. I finally got all of the components in place. I think. At least it runs and invokes the IWondsorContainer CreateContainer() method....after that method, the Application_Start does not fire and I get the message:
Server Error in '/' Application.
--------------------------------------------------------------------------------
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Views/Proposal/Index.cshtml
Any ideas? I don't know what to make of this. Thanks
You seem to be requesting a view directly: /Views/Proposal/Index.cshtml. In ASP.NET MVC you do not request a view. You request a controller action. So in your browser the url should be /Proposal/Index or simply / depending on how your routes are configured.
I suspect that you had the focus on this Index.cshtml when you hit F5 in Visual Studio which has this ugly habit of following the url. You could define a start url in the properties of your web project to avoid this behavior.

How to display full error in asp.net 4

I've started with an asp.net mvc 3 and I have a problem, with some error:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Movies
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
I know what it means but I know sure if it is a true.
I want to get a full Yellow Screen of Death.
Looks like there is something wrong with you routes. Check the global.asax file to see if the url paths are configured correctly
I think the routing data might not be set correctly. People often make this mistake with asp.net mvc. You can download the Routing Debugger to find out why the path you requested cannot be found.

Resources