Windows features asp net

Установка ASP.NET 4,5 в Windows 8 и Windows Server 2012

В этой статье объясняется, почему не удается установить или удалить ASP.NET 4,5 в Microsoft Windows 8 с помощью служебной программы Aspnet_regiis.exe и поможет решить эту проблему.

Исходная версия продукта: ASP.NET на платформе .NET Framework 4.5.2, Windows 8, Windows Server 2012
Исходный номер статьи базы знаний: 2736284

Симптомы

В предыдущих версиях Windows, на которых запущены службы IIS, эту aspnet_regiis -I команду можно использовать для установки компонента ASP.NET. Начиная с Windows 8, при попытке установить ASP.NET с помощью программы Aspnet_regiis.exe могут возникнуть следующие проблемы:

Если вы запускаете aspnet_regiis -I установку ASP.NET 4,5 в IIS 8, появится сообщение об ошибке, аналогичное следующему:

Этот параметр не поддерживается в этой версии операционной системы. Вместо этого администраторы должны установить или удалить ASP.NET 4,5 с IIS8 с помощью диалогового окна Включение компонентов Windows, средства управления диспетчера серверов или dism.exe средства командной строки. Более подробную информацию можно узнать в статье https://go.microsoft.com/fwlink/?linkid=216771 .

Если у вас есть приложение, использующее установочные проекты для установки приложения в службах IIS, то установка не сможет включить ASP.NET 4,5, и приложение может не установиться.

Если вы установили приложение в Windows 8, которое пытается установить ASP.NET 4,5 с помощью aspnet_regiis -I , приложение не сможет включить ASP.NET 4,5.

Причина

Служебная программа Aspnet_regiis.exe больше не используется для установки и удаления ASP.NET 4,5 в Windows 8. ASP.NET 4,5 теперь является компонентом Windows и может быть установлен и удален, как и любой другой компонент Windows.

Решение

Чтобы установить или удалить ASP.NET 4,5 в Windows 8 или Windows Server 2012, используйте один из следующих параметров:

Выполните следующую команду из командной строки администратора:

ASP.NET overview

ASP.NET is a free web framework for building great websites and web applications using HTML, CSS, and JavaScript. You can also create Web APIs and use real-time technologies like Web Sockets.

Get started

Install Visual Studio 2019 Community edition, a free IDE for ASP.NET on Windows.

Websites and web applications

ASP.NET offers three frameworks for creating web applications: Web Forms, ASP.NET MVC, and ASP.NET Web Pages. All three frameworks are stable and mature, and you can create great web applications with any of them. No matter what framework you choose, you will get all the benefits and features of ASP.NET everywhere.

Each framework targets a different development style. The one you choose depends on a combination of your programming assets (knowledge, skills, and development experience), the type of application you’re creating, and the development approach you’re comfortable with.

Below is an overview of each of the frameworks and some ideas for how to choose between them. If you prefer a video introduction, see Making Websites with ASP.NET and What is Web Tools?

If you have experience in Development style Expertise
Web Forms Win Forms, WPF, .NET Rapid development using a rich library of controls that encapsulate HTML markup Mid-Level, Advanced RAD
MVC Ruby on Rails, .NET Full control over HTML markup, code and markup separated, and easy to write tests. The best choice for mobile and single-page applications (SPA). Mid-Level, Advanced
Web Pages Classic ASP, PHP HTML markup and your code together in the same file New, Mid-Level

Web Forms

With ASP.NET Web Forms, you can build dynamic websites using a familiar drag-and-drop, event-driven model. A design surface and hundreds of controls and components let you rapidly build sophisticated, powerful UI-driven sites with data access.

ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and that gives you full control over markup for enjoyable, agile development. ASP.NET MVC includes many features that enable fast, TDD-friendly development for creating sophisticated applications that use the latest web standards.

ASP.NET Web Pages

ASP.NET Web Pages and the Razor syntax provide a fast, approachable, and lightweight way to combine server code with HTML to create dynamic web content. Connect to databases, add video, link to social networking sites, and include many more features that help you create beautiful sites that conform to the latest web standards.

Notes about Web Forms, MVC, and Web Pages

All three ASP.NET frameworks are based on the .NET Framework and share core functionality of .NET and of ASP.NET. For example, all three frameworks offer a login security model based around membership, and all three share the same facilities for managing requests, handling sessions, and so on that are part of the core ASP.NET functionality.

In addition, the three frameworks are not entirely independent, and choosing one does not preclude using another. Since the frameworks can coexist in the same web application, it’s not uncommon to see individual components of applications written using different frameworks. For example, customer-facing portions of an app might be developed in MVC to optimize the markup, while the data access and administrative portions are developed in Web Forms to take advantage of data controls and simple data access.

