register .NET framework in IIS

ASP.NET 4.5 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.5 in order for your site to run correctly.

You may get error of different version instead of 4.5 according to your configuration. So to register framework in IIS, run the following command in command window.

  • Register framework to IIS without changing existing web applications to use this version of ASP.net

C:\windows\Microsoft.NET\Framework\v4.0.30319->aspnet_regiis –ir

  • Or Installing framework to IIS

C:\windows\Microsoft.NET\Framework\v4.0.30319->aspnet_regiis –i

This installed ASP.NET version v4.0.30319 without updating all script maps. After installing Rational

System Architect XT, the following command was run:

C:\windows\Microsoft.NET\Framework\v4.0.30319->aspnet_regiis -s W3SVC/1/ROOT/SAXT

This installed ASP.NET version v4.0.30319 at the specified application root and its subfolders. All existing script maps in the specified path and below were updated.

For the Rational System Architect XT Web Service add-on product, the Registration tool was run with the following command:

C:\windows\Microsoft.NET\Framework\v4.0.30319->aspnet_regiis -sW3SVC/1/ROOT/SAXTWebService

MVC 3.5 Helper

Org: https://docs.microsoft.com/en-us/aspnet/web-pages/overview/ui-layouts-and-themes/creating-and-using-a-helper-in-an-aspnet-web-pages-site

Using the Helper in a Page

  1. In the root folder, create a new blank file called TestHelper.cshtml.
  2. Add the following code to the file:
    HTMLCopy
    <!DOCTYPE html>
      <head>
        <title>Test Helpers Page</title>
      </head>
      <body>
        <p>This is some opening paragraph text.</p>
    
        <!-- Insert the call to your note helper here. -->
        @MyHelpers.MakeNote("My test note content.")
    
        <p>This is some following text.</p>
      </body>
    </html>
    

    To call the helper you created, use @ followed by the file name where the helper is, a dot, and then the helper name. (If you had multiple folders in the App_Code folder, you could use the syntax @FolderName.FileName.HelperName to call your helper within any nested folder level). The text that you add in quotation marks within the parentheses is the text that the helper will display as part of the note in the web page.

  3. Save the page and run it in a browser. The helper generates the note item right where you called the helper: between the two paragraphs.

    Screenshot showing the page in the browser and how the helper generated markup that puts a box around the specified text.

%d bloggers like this: