Content from website doesn't display

kwoo 0 Reputation points
2025-06-03T19:07:04.13+00:00

I've published and deployed a web site, but IIS doesn't display it correctly. None of the mark up is displayed in the browser, only comments and page title from my asp.net page. So, it resolves, but doesn't render everything. This is what it looks like.

I've run aspnet_regiis.exe, but it nothing changed. Any idea why the things below are the only ones displayed and what I need to do to display my content?Capture

ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
442 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,631 Reputation points Volunteer Moderator
    2025-06-04T16:24:46.8733333+00:00

    it doesn't look like the IIS website is configured correctly as an asp.net application. check the the app pool for the website is using the correct runtime. also check that asp.net feature is enabled for IIS and the correct .net framework version is installed.

    0 comments No comments

  2. Jack Dang (WICLOUD CORPORATION) 75 Reputation points Microsoft External Staff
    2025-06-17T10:08:08.4933333+00:00

    Hi kwoo,

    Thank you for reaching out to Microsoft Q&A. I understand you're experiencing an issue where your deployed ASP.NET website is not displaying content correctly in the browser—only the page title and comments are visible, with no actual markup rendered.

    Based on the information you've provided, I suspected that you're on a modern version of Windows with IIS 8 or later, where the aspnet_regiis.exe -i command is no longer supported for registering ASP.NET.

    Run this in Command Prompt as Administrator:

    dism /online /enable-feature /featurename:IIS-ASPNET45 /all
    

    dism Stands for Deployment Image Servicing and Management — a command-line tool used to manage Windows features and packages.

    /online Tells DISM to apply the changes to the currently running Windows installation (as opposed to an offline image).

    /enable-feature Instructs DISM to enable a specific Windows feature.

    /featurename:IIS-ASPNET45 Specifies the feature to enable: ASP.NET 4.5 support in IIS — this is required to run .aspx pages and ASP.NET Web Forms apps.

    /all Ensures that all parent dependencies of the feature are also enabled automatically.

    This command:

    Installs ASP.NET 4.5 support in IIS. Ensures that your IIS server can correctly process .aspx pages. Fixes issues where IIS returns 404 or 500 errors due to missing ASP.NET handlers.

    Once done, restart IIS:

    iisreset
    

    Then try accessing your aspx page again.

    You can also check server logs: Review IIS logs (typically located in C disk -> inetpub ->logs->LogFiles) and Windows Event Viewer for errors related to ASP.NET or page loading.

    Next Steps If the above steps do not resolve the issue, please provide the following details to assist further:

    • A screenshot of your IIS site configuration
    • The version of ASP.NET and .NET Framework you're using
    • Any custom routing or web.config settings

    If you need further assistance, feel free to reach out. If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.