Web APIs

ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.

Real-time technologies

ASP.NET SignalR is a new library for ASP.NET developers that makes developing real-time web functionality easier. SignalR allows bi-directional communication between server and client. Servers can push content to connected clients instantly as it becomes available. SignalR supports Web Sockets, and falls back to other compatible techniques for older browsers. SignalR includes APIs for connection management (for instance, connect and disconnect events), grouping connections, and authorization.

Mobile apps and sites

ASP.NET can power native mobile apps with a Web API back end, as well as mobile web sites using responsive design frameworks like Twitter Bootstrap. If you are building a native mobile app, it’s easy to create a JSON-based Web API to handle data access, authentication, and push notifications for your app. If you are building a responsive mobile site, you can use any CSS framework or open grid system you prefer, or select a powerful mobile system like jQuery Mobile or Sencha and great mobile applications with PhoneGap.

Single-page applications

ASP.NET Single Page Application (SPA) helps you build applications that include significant client-side interactions using HTML 5, CSS 3 and JavaScript. Visual Studio includes a template for building single page applications using knockout.js and ASP.NET Web API. In addition to the built-in SPA template, community-created SPA templates are also available for download.

WebHooks

WebHooks is a lightweight HTTP pattern providing a simple pub/sub model for wiring together Web APIs and SaaS services. When an event happens in a service, a notification is sent in the form of an HTTP POST request to registered subscribers. The POST request contains information about the event which makes it possible for the receiver to act accordingly.

WebHooks are exposed by a large number of services including Dropbox, GitHub, Instagram, MailChimp, PayPal, Slack, Trello, and many more. For example, a WebHook can indicate that a file has changed in Dropbox, or a code change has been committed in GitHub, or a payment has been initiated in PayPal, or a card has been created in Trello.

ASP.NET

Free. Cross-platform. Open source.
A framework for building web apps and services with .NET and C#.

Supported on macOS, Windows, and Linux

Web Apps

Build full stack web apps with HTML, CSS, JavaScript, and C#

Develop REST APIs for a range of clients, including browsers and mobile devices

Real-time

Enable bi-directional communication between server and client, in real-time

Microservices

Create independently deployable microservices that run on Docker containers

What is ASP.NET?

.NET is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.

ASP.NET extends the .NET developer platform with tools and libraries specifically for building web apps.

Learn ASP.NET

Learn about all ASP.NET has to offer with our tutorials, video courses, and docs.

Fast and scalable

ASP.NET performs faster than any popular web framework in the independent TechEmpower benchmarks.

Data sourced from official tests available at TechEmpower Round 20.

Build secure apps

ASP.NET supports industry standard authentication protocols. Built-in features help protect your apps against cross-site scripting (XSS) and cross-site request forgery (CSRF).

ASP.NET provides a built-in user database with support for multi-factor authentication and external authentication with Google, Twitter, and more.

Active community and open-source

Get quick answers to questions with an active community of developers on Stack Overflow, ASP.NET forums, and more.

NET is open source on GitHub, with over 100,000 contributions and 3,700 companies already contributing.

Free hosting on Azure

Get 10 ASP.NET websites for free with Microsoft Azure.

You can also deploy to any major cloud platform, your own Linux or Windows servers, or one of many hosting providers.

Configuring Step 1: Install IIS and ASP.NET Modules

The first step in building an ASP.NET website on IIS 8 is to install IIS along with the ASP.NET modules. Then add your ASP.NET application files to IIS.

When you are done, make sure that IIS and the ASP.NET modules are installed, and your ASP.NET application has been added to your website. Then go on to Step 2: Configure ASP.NET Settings.

Installing IIS and ASP.NET Modules

This section describes how to install IIS and the modules that support ASP.NET applications in any of the following ways:

  • Install IIS on Windows ServerВ® 2012 using the IIS Manager UI.
  • Install IIS on WindowsВ® 8 using the IIS Manager UI.
  • Install IIS using the command line.

To install IIS on either Windows Server 2012 or Windows 8, you must sign on as a member of the Administrators group.

If you prefer, you could use the Web Platform Installer (Web PI) to install IIS and third-party applications that run on IIS. Because the Web PI installs the latest versions of available Web Platform offerings, with just a few simple clicks you can download and install any new tools or updates. To learn more about the Web PI, see Learn more and install the Web PI.

If you support web applications written using ASP.NET 2 to 3.5, install .NET 3.5 before installing IIS and ASP.NET modules.

