Webmatrix - upgraded, now cannot browse localhost sites - asp.net

I am in the process of developing an ASP.NET site. Yesterday it was working fine. I then upgraded WebMatrix as I keep getting pop ups.
Now, when I try to browse to my site all I am getting is the website text, no CSS, no functionality just plain html text.
No links are working but when I try to enter something into the search bar and hit enter I get the following:
Firefox doesn't know how to open this address, because the protocol
(localhost) isn't associated with any program.
You might need to install other software to open this address.
Now I investigated this and found a this topic:
IIS, IE does not recognize web page protocal
And yes when I added the http and copied the address into IE it brought up the correct page. However then when I tried to navigate around I got the same problem in IE with the message:
No apps are installed to open this type of file (localhost)
I'm totally baffled so any advice would be really appreciated.

Related

Why have my pictures disappeared (404) in a previously working website?

I created a IIS website about a year and a half ago with a lot of pictures on various aspx/asp tabbed pages. My development PC is Windows 8.1 Pro with IIS version 8.5.9600.16384 website. The website was developed using Visual Studio 2012. The website was published onto the same Windows PC.
The published website was then copied onto a Window Server 2012R2 on an IIS Version 8.5.9600.16384 web and worked well. Gradually search engine bots found the site and all was well.
This week I went to make some updates to the website and found none of the pictures working. They are all returning a 404 html code. When I view the .jpg files individually from IIS Firefox returns "cannot be displayed because it contains errors". Chrome and Edge both say the file can't be found. If I view these files from Windows File Explorer they look fine.
So I deleted the files on the server and then copied the published website from my development PC. Still no pictures.
I have another similar web application on the same server so moved one of the jpg files to that directory and tried to view it via IIS - still 404. I copied a picture from the other website to my "broken" directory and the other picture was viewable via IIS. All of these pictures were reduced in the same manner using Photoshop 7.0.
I went back to my development PC and viewed the original website via IIS. The pictures were viewable so I republished the website, copied it to the server - no pictures.
I then found the original picture (not reduced) and moved it to the server. Still 404.
My problem doesn't seem to be permissions because I can view pictures copied from another web to that directory.
The website had been working for over a year but the pictures now return 404's.
The pictures can be viewed on the development PC using IIS but not after publishing them and then copying the website to the server.
Another website with essentially the same code with pictures reduced in the same manner is displaying pictures fine.
I'm really perplexed and would love to hear some of your ideas as to what might be my problem. Thanks for taking the time to read this.
The first place I always start with missing images is to View Source and make sure the path to the image is actually what I think it is.
Could you have done something so the path is now built relative to the machine's file structure instead of relative to the site? That could cause the image to be found locally, but not on your server.
It might be easier for someone to get an idea if you included the URL so we could examine the page displayed.
I'm pretty sure I figured out the problem but it leads to other questions.
I shortened the filename and now I can browse to it via IIS.
So here are my current questions:
Why had the pictures been browse-able originally but not now? Has there been some kind of internet change about acceptable file length? Or possibly some kind of Server 2012R2 update that caused this change?
Why are these pictures browse-able on my Windows 8.1 PC via IIS but not on the Server 2012R2? I can also open the website and see all of the pictures on Windows 8.1.
It's nice to have tackled one problem but I would still like to know the cause if anyone should have any suggestions.
I FINALLY figured out why my pictures disappeared. Yes renaming my .jpg files did fix the problem but that wasn't the cause. The problem was that I had added /2018, /2019 and /2020 to my IIS Request Filtering denied. All of my picture files had dates on them. When I renamed/shortened the file names I removed the /year. Phew! The stupid things I do! This also explained why I could view these webpages on my development PC but not the server - no request filtering. Hopefully my error helps someone down the line.

Laragon Sites-Enables stopped working

I have been learning the Laravel framework and I used Laragon to get started. Laragon sets up my web server and my Hosts file so that I can access my work through the browser. Normally, I would boot up the server using the fancy "Start" button in Laragon and then go to the browser and type in "myFirstApp.dev" and my site would show up. Now I am getting an error in the browser that says "This site cannot be reached" (as shown in image1.jpg). How can I fix/diagnose the issue? Has anyone else ran in to this issue?
.
Found the answer to my own question. If anyone runs in to this same issue, here is an explanation. Google released Chrome v63 which forces all .dev domains to https. To fix this either enable SSL in Laragon or chance the domain extension your projects (.test for example). This will require changing your hosts and {Laragon Root}\etc\nginx\sites-enabled files.
https://forum.laragon.org/topic/761/chrome-63-now-forces-dev-domains-to-https/6

