none
Can't preview asp.net pages in Expression 4 RRS feed

  • Question

  • I have recently installed Expression Web 4 on my Windows 7 machine (32 bit) and am unable to preview asp.net web pages in any browser.  I have tried this on pages from the local copies of several existing websites.

    I can open the page in Expression Web and it displays the code and the layout properly in the split view.  When I select the Preview button, IE opens and displays the "Internet Exolorer cannot display the webpage" message.  The typical IE address displayed is http://localhost:46529/about.aspx; the Development Server also showed Port 46529.

    I have reviewed the responses to several related Forum questions/answers and taken the following steps without any noticiable effect: 1) Verified the settings under Site Settings/Preview had the box checked to use Development Server for PHP and ASP.NET; 2) Deselected the IE setting "Show friendly HTTP messages"; 3) Reset the default settings on Tools/Page Editor Options/CSS; and 4)Turned off the Firewall.

    I suspect that I have missed something simple / obvious but I clearly need a suggestion or two.

    THANKS - Jim

    Wednesday, September 29, 2010 7:52 PM

All replies

  • Can you preview the page(s) in other browsers - Firefox, Opera, Safari, Chrome, or do all give the "cannot display this page" error?

    You post above mentions IE specifically but you don't say if you tried to preview in other browsers.


    Andrew M


    http://www.murraywebs.com

    "Nothing spoils numbers faster than arithmetic!"
    -- Peppermint Patty (Peanuts, Charles M. Schulz)
    Wednesday, September 29, 2010 11:36 PM
  • Try setting *all* pages to preview using the development server.  Can you preview a plain HTML page (make one if you don't have one in that site)?
    Thursday, September 30, 2010 12:16 AM
  • I cannot preview in IE or Firefox.  Those are the only ones I have available.
    Thursday, September 30, 2010 7:02 AM
  • I created a plain HTML page and the preview does work for that page.

    Can you give me some guidance on setting *all* pages to preview using the dev server?

    Thursday, September 30, 2010 7:04 AM
  • It doesn't solve the Dev Server issue but have you tried previewing in IIS?

    You need a version of Windows that supports it and would need to install it via 'Control Panel - Programs and Features - Turn Windows Features on or off'.

     

     


    Ian Haynes

    EW V4 Add-Ins
    EW resources, hints and tips
    Thursday, September 30, 2010 7:20 AM
  • I managed to reproduce the problem:

    For my repro, I modified the web.config file to remove all references to Custom errors and HTTP errors. I don't know if tis is your problem, but it is worth checking for error in the web.config, particularly in these areas.

    In my web.config file there are sections:
    <system.webServer>
     <httpErrors defaultResponseMode="Redirect" />
    other bits
    </system.Webserver>
     And
    <system.web>
     <customErrors defaultRedirect="/error.aspx" mode="On" redirectMode="ResponseRewrite" />
    ...
    </system.web>
    With the first error section removed, and an error in the custon.errors section, the same error page appeared.
    You may have something similar.


    Ron Symonds
    Microsoft MVP (Expression Web)

    www.rxs-enterprises.org/fp
    Thursday, September 30, 2010 7:55 AM
  • "I created a plain HTML page and the preview does work for that page.Can you give me some guidance on setting *all* pages to preview using the dev server?"

    My point was to test the development server in absence of asp.net, narrowing down where the problem is, so previewing an HTML page but not setting the development server for all pages doesn't do that.

    You set for "all pages" in the same location you set it for asp.net and PHP. 

    Thursday, September 30, 2010 11:30 AM
  • I created a plain HTML page and the preview does work for that page.

    Can you give me some guidance on setting *all* pages to preview using the dev server?


    Go to Site|Site Settings, and on the Preview tab, check "For all Web pages."

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.
    Thursday, September 30, 2010 11:39 AM
  • Sorry, I should have known that.

    I have set dev server to display "all pages."  In that case the HTML page does not preview,

    Thursday, September 30, 2010 5:16 PM
  • My web.config file currently contains the following:

        <system.web>
            <customErrors mode="Off"/>
        </system.web>

    I modified it based on your example:

    <system.webServer>
       <httpErrors defaultResponseMode="Redirect" />
     </system.Webserver>
        <system.web>
            <customErrors defaultRedirect="/error.aspx" mode="On" redirectMode="ResponseRewrite" />
        </system.web>

    Unfortunately the change had no apparent effect.

    Thursday, September 30, 2010 5:37 PM
  • I would put custonerrors mode back to Off while you are debugging.


    Ron Symonds
    Microsoft MVP (Expression Web)

    www.rxs-enterprises.org/fp
    Thursday, September 30, 2010 6:03 PM
  • If an HTML page doesn't preview in the development server, you have an issue that is not related to your web.config or asp.net.

    I have no idea what the issue is: Development server not installed correctly?  Blocked by some program on your machine?  Other?

    Friday, October 1, 2010 12:10 AM
  • HMMMM <thinking out loud about what Kathy said>  Could it be behind some kind of firewall or anti virus program? </thinking out loud>

    HTH,

    MIKE E

     


    "It's like déjà vu all over again." — Yogi Berra
    Friday, October 1, 2010 2:02 AM
  • I have tried a few more things, but without any luck. 

    In case there was something "strange" about the existing websites I was trying to preview, I used one of the existing Expression templates to create a new one.  Same result.

    I uninstalled Expression Web and all the components, then reinstalled the whole thing.  Still no biz.

    Also someone mentioned a possible problem with the firewall or anti virus program.  I have tried it with the firewall turned off and the anti virus turned off, also no-go.

    I am at a loss as to where to go from here.  I still like I am missing something obvious.  Any more ideas?

    THANKS!!


    Jim Masson
    Thursday, October 7, 2010 4:40 PM
  • "Also someone mentioned a possible problem with the firewall or anti virus program.  I have tried it with the firewall turned off and the anti virus turned off, also no-go."

    That was a red herring. If you're testing on your local machine, the firewall doesn't even come into play. It would be extremely odd for anti-virus to alert when the dev server was launched, and if it did, you should receive a notification (at least, my AV does when it alerts).

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.
    Thursday, October 7, 2010 5:44 PM
  • Problem resolved - I believe.

    After a considerable amount of troubleshooting (and much help from my son) we determined that the entry for localhost had been removed from the hosts file.  When this entry is missing and a site is launched in the ASP.NET Web Development Server via Expression Web, Internet Explorer displays “Internet Explorer cannot display the webpage”.  The fix was to add "127.0.0.1   localhost" to the end of the hosts file.

    A possible explanation for how that happened can be found at http://blogs.msdn.com/b/webdevtools/archive/2009/03/13/asp-net-web-development-server-stops-working.aspx .

    THANKS TO ALL - Jim


    Jim Masson
    Monday, November 1, 2010 2:42 AM
  • Thankyou so much... I've been pouring over webpages for hours till I found this fix. It worked perfectly...
    Sunday, January 16, 2011 9:43 PM
  • LIFESAVER!  Thanks.

     

    (Hey Microsoft--you should advertise this fix!)

    Thursday, January 12, 2012 4:40 AM
  • "(Hey Microsoft--you should advertise this fix!)"

    You aren't talking to MS when you post in this forum.

    And: that fix was mentioned in this forum, ages ago.  The Defender update that caused the problem happened almost 3 years ago.  Subsequent updates didn't cause the problem.

    Thursday, January 12, 2012 9:09 AM