To install .NET 3.5 on Windows Server 2012 or Windows 8

  1. On the Start screen, right-click the Command Prompt tile, and then click Run as administrator.
  2. At the command prompt, type the following: dism /online /enable-feature /featurename:netfx3
  3. Wait for the command to complete. It could take several minutes.
  4. Close the command prompt window.

To install IIS and ASP.NET modules on Windows Server 2012 using the UI

On the Start page, click the Server Manager tile, and then click OK.

In Server Manager, select Dashboard, and click Add roles and features.

In the Add Roles and Features Wizard, on the Before you begin page, click Next.

On the Select installation type page, select Role-based or feature-based installation, and click Next.

On the Select destination server page, select Select a server from the server pool, select your server, and click Next.

On the Select server roles page, select Web Server (IIS), and click Next.

On the Select features page, click Next.

On the Web Server Role (IIS) page, click Next.

On the Select role services page, note the preselected role services that are installed by default, expand the Application Development node, and then select ASP.NET 4.5. (If you installed .NET 3.5, select ASP.NET 3.5 also.)

On the Summary of Features to Install page, confirm your selections, and then click Install.

In the Add features that are required for ASP.NET 4.5? box, click Add Features. The following additional features are added:

  • .NET Extensibility 4.5
  • ISAPI Extensions
  • ISAPI Filters
  • .NET Extensibility 3.5 (If ASP.NET 3.5 was selected)

Click Next.

On the Confirm installation selections page, click Install.

On the Installation progress page, confirm that your installation of the Web Server (IIS) role and required role services completed successfully, and then click Close.

To verify that IIS installed successfully, type the following into a web browser:

The default IIS Welcome page is displayed.

To install IIS and ASP.NET modules on Windows 8 by using the UI

On the Start page, click the Control Panel tile.

In Control Panel, click Programs, and then click Turn Windows features on or off.

In the Windows Features dialog box, click Internet Information Services to install the default features.

Expand the Application Development Features node and click ASP.NET 4.5 to add the features that support ASP.NET. (If you installed .NET 3.5, select ASP.NET 3.5 also.) The following additional features are automatically selected:

  • .NET Extensibility 4.5
  • ISAPI Extensions
  • ISAPI Filters
  • .NET Extensibility 3.5 (If ASP.NET 3.5 was selected)

Click OK to close the Windows Features dialog box.

To verify that IIS installed successfully, type the following into a web browser:

The default IIS Welcome page is displayed.

To install IIS and ASP.NET modules by using the command line

Type the following command at a Command Prompt or into a script:

Start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-Security;IIS-RequestFiltering;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;IIS-ManagementConsole;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI

Adding the ASP.NET Application

This section describes how to add your ASP.NET application to your website in the following ways:

  • Adding an ASP.NET Application with the IIS Manager UI
  • Adding an ASP.NET application with the command line

In Plan an ASP.NET Website on IIS, you made the following decisions:

  • Alias string that becomes part of the application root URL.
  • Application pool to run the application in.
  • Physical path to the application files on the server.

To add an ASP.NET application by using the UI

Open IIS Manager.

  • For Windows Server 2012, on the Start page click the Server Manager tile, and then click OK. In Server Manager, click the Tools menu, and then click Internet Information Services (IIS) Manager.
  • For Windows 8, on the Start page type Control Panel, and then click the Control Panel icon in the search results. On the Control Panel screen, click System and Security, click Administrative Tools, and then click Internet Information Services (IIS) Manager.

In the Connections pane, expand the Sites node.

Right-click the site for which you want to create an application, and click Add Application.

In the Alias text box, type a value for the application URL, such as marketing. This value is used to access the application in a URL.

Click Select if you want to select a different application pool than the one listed in the Application pool box. In the Select Application Pool dialog box, select an application pool from the Application pool list and then click OK.

In the Physical path text box, type the physical path of the application’s folder, or click the browse button (. ) to navigate the file system to find the folder.

Optionally, click Connect as to specify credentials that have permission to access the physical path. If you do not use specific credentials, select the Application user (pass-through authentication) option on the Connect As dialog box.

Optionally, click Test Settings to verify the settings that you specified for the application.

Click OK.

To add an ASP.NET application by using the command line

To add an application to a site, use the following syntax:

appcmd add app /site.name:string /path:string /physicalPath:string

The variable site.name:string is the name of the website to which you want to add the application. The variable path:string is the virtual path of the application, such as /application , and physicalPath:string is the physical path of the application content in the file system.

For example, to add an application named marketing to a site named contoso, with content at c:\application , type the following at the command prompt, and then press ENTER:

Читайте также:  Asus x553sa установка windows
Оцените статью