Unable to browse localhost due to HSTS common_name_invalid

Last week I was able to build and run a locally-hosted .NET website without any problems. However, for the past couple of days I haven't been able to get around this error:
ERR_CERT_COMMON_NAME_INVALID
This error message appears in both Chrome and Firefox. Edge and IE will load the page but block all AJAX requests without explanation.
The website is configured as an application in IIS and uses a self-signed certificate (created in IIS).
I encounter the same problem with running a completely separate .NET website so I doubt it has anything to do with each website's individual configurations.
My colleagues are able to browse their locally-hosted versions of the same website using a self-signed certificate in the same browser versions as I have installed.
Please, can someone tell me what might have happened to my setup, why are browsers no longer accepting my certificate, and how to get back to a running localhost website?
I'm a PHP developer and to be able to work on my development environment with a certificate, I was able to do the same by finding the real SSL HTTPS/HTTP Certificate and deleting it.
The steps are :
In the address bar, type "chrome://net-internals/#hsts".
Type the domain name in the text field below "Delete domain".
Click the "Delete" button.
Type the domain name in the text field below "Query domain".
Click the "Query" button.
Your response should be "Not found".
You can find more information at : http://classically.me/blogs/how-clear-hsts-settings-major-browsers
Although this solution is not the best, Chrome currently does not have any good solution for the moment. I have escalated this situation with their support team to help improve user/developer experience.
You should redo these steps every time you go on the server that contains the main HTTPS Certificate with HSTS clause.

access localhost on another computer with webmatrix

so currently i am working on a wordpress site with webmatrix, and would like to view my progress in another computer in my network (at my workplace)
i want to either add the files to a shared drive for everyone on the network to view, or publish it locally with iis hosting
for the first method, i tried to change the url under settings from localhost:0000 to mycomputerIP:0000 but it did not work
for the second method i tried to enter the credentials of iss in the other computer into settings under publishing, so that it can be published locally, but it also did not work
i have looked for solutions online, but nothing seemed to be able to fix it, i am sorry for the vague description, but if anyone would like to help me i can provide more information
You should be able to follow the instructions at the following link to make sure everything is setup correctly:
http://blogs.iis.net/vaidyg/archive/2010/07/29/serving-external-traffic-with-webmatrix-beta.aspx
Edit
If you are using Windows Vista, 7, 8 or 8.1 you could look at installing a local copy of IIS and creating a virtual server for your WebMatrix site. It's not as much work as it sounds and it will give you a full management console, host name bindings and all kinds of other advantages. The following link should get you started:
http://www.howtogeek.com/howto/windows-vista/how-to-install-iis-on-windows-vista/

Site functions locally, "Internet Explorer cannot display the webpage" on server

I have an ASP.Net Website (not a web app, fwiw) that builds and works just fine locally through IIS on my dev laptop.
However, when I publish it to our QA box and try to view while I'm remoting into that server, I get a message from IE saying "Internet Explorer cannot display the webpage". Firefox just spits back a quick "Connection Timed Out"
There is absolutely nothing in the event log nor the IIS log about this. I'm unsure where I can look for more info.
I'm fairly confident it is an ASP.Net issue. I can install a sample site from our vendor, Ektron, into IIS and it will run. If I overwrite the sample's web.config with my own, it continues to run. If I then blow away the entire sample site and copy over my site from my local, I'll get the message about how "Internet Explorer cannot display the webpage".
I've tried to keep the environments as close together as I can. Both boxes are running IIS 7.5 under an integrated app pool for .Net 4.0. I browse via localhost on dev and via an IP on the server.
I am not terribly familiar with the Website template, so I might be missing something obvious (I hope!). I'm hoping someone can provide some guidance into how I can get more info on what the heck is going on so I can resolve this issue.
UPDATE
I think I'm getting closer. By using Fiddler (thanks for the suggestion, Amy!) I notice that it redirects the request to SSL. SSL requires a different license from our vendor, so that might be it. I'm still trying to understand why that redirect is taking place, but at least I have something now to look at.
I'd look into the SSL settings in the web.config / IIS - settings for Mime Types and also into Ektron's MIME Types in the MimeType.config file. I found that some .aspx pages like (ekajaxtransform.aspx) weren't functioning correctly because of firewall/proxy issues/restrictions.
Hope it helps. :)

Resources