i am trying to use cshtml with Durandal
i followed instructions on
http://bartwullems.blogspot.com/2014/03/durandaljs-enable-razor-views.html
main.js is called properly but when it goes looking for the view i get the error.
View Not Found. Searched for "views/shell" via path "text!views/shell.cshtml".
and in the console window i can see a 404 error
http:// local /App/views/shell.cshtml 404 (Not Found)
route is configured and i copied the web.config from View to App/views and the DurandalViewController is also in place.
my main.js looks like one in the example
just the last line is
app.setRoot('viewmodels/shell');
__________________________________
Structure has
App/viewmodels/shell.js
App/views/shell.cshtml
App/views/web.config
Your issue will be the routing in Asp.net.
Most likely the routing engine will be looking for shell.cshtml in http://localhost/views/shared/shell.cshtml or http://localhost/views/yourControllerName/shell.cshtml by default. You will need to add a route to tell the server side where to find the view.
Hi,
for info I had a similar issue.
Everything was working locally but when I deployed my solution to Azure Web sites I got an error:
Not Found. Searched for "views/shell" via path "text!views/shell.cshtml".
In my case it was http error 500.
Solution was to rename a file from "shell" to something else. I renamed it to base.cshtml (and base.js). It looks that somehow shell.cshtml could not be processed on Azure.
Related
i am developing the application using Angular 8. I am facing an issue on the deployment server. When i make a build and deploy it to the server. If i go through its index point then its working fine but if i refresh any route then its giving me 404 error. kindly suggest me the best solution.
I implemented the hash strategy too on my local and checked on iis windows its working fine but i need some other method so that url will not look ugly. In this strategy a hash always would be there in the url.
So please tell is there any other way to do it.. without showing # in url..
Please experts help me to fix this as like angular.io because on that if you refresh any route then its work good without hashing strategy...
I usually use hash strategy but, as I know it is possibile to configure your server (for example via .htaccess file) in order to configure your routing. I don't know how by the way.
Here's the sitch:
I downloaded and installed Wampserver64 and Wordpress 5.2.3
I finally made it to my site, but I can't preview or publish pages with the new Gutenberg or block editor because something is broken! When I edit with the Classic Editor, it's all good.
****Here's not the notice I get from the Site Health Plugin****
The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.
The REST API call gave the following unexpected result: (404)
Not Found
The requested URL /wordpress/wp-json/wp/v2/types/post was not found on this server.
Apache/2.4.39 (Win64) PHP/7.3.5 Server at sitefolder Port 80
I have scoured the internet on how to fix this but so far nada. Help much appreciated!
You have to add index.php after your folder name in the URL in order to make WordPress API work on the localhost.
For example: localhost/trial-wordpress/index.php/wp-json/wp/v2/posts
It worked for me.
If you're still working on it try the suggestions from this post: Wordpress REST API (wp-api) 404 Error Even if it's quite old there are some ideas you could try, like switching your permalink structure to sth. other than plain, check mod_rewrite under apache and so on. Classic Editor is not using the REST API, therefore no error.
Following the instructions on the MEAN.js website, I create a new site and attempt to create a new CRUD using yeoman generator. my command is as follows
$ yo meanjs:crud-module meal
Everything seems to be created correctly in the modules folder, and when I go tho the site, and attempt to create a new "meal" everything seems to work fine until I hit submit. The browser throws the following error
http://localhost:3000/meals/api/meals 404 (Not Found)
Am I missing a step in the setup? is there something additional I need to do to get CRUD to work.
There is something wrong with your routing, check your client/config/routes and server/routes file. The URL should be:
http://localhost:3000/api/meals
without the first meals after 3000. That's why it is a 404.
Hope this helps, if you cant find the problem add some code.
Just put a forward slash(/) in front of api in resource service.
/api/meals instead of api/meals
I've added a view in my views, with layout and stuff. But when I launch the page through Visual Studio (or directly address the URL), the page gives a 404 error:
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.
How can I fix this issue?
I had to add the page in my config file, fixed now.
So I have a booking system on my website with the URL domain.co.uk/booking. I wanted to add it to a different site I have, domain.com.au/booking. It is a simple drag and drop then run an install.php file. However my domain.com.au/booking does not find anything there. the files are there in the EXACT same way as they are in my domain.co.uk site which runs fine. Are there any reasons why the path would not be found that i may simply be over looking?
N.B the error that appears is
The requested URL /booking/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
If you are on a linux server, /booking/ does not equal /booking. That could explain the difference between the two sites (one is hosted on linux, the other is not).
Though this is just a wild guess.