ASP.NET and PNG from root not working - asp.net-mvc-3

I am baffled but why wouldnt http://usayouthhoops.com/apple-touch-icon-144x144.png work, even though it's in the root? I keep getting a 404 error. I update the extension to .JPG and it works. This happens on IIS and my local VS server. I'm not doing anything special with routes.

Have anything in your web.config that is preventing any particular content from being served from the root? Also try to manually delete your bin and obj folders, rebuilding and checking again.
...

Related

HTTP 403.14 - Forbidden when endpoint is /tests/

I have an ASP.Net Core app with the usual default routing set up in Startup.cs. My app has a TestsController, with some action routines, including an Index() routine.
I've never had a problem navigating to my app's /tests/ or /tests/index endpoints before today. As of today, attempting to navigate to /tests gives me the IIS HTTP Error 403.14 - Forbidden error page. If I try to navigate to /tests/index then I get the IIS HTTP Error 404.0 - Not Found page.
All of the other endpoints in my app seem to work correctly. It's just the /tests endpoints that fail.
If I rename the controller from TestsController to TestController (remove the "s") then I have no problem navigating to either /test or /test/index.
So, this smells like IIS is maybe finding a Tests folder that it thinks I'm trying to list? But the only Tests folder I can see in Windows Explorer is in the obj\Debug\netcoreapp2.2\Razor\Views folder. I don't think IIS is tripping over that.
One other data point: Yesterday, I ran into a weird problem where VS 2019 would load my project and immediately complain that "A process used by VS has encountered an unrecoverable error". I eventually figured out that this was caused (for some unknown reason) by the presence of a tag helper I was working on. Removing the tag helper code fixed that problem. But it's suspicious that now I have this new problem. On the presumption that the tag helper problem left some detritus behind, I deleted all of the bin and obj folders, deleted all of the NuGet packages, rebooted (a couple of times) and rebuilt everything. No luck, I still can't navigate to the /tests endpoint.
EDIT: Another data point: I just tried the same code on another machine, and it works correctly. The problem is isolated to the one machine.
How do I ask IIS where it thinks it's finding a tests folder?
Not terribly helpful answer, but it's what I've got... I spent a frustrating week with MS tech support, with no resolution. In the end, I nuked the local repo and re-cloned it, and the problem went away.
It was really weird. If I simply renamed the parent directory for the solution and all of its projects then the problem went away. If I renamed the directory back to its original name then the problem came back.

Reinstalled XAMPP, with deleting htdocs. And old web page shows up at localhost

I would like to work on a new project and i have reinstalled XAMPP.
I have tried to make sure i have deleted the whole XAMPP folder, including htdocs (where all the files where). Now when i go to localhost it shows my old project. None of the files from the old project are in 'htdocs' but it still shows up.
I did use htaccess in my old project, this is the only thing i think could be causing this.
I am not sure where it is getting the files from the old project from.
Thanks
The old site was just cached, by clearing my cache, it is now working properly.

Joomla blank after changing server, admin panel good

I did a cPanel move of a Joomla 1.5 website and a PHPBB3 forum from one server to another, and when the DNS changes kicked in all I see is a blank page. The administrator panel works without any problems whatsoever. cPanel works. Website and forum (which is separate from the website) are both blank.
I have then manually downloaded and then uploaded all files (didn't move the databases manually), and some files wouldn't upload because of 555 file permissions. I changed the permissions to 777 temporarily to overwrite the file with the manually uploaded one. So all files are now the same as they were on the old server.
Even when I turn the Site Debugging on, the screen is blank.
There is no hidden index.html or default.html file which could be causing the problem.
The entire account was moved with cPanel so it's the same on the old server and the new server. The hosting provider reports no problems. The DNS changes kicked in two days ago.
PHP is working, as this link works: http://oklade.net/findpath.php
In configuration.php, there is nothing specifically pointing to the old site.
var $dbtype = 'WeboMySql';
var $host = 'localhost';
All roads in these cases generally lead to configuration.php Check spelling and punctuation for mistakes. Also, enable one of the default Joomla Templates to be sure that whatever template you're using isn't also using old values.
Problem is solved.
The configuration.php file was to blame, as everyone suggested, but there was no possible way to change it manually and get it right, I had to make the system determine its own configuration.
I installed a fresh version of Joomla in a separate folder, and a fresh version of PHPBB3 in a separate folder.
Then I took the configuration.php and config.php files for those two things and put them in the existing folders of the website which didn't work.
Changed the minor details such as database prefixes (as I couldn't have entered the existing ones while installing), and that's it. Now it works.
So this might be a good workaround for anyone facing the same problem. Install a dummy version of Joomla and use the generated configuration.php file for the old, non-functioning website.
Before starting to debug the server, turn debug-mode on (in the admin CP)
First thing I would try is to delete the cache by running: rm –rf /var/www/html/<your website directory>/var/cache/*
The next thing I would try is to switch to another template - make sure that the template is not the issue.
Also, make sure to check the apache access log - just in case. also, you can check .htaccess for stuff like 301 redirect rules or any other problematic configuration (same applies for httpd.conf and configuration.php)
Good luck!

magento var folder

A while back I was deleting Magento's cache in the var folder. I may be wrong but I think I made a mistake and instead of deleting everything in var/cache deleted everything in var accidentally. Magento seems to be running fine though. Have I got problems that I cant see, can anyone tell me?
Magento 1.6.
It should be fine, the files in there are supposed to be temporary. Just make sure that you recreate the .htaccess file that was in there as it blocks the public from being able to see your log files if you have logging enabled. The .htaccess file just contains these lines:
Order deny,allow
Deny from all
As long as the permissions are properly set on var/ , Magento will recreate the needed subfolders. You may need to create the import and export folders, watch for any other folders that may have been created by third party module installs, they should be recreated if the module programmer did their homework.
I've had situations where I actually had to delete all the folders in var/ so the web server could recreate them with the proper ownership (running as nobody).
In the future in case you're interested in emptying your cache:
Simply delete everything from the /var/cache directory and then reload your website in your browser.
To clear all sessions, you can also delete everything from the /var/session folder within your Magento installation directory.

Moved website, now images broken

Unsure if this should be on here or serverfault so apologies if I'm wrong.
I just moved my site from one folder to another on my server (what happened was, I was doing an update, which didn't quite work, so I transferred all the old files back). Now all my images on the site are broken.
Does anyone know why this happens? Or how to fix it more importantly?
Any help/advice would be appreciated!
Thanks
EDIT:
Okay, apparently I need to make sure the code is compiled, but completely lost as to how to do this..any ideas?
I'm also on a windows 2008 server, running IIS7. The application is written in C# .net MVC.
It doesn't seems that you have a compilation problem since the aplication is working. I mean, if you can run the website, but you are only missing the images, try to look for the paths and check if the image files are in there.
For an MVC (C#) app you should have the directory like this:
root/global.asax
root/web.config
root/Views/..
root/Model/..
´root´ is gonna be your first public folder on the WebServer
Hope it helps!
Make sure the paths to your image files (and any files for that matter) are relative to the root directory of your web site. This way, if you ever move all of the files pertaining to your web site from one location to another, everything stays relative and nothing should be broken.

Resources