CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Posts
    4

    Question IE prompts to download or open file when .aspx with web user control is launced

    I have a control.ascx file which contains a very simple web user control with just a line of static text. And I have put this control into a web form, called webform.aspx.

    The problem is when I try to view the aspx file in IE, I get a prompt saying "... downloading webform.aspx from localhost. Do you want to save or open the file?". If I click "open", then the source code is opened in visual studio .net.

    If I remove the line "<% @Register .... %>", then the page displays in IE ... but of course I won't be able to see the web user control.

    Has anyone of you encountered this before? Please help.

  2. #2
    Join Date
    Mar 2003
    Posts
    4

    Problem solved - Just run aspnet_regiis.exe

    Hi guys, I have solved the problem. It happened because the asp.net file extensions such as aspx, ascx, etc were not registered in IIS. In order to fix that, just run aspnet_regiis in command prompt.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured