Evenementer
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
Mat 4 Chance fir matzemaache kënnt Dir e Konferenz-Pak gewannen an op d’LIVE Grand Finale zu Las Vegas kommen
Méi gewuer ginnDëse Browser gëtt net méi ënnerstëtzt.
Upgrat op Microsoft Edge fir vun de Virdeeler vun leschten Eegeschaften, Sécherheetsupdaten, an techneschem Support ze profitéieren.
Wichteg
ASP.NET Core preview releases with Azure App Service
ASP.NET Core preview releases aren't deployed to Azure App Service by default. To host an app that uses an ASP.NET Core preview release, see Deploy ASP.NET Core preview release to Azure App Service.
To troubleshoot an App Service deployment issue, see Troubleshoot ASP.NET Core on Azure App Service and IIS.
Open a free Azure account if you don't have one.
Start Visual Studio 2022 and select Create a new project.
In the Create a new project dialog, select ASP.NET Core Web App, and then select Next.
In the Configure your new project dialog, name your project, and then select Next.
In the Additional information dialog:
Visual Studio creates the solution.
Select Register and register a new user. You can use a fictitious email address. When you submit, the page displays the following error:
"A database operation failed while processing the request. Applying existing migrations may resolve this issue"
Select Apply Migrations and, once the page updates, refresh the page.
The app displays the email used to register the new user and a Logout link.
Right-click on the project in Solution Explorer and select Publish.
In the Publish dialog:
In the Publish dialog:
In the Publish dialog, in the App Service tab, select Create new.
The Create App Service dialog appears:
After creation is completed the dialog is automatically closed and the Publish dialog gets focus again:
The Publish profile creation progress dialog confirms the publish profile was created. Select Close.
Next you see the Publish Profile summary page. Visual Studio has detected that this application requires a SQL Server database which it has listed in the Service Dependencies pane. Select the ellipsis (...) and then Connect.
The Connect to dependency dialog appears:
In the Connect to Azure SQL database dialog, select Create new.
The Create Azure SQL Database appears:
After creation is completed the dialog is automatically closed and the Connect to Azure SQL Database dialog gets focus again:
In the next step of the Connect to Azure SQL Database dialog:
The Dependency configuration progress dialog confirms the Azure SQL Database is configured. Select Close.
In the Publish Profile summary page select More actions > Edit:
On the Settings tab of the Publish dialog:
Expand Databases and check Use this connection string at runtime.
Expand Entity Framework Migrations and select Apply this migration on publish.
Select Save. Visual Studio returns to the Publish dialog.
Click Publish. Visual Studio publishes your app to Azure. When the deployment completes.
The app is opened in a browser. Register a new user and log in as the new user to validate the database deployment and run-time connection.
Edit the Pages/Index.cshtml
Razor page and change its contents, then save the changes. For example, you can modify the paragraph to say "Hello ASP.NET Core!":
@page
@model IndexModel
@{
ViewData["Title"] = "Home page";
}
<div class="text-center">
<h1 class="display-4">Welcome</h1>
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
<p>Hello ASP.NET Core!</p>
</div>
Select Publish from the Publish Profile summary page again.
When you have finished testing the app, go to the Azure portal and delete the app.
Feedback zu ASP.NET Core
ASP.NET Core ass en Open-Source-Projet. Wielt e Link, fir Feedback ze ginn:
Evenementer
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
Mat 4 Chance fir matzemaache kënnt Dir e Konferenz-Pak gewannen an op d’LIVE Grand Finale zu Las Vegas kommen
Méi gewuer ginn