I know this might be a broad question but i recently finished developing a laravel 5.6 app. I deployed it to a free hosting service (000webhosting) because i wanted the client to be able to preview it remotely from where they are without having to sign up for domains and hosting accounts and all that jazz.
I uploaded it by zipping my project folder and putting it in the directory of the cpanel. I put all the public files (including .htaccess) into the public_html folder and put the rest of the project into the parent directory.
Long story short, everything works fine except for ajax. Other non-ajax CRUD is functional but nothing ajax related works. It all produces 404 errors. The other non-ajax functionalities are in the same controller as the ajax methods! so i know the project is talking to itself. I have jquery library linked to on the hosted google libraries page. Is there some sort of convention that i'm missing that is limiting this functionality? do some web servers block ajax requests? It's working perfectly in my localhost wamp environment. What could i possibly look into to resolve this ajax discrepancy? If it comes to it, i'll pay for hosting, but i just want to make sure this isn't a consistent topic with many host providers where ajax needs to be specially configured or something.
github.com/maximus1127/drive ....this is the github repo. the file in question is drive/resources/views/auditor_pages/application_review.blade.php.
To login the browser, go to https://makemedrive.000webhostapp.com/ login with "aa#aa.com" pw "password". Click the instructors tab on the left, then instructor application, then view details. The "save notes", "background check/received" buttons are all the ajax features of this page and none of them work. They all produce 404 errors. Please help!
Thanks in advance!
Related
So I built a website from scratch and am really happy about it. I wanted to make it a live version, so I looked for a web hosting company online. I use hostinger.com for my web hosting, however I'm not getting the results I'm looking for.
This is the finish product I made:
image of my index.html
and this is the results I get after I uploaded it to my web hosting provider:
image from live web host
So hostinger has different options for how to upload your website. And I use git because it is easy to use. Now the problem is I don't know if my code is the problem or my web hosting provider.
Thank you for your help in advance.
You can check the website: https://johnmcondino.com
Looks like the website is loading properly now.
Please press ctrl + F5 on windows. May be due to cache assets are not loading.
I have a laravel app that can be found at https://github.com/maximus1127/drive ...the file in question is drive/resources/views/auditor_pages/application_review.blade.php. When i run this on my local wamp server, everything works fine. When i upload it to hostgator (paid hosting, not trying to go the free route), everything in the app works except for the ajax requests. The ajax requests even go to the same controller as other CRUD operations that are not ajax based and those other operations work fine. So i know the files are all connecting and talking to each other. can someone help me please? You can log into my app by going to driveportal.net user email "aa#aa.com" pw "password. Click "instructors" on the left, then instructor applications, then view details. This is all dummy data seeded from composer. Click the second row as the first one has altered database info which doesn't display all features.
The background check submitted/received and the "save notes" button is all ajax. But they all produce 404 errors. Can someone please help me figure out what i'm doing wrong? I recently added some middleware to my routes and maybe that's interfering but it still works well on my local server. I'm so confused.
Edit: i should also note that my headers are stored in the auditorDefault layout file.
For anyone interested, my ajax "url1/2/3" variables did not accommodate for my new group prefixes with the auditor middleware. when i changed the routes to accommodate for that, the ajax started working.
I am using Spring to create a web application in which a user can upload a zipped folder containing an index.html file along with all it's resources(pretty much like an Adobe captivate generated webpage). The user should be able to request the uploaded web pages in the form of inner web pages.
I can only go as far as unzipping the folder itself, but I have no idea how to launch the index.html present inside the zipped folder.
How do I achieve this?
Quite honestly Spring has no restrictions or advantages over
displaying your subpages inside another page. However you can use Spring MVC to dynamically serve the web pages from the uploaded folder.
More over you have to play the tricks from browser side. Going with iFrame seems to be the best option from client side, though there are many other options. Please check this thread.
You can write some smart APIs in SpringController which accepts the folder path or folder name as parameter, picks the necessary pages from the requested folder and serves the user.
Another approach could be to use a headless browser for the server side rendering and give the output as screenshots to client. This can render the pages server side. Please check this thread for more details.
I hope this helps you!
I have a number of virtual applications under one site, all of which have the same issue. Whenever you are at the root of the application (~/) postbacks do not fire, the page just refreshes.
Here are some samples (all their own virtual applications):
Clicking on "Login" link does not redirect to Login.aspx page
http://designbyssi.com/designbyssi.com/projects/air-savings/02/
http://www.designbyssi.com/designbyssi.com/projects/life-furniture/06/
Entering username / password, and then clicking "login" / "go" does not log a user in
http://designbyssi.com/designbyssi.com/support/
http://www.designbyssi.com/
For some reason, if you add "Default.aspx" to the end of any of the pages above the postback works as expected (eg. http://designbyssi.com/designbyssi.com/projects/air-savings/02/Default.aspx). I've been Googling this for a while now and I found a few articles, though none of them have helped.
Here are the articles I've managed to find:
Why won't postbacks work on my domain root?
http://forums.asp.net/t/1735380.aspx/1
http://forums.asp.net/t/1482960.aspx
I'm not using any type of URL rewriting, they are all web form applications, and I'm on a Godaddy shared hosting account.
Any ideas on what might be happening, or what I need to do to fix it?
I had the same issue recently where my dev environment was setup in integrated mode while production was in classic mode. Postbacks in dev were not working when going to the root of the site but would work when going to Default.aspx.
I simply changed my dev environment to use classic mode for now. Also, this problem does not necessarily have anything to do with URL rewriting.
Since you are on shared hosting, you probably can't do that but these links may help.
Postback doesn't work with aspx page as Default Document
Event Handlers Might Not Be Not Raised in a Default Document in IIS 7 or IIS 7.5 Integrated Mode?
I am developing a website using Microsoft MVC3, and have built it upon the default MVC3 Application template. It accesses an external database and works on localhost.
I have deployed it to a shared server I rent from storminternet via the publish tool using ftp method (storminternet do not yet support web deploy), and it runs well. It accesses the database okay and get requests work fine.
However, any form that submits via POST protocol returns page not found error 404 (this is on actions where I have asserted [HttpPost]).
Storm internet assure me that POST and GET are allowed by default, and since the helpdesk are not developers, I'm unsure who to turn to. I don't have an excellent understanding of web.config, although I can read and understand xml and see what's going on by reading through and googling. I have tried adding the protocols to the root web.config, and I think I might be barking up the wrong tree.
Has anyone else had this problem, or might anyone know how to help me?
To replicate my error, my site is here... 213.229.125.117/$sitepreview/ase-limited.com/Dev (sorry it isn't blue. The dollar gets parsed to % something)
and the quickest route to a POST request is to click 'Add Building' at the top of the left-hand side and then click 'Save' at the top of the dialogue box.
Any help will be gratefully received. I've been stuck on this for days without luck.
Best Regards
Nick
STOP-PRESS-STOP-PRESS-STOP-PRESS-STOP-PRESS-STOP-PRESS-STOP-PRESS-STOP-PRESS-
It turned out to be a known issue with sitepreview. Switching to the proper domain sorted everything.
I have noticed that you have some 404 javascript errors when performing your AJAX requests. For example you have a request to:
http://213.229.125.117/$sitepreview/ase-limited.com/BuildingManager/Employees/2
instead of:
http://213.229.125.117/$sitepreview/ase-limited.com/Dev/BuildingManager/Employees/2
Notice how /Dev is missing. That's because in your javascripts you have hardcoded your urls instead of using url helpers to generate them. For example you wrote something like this:
$.ajax({
url: '/BuildingManager/Employees/2',
....
});
which works fine on localhost because you don't have a virtual directory name but doesn't work when you deploy on your server because now the correct path is:
$.ajax({
url: '/Dev/BuildingManager/Employees/2',
....
});
For this reason you should absolutely never hardcode urls like that.
And when I try to POST the form in tries to post to http://213.229.125.117/Dev/BuildingManager/SaveBuilding which seems a very weird url as it is missing the whole beginning. Once again: never hardcode urls. Always use url helpers.