none
VS2005 with WinXP: Designer's Error Page shows html Code

    General discussion

  • Hello,

    when the windows forms designer of Visual Studio 2005 cannot display a windows form (e.g. because someone manually edited the file ...Designer.cs), it shows an error page including the error message and a stack trace.

    This worked fine with Windows 2000. Now my computer got migrated to Windows XP (early enough...), and instead of showing the error page, the designer simply shows the html source code of that page.

    I was able to figure out that VS creates temporary files with the extension .tmp containing html, and that the Internet Explorer itself does not show the html content, but the html source. So I am wondering whether this has to do with some security setting related to the Internet Explorer (in our company, we have lots of those settings) or if this is an issue with VS2005 and WinXP.

    Thus, I'd like to ask if someone using VS2005 with WinXP could reproduce this. To create such an error page, please do this:

    Create a new Windows Forms Project (e.g. C#).
    Add a button to the form.
    Save and close the form.
    Open Form1.Designer.cs and comment the line where the button is declared (typically one of the last lines). Save and Close.
    Reopen the form.

    Thank you very much in advance!

    Martin

    • Changed type Figo Fei Monday, August 18, 2008 3:02 AM to comment
    • Moved by Figo Fei Wednesday, August 26, 2009 3:03 AM (From:Visual Studio Setup and Installation)
    Monday, August 11, 2008 9:44 AM

All replies

  •  It's not likely to show HTML code in a Winform application designer, can you please show us some snip-shot to give a clear picture?

    Thanks.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Wednesday, August 13, 2008 3:02 AM
  • Thank you for your response. Sorry for my late reply, but the "subscribe to alerts" obviously didn't work...

    I don't know how to attach an image in this forum. Normally, the designer shows a page that has an error icon on it, with a heading "One or more errors encountered while loading the designer...", an error message, a hide and an edit link and a stack trace. (You probably know this.)

    But instead, the designer simply shows this text:
    <html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><title></title><style>.ErrorStyle { font-family: tahoma; font-.......

    Wednesday, August 20, 2008 1:00 PM
  • Hello,

    I know it's an old thread, but I have the same problem too... I think it's happend after installing Internet Explorer 8, but I'm not sure..
    Thursday, May 14, 2009 11:14 AM
  • I have the same problem too and I'm on IE 8.  I was already at IE 8 when I loaded VS.Net 2005 so I don't know if it would work better with an earlier version of IE.  But I would like a solution to this problem!
    Tuesday, May 19, 2009 11:13 PM
  • I have the same problem too and I'm on IE 8.  I was already at IE 8 when I loaded VS.Net 2005 so I don't know if it would work better with an earlier version of IE.  But I would like a solution to this problem!

    I'm having this issue as well, restoring IE7 resolves the issue, but I was hoping a solution would have been posted by MS by now.
    Monday, June 01, 2009 11:03 PM
  • I switched to IE7 and that cleared up the problem for me.  Doesn't seem like any help is coming from MS on this issue.  ;-(
    Tuesday, June 02, 2009 8:51 PM
  • allmost a year and no response from MS?

    this is ridiculous! and anoying

    I'm having the same problem listed here, with IE8, vs2005 SP1, Windows XP 32bits

    IE7 it's a PIA, I don't want to go back. Please, someone from ms, provide some kind of light on this anoying issue.
    Tuesday, June 30, 2009 10:18 PM
  • Yep..same error here...XP Pro, VS2005 SP1, just upgraded to IE8, and the "red bar" error screens in VS2005 show as unformatted HTML when using WinForms designer.

    Help please.
    Tuesday, August 25, 2009 3:45 PM
  • Yep..same error here...XP Pro, VS2005 SP1, just upgraded to IE8, and the "red bar" error screens in VS2005 show as unformatted HTML when using WinForms designer.

    Help please.
    Tuesday, August 25, 2009 3:45 PM
  • Just press F5 (it means "Refresh") and your VS2005 will show 'normal error page' instead of html source!
    I don't know, this is bag or not. May be that is security settings of IE. When I found that file (like 1942F6.tmp in c:\Documents and Settings\Administrator\Local Settings\Temp\) and opened it with IE (I have IE8) it showed me the same html source. But when I pressed F5 for refreshing it showed me normal page. After that I tried pressing F5 in VS2005 and I was successeful!

    PS. Sorry for my English. Hope my advice was useful for you. :-)
    • Edited by Den Hammer Tuesday, September 15, 2009 6:01 PM my bad English :-)
    Tuesday, September 15, 2009 8:41 AM
  • hmmm... never thought of that, Den.  I'll give it a try next time it happens.  Thanks.
    Monday, September 21, 2009 4:47 PM
  • I have same problem after installing IE8.
    VS2005 asks you to either open or save the file. If you press "cancel", then there is nothing to refresh.
    I think that if IE8 could treat .tmp files as .htm files then this would be an answer. Anyone knows how to do that? Many browsers treat files regardless of their extensions, and IE once treated files based on it's content also...

    Tuesday, September 29, 2009 7:53 AM
  • I had the same problem when I write some new class over main class (Form1). You should see warrning in "Error List". "Form1" (your main class) class must be first

    Tuesday, November 10, 2009 4:03 PM
  • I cannot believe there is no solution from Microsoft yet.

    I'm also on IE 8 and having the same problem as everyone else.

    Can someone address this issue PLEASE?    This is an annoying problem.

    Thursday, July 01, 2010 6:17 PM
  • Found a solution that worked for me while using IE8

    http://stackoverflow.com/questions/761155/vs2005-winforms-designer-exception-screen-and-ie8

    Basically

    go into HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.tmp and put in the same settings for .htm

    (Default) htmlfile

    ContentType text/html

    PercievedType text

    Hope this helps

    Thursday, July 15, 2010 1:36 PM
  • Found a solution that worked for me while using IE8

    http://stackoverflow.com/questions/761155/vs2005-winforms-designer-exception-screen-and-ie8

    Basically

    go into HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.tmp and put in the same settings for .htm

    (Default) htmlfile

    ContentType text/html

    PercievedType text

    Hope this helps


    Does not help - Made it worse.

    There must be a fix for this!!!! It's been going on for years.

    I have to close the form and shift+F5 in the code file to get it to open again.

    I know what causes it though (just in case anyone at MS cares). DO NOT TYPE IN PROPERTIES! Always let VS enter them for you.

    Monday, June 27, 2011 11:12 PM