Skip to main content
Participating Frequently
May 4, 2017
Answered

Open in browser returns server not found

  • May 4, 2017
  • 5 replies
  • 677 views

I have several Web pages on my laptop that give different results when trying to preview them in a browser from Dreamweaver 2017.  A file in a site at C:\Users\myname\subfolder\subfolder\index.html works fine when I right click on the filename tab in Dreamweaver, click Open in Browser, and then select a browser (both Firefox and IE were successful).  However, when I try the same procedure with a file located at C:\folder\subfolder\index.html, Firefox returns "Server Not Found," and IE returns "Unable to find file," or some other 404 type error.  Additionally, when I create a completely new and very simple file, save it on the desktop, and test it with Open in Browser, it also works file.  What am I missing with the erroneous scenario??

I've read many posts, but haven't found an answer, so thanks in advance for your help.

    This topic has been closed for replies.
    Correct answer Jon Fritz

    If you have a local testing server set up on the two sites that aren't working, and it's not running when you go to use Open In Browser, you'll get a not found style message.

    The page without a site defined would work because there'd be no server to turn on before previewing.

    Is "localhost" showing in the Location Bar of the browser on those "non-working" pages when you use Open In Browser?

    5 replies

    FrankFSAuthor
    Participating Frequently
    May 4, 2017

    Not for that site, Nancy.  That site wasn't ever configured with a testing server on my old laptop.  I just tested it again, just to make extra sure.  It works fine.

    FrankFSAuthor
    Participating Frequently
    May 4, 2017

    Hmmmm....well, the other site, the one that always worked, is comprised almost exclusively of .shtml files.  They render perfectly in Open in Browser in both Firefox and IE??

    Nancy OShea
    Community Expert
    Community Expert
    May 4, 2017

    But you had a testing server, right?

    Nancy

    Nancy O'Shea— Product User & Community Expert
    FrankFSAuthor
    Participating Frequently
    May 4, 2017

    Correct.  IE (I think it's 11x) wasn't rendering the HTML.  However, you're onto something with the file extension.  Most all of this site's files were defined years ago with .shtm extension.  It was an .shtm file that would not render.  I tried opening an .htm file in the same site with Open in Broswer (IE) and it rendered the HTML as one would expect.  It was a simple file with no defined styles/css but it did render simple markup as expected.

    Thanks!

    Nancy OShea
    Community Expert
    Community Expert
    May 4, 2017

    .shtm or .shtml is a file type that requires a server configured to support .shtm.    Even if it contains no server-side scripts.

    Nancy

    Nancy O'Shea— Product User & Community Expert
    Jon Fritz
    Community Expert
    Jon FritzCommunity ExpertCorrect answer
    Community Expert
    May 4, 2017

    If you have a local testing server set up on the two sites that aren't working, and it's not running when you go to use Open In Browser, you'll get a not found style message.

    The page without a site defined would work because there'd be no server to turn on before previewing.

    Is "localhost" showing in the Location Bar of the browser on those "non-working" pages when you use Open In Browser?

    FrankFSAuthor
    Participating Frequently
    May 4, 2017

    OK.  The site that did not work had a testing server set for it.  I'd actually imported this site definition onto a new/replacement laptop, and I think the old laptop had IIS running. So, by removing the test server, It now works and displays the page perfectly in Firefox, but only displays code/HTML in IE.  I can deal with that, but if you know the reason, I'd sure be happy if you'd share.

    To respond to your question, John, https://.......  was displaying for the site that didn't work.  The site that did work, and the simple file on the desktop displayed a local file path (C:\.....).

    But, otherwise, thanks MUCH for the replies.  I can consider this question answered.

    Jon Fritz
    Community Expert
    Community Expert
    May 4, 2017

    IE is just displaying code vs rendering the html?

    It's hard to say what could be causing that. IE doesn't like to run local scripts, it could be something that was dependent upon the server being active isn't being run by IE. It could be a file extension issue (.txt files will open as text even if they're html code for example).

    It would be best to start a new discussion specific to that issue though. More people will see it than a secondary issue to an Answered problem.

    Nancy OShea
    Community Expert
    Community Expert
    May 4, 2017

    Are you working in a defined local site folder?

    That's a critical 1st step for working with projects.  And are all your files and assets saved in that local site folder?

    Nancy

    Nancy O'Shea— Product User & Community Expert
    FrankFSAuthor
    Participating Frequently
    May 4, 2017

    Yes. They're both defined sites.  However, the last example, the one where I just made a simple file and saved it to the desktop, was NOT a defined site.  But, it worked??