Git Product home page Git Product logo

kontent-ai / sample-app-net Goto Github PK

View Code? Open in Web Editor NEW
19.0 28.0 65.0 3.48 MB

Sample .NET MVC web application using the Kontent.ai Delivery .NET SDK to retrieve content

Home Page: https://docs.kontent.ai/tutorials/develop-apps?tech=dotnet

License: MIT License

C# 28.89% JavaScript 0.90% PowerShell 0.23% HTML 20.16% Less 49.73% Shell 0.08%
asp-net-mvc aspnet-mvc content-delivery headless-cms delivery-api kentico-kontent dotnet-core netcore31 netcore net5

sample-app-net's Introduction

Kontent.ai sample ASP.NET Core MVC web application

Build & Test codecov Stack Overflow Discord

This is a sample ASP.NET Core MVC app that uses the Kontent.ai Delivery .NET SDK to retrieve content from Kontent.ai.

Getting started

To run the app:

  1. Clone the app repository

  2. Run npm install && npm run build in the DancingGoat directory to build CSS files for the project (node.js must be installed before running this command)

  3. Open the DancingGoat.sln solution file and run the app

  4. Follow the setup wizard to setup your project or adjust the \DancingGoat\appsettings.json file:

    {
      // ...
      "DeliveryOptions": {
        "ProjectId": "YOUR_PROJECT_ID"
      }
      // ...
    }

Follow the step-by-step tutorial for even more details.

Features

Model generation

With the help of Kontent.ai model generator you can generate models from your project. This process will create classes that you can work with within your codebase. To run the generation, use the Powershell script ./DancingGoat/Tools/GenerateModels.ps1 or Bash script ./DancingGoat/Tools/GenerateModels.sh.

Be aware that by default, the scripts downloads the models from the default Dancing Goat project. If you want to download models from your custom project, change the project id inside the script file.

Edit mode & preview

Content contributors sometimes need to fix errors or typos right when they see them on the website. The sample app allows users to navigate from a piece of content on the site straight to the corresponding content item or element in Kontent.ai.

To see Edit mode in action:

  1. In your Kontent.ai project navigate to Project Settings -> API keys to get the Preview API key.

  2. Enable Delivery Preview API by adding the key to the \DancingGoat\appsettings.json file:

    {
      // ...
      "DeliveryOptions": {
        "UsePreviewApi": true,
        "PreviewApiKey": "YOUR_DELIVERY_PREVIEW_API_KEY"
      }
      // ...
    }
    • Delivery Preview API: change the key named PreviewApiKey in the DeliveryOptions section, and use the Delivery Preview API key as its value. To enable calls over the Delivery Preview API, you also need to change the value to true of the key named UsePreviewApi.
  3. Run the app.

  4. Navigate to the About us section.

  5. Click the Edit mode switch in the bottom-left corner.

Edit buttons will appear next to each piece of content on the page. To explore how the functionality is implemented, navigate to the TagHelpers folder.

Responsive images

The sample app contains a sample implementation of the img-asset tag helper from the Kontent.Ai.AspNetCore NuGet package. Using the img-asset tag helper, you can easily create an img tag with srcset and sizes attributes. Read more about image transformation API. You can adjust the behaviour in the appsettings.json file.

"ImageTransformationOptions": {
  "ResponsiveWidths": [ 200, 400, 600, 800, 1000, 1200, 1400, 1600, 2000, 4000 ]
},

Localized routing

The app demonstrates the usage of language prefixes (e.g. /en-US/articles) for localizing URLs for SEO purposes. Each language is identified by its codename, in case of this project, it is en-US and es-ES. The used language is obtained from the URL via /DancingGoat/Infrastructure/RouteRequestCultureProvider and set as the culture of the app.

Get involved

Check out the contributing page to see the best places to file issues, start discussions, and begin contributing.

sample-app-net's People

Contributors

alesk-kentico avatar amoraitis avatar christopherjennings avatar colliercz avatar dependabot[bot] avatar hejtmii avatar huluvu21 avatar ivankiral avatar jahuhu10 avatar jancerman avatar josefdvorak avatar juraju-kentico avatar kenticomartins avatar kontent-ai-bot avatar lukaspirkl avatar mareksalat avatar martin-knapik avatar matus12 avatar peterskoda avatar petrsvihlik avatar simply007 avatar steve-fenton avatar suzii avatar tobiaskamenicky avatar tomashruby avatar tomasjurasek avatar winklertomas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sample-app-net's Issues

Unable to Deploy to AWS Bean Stalk from Bamboo

Brief bug description

I am trying to deploy to Beanstalk from bamboo but failing with errors below whereas if I deploy from VS 2017 to the same env deployment is getting succeeded.

Command hooks (HooksExecutor.exe appdeploy\enact) failed
2020-05-20 05:59:50,865 [ERROR] Error encountered during build of Hook-EnactAppDeploy: Command hooks failed
Traceback (most recent call last):
File "cfnbootstrap\construction.pyc", line 544, in run_config
File "cfnbootstrap\construction.pyc", line 138, in run_commands
File "cfnbootstrap\command_tool.pyc", line 117, in apply
ToolError: Command hooks failed
2020-05-20 05:59:50,865 [ERROR] -----------------------BUILD FAILED!------------------------
2020-05-20 05:59:50,865 [ERROR] Unhandled exception during build: Command hooks failed
Traceback (most recent call last):
File "cfn-init", line 171, in
File "cfnbootstrap\construction.pyc", line 129, in build
File "cfnbootstrap\construction.pyc", line 530, in build
File "cfnbootstrap\construction.pyc", line 544, in run_config
File "cfnbootstrap\construction.pyc", line 138, in run_commands
File "cfnbootstrap\command_tool.pyc", line 117, in apply
ToolError: Command hooks failed
What went wrong?
Beanstalk Env creation

Repro steps

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Site to be up
What the correct behavior is?
Command hooks (HooksExecutor.exe appdeploy\enact) failed
2020-05-20 05:59:50,865 [ERROR] Error encountered during build of Hook-EnactAppDeploy: Command hooks failed
Traceback (most recent call last):
File "cfnbootstrap\construction.pyc", line 544, in run_config
File "cfnbootstrap\construction.pyc", line 138, in run_commands
File "cfnbootstrap\command_tool.pyc", line 117, in apply
ToolError: Command hooks failed
2020-05-20 05:59:50,865 [ERROR] -----------------------BUILD FAILED!------------------------
2020-05-20 05:59:50,865 [ERROR] Unhandled exception during build: Command hooks failed
Traceback (most recent call last):
File "cfn-init", line 171, in
File "cfnbootstrap\construction.pyc", line 129, in build
File "cfnbootstrap\construction.pyc", line 530, in build
File "cfnbootstrap\construction.pyc", line 544, in run_config
File "cfnbootstrap\construction.pyc", line 138, in run_commands
File "cfnbootstrap\command_tool.pyc", line 117, in apply
ToolError: Command hooks failed

Test environment

  • Platform/OS: [e.g. .NET Core 2.1, iOS] IIS 10.0 running on 64bit Windows Server 2016/2.5.5

  • Browser [e.g. chrome, safari] Mozilla Firefox
    siteerror.docx

  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

Screenshots

Add links to screenshots, if possible.

Add an example of the languages endpoint usage

Demonstrate the code first approach

The Delivery client 4.0.0 brings new functionality in terms of retrieving strongly-typed models.
It's documented here: https://github.com/Kentico/delivery-sdk-net/wiki/Working-with-Strongly-Typed-Models-(aka-Code-First-Approach)

We should demonstrate the usage on this sample site.

Steps:

  1. Create a free kentico cloud account, a sample project will be generated
  2. Spin up the web site according to the README file
  3. Change the KenticoCloud.Deliver nuget package to KenticoCloud.Delivery 4.0.0
  4. Fix any breaking changes
  5. Generate the models using https://github.com/Kentico/cloud-generators-net (by pointing the utility to the sample project)
  6. Replace the models in: https://github.com/Kentico/cloud-sample-app-net/tree/master/DancingGoat/Models with the generated ones (replace all files matching the pattern *ViewModel.cs)
  7. The extra logic (e.g. GetManufacturerFilters()) can be added via partial classes...keep the partial classes in separate files (this will allow the models to be regenerated using the utility at any time)
  8. Test the implementation
  9. Submit a pull request
  10. Log your developer experience in this issue (was the generator working properly? is the SDK easy to use? is there anything missing from a developer's point of view?)

Introduce viewmodels

Motivation

We'd like to make views more testable. View models make them decoupled from the business logic models and they also can be easily mocked.

Design guidelines

Similarly to the EMS'es Dancing Goat site, views should have their own models - viewmodels. It will help separate concerns and layers.

The controllers will take care of mapping viewmodels to models coming from the data layer. Preferably, we should use AutoMapper.

This is a prerequisite to: #32

E.g. https://github.com/Kentico/Mvc/tree/master/src/DancingGoat/Models/Cafes

Reference

Help Rookies With App Settings

Hello,

I followed the docs to set up the project against my sample account and added the three config items to the web.config.

I didn't spot that the Project ID was already at the bottom of the app settings, so the requests were being sent to the wrong account and authorization was failing with:

The page cannot be displayed because an internal server error has occurred.

And under the hood:

Exception type: DeliveryException 
Exception message: Access token does not provide the permissions required for the project.

My suggestion is to move the existing ProjectId app setting up and separate it from the usual MVC app settings so people spot it and replace it - as having it last means it will win in situations where people add the app settings at the start of the app settings section.

Thanks,

Steve

Deprecated packages upgrade

Motivation

Solution is not buildable when trying to upgrade deprecated package "Kentico.AspNetCore.LocalizedRouting" to "AspNetCore.Mvc.Routing.Localization"

Proposed solution

I see there is already work in progress in branches, however I wanted to ask about plans and timeline for releasing updates.

Streamline the selection of elements to be loaded into models

Blocked by: #35

Motivation

Currently, the developer needs to name elements that should be loaded from KC. If the data is used at multiple places, it's hard to keep track of what needs to be included in the model at which place.
We'd like to come up with a way of defining elements that are necessary to successfully render a view.

Design guidelines

An idea was to use the (view)models as the source of truth.

There should be a way to construct ElementsParameter just by providing a viewmodel.

Include information about the "Generate Models" PS script on build

Motivation

The automatically generated models driven by:

https://github.com/kontent-ai/sample-app-net/blob/master/DancingGoat/DancingGoat.csproj#L46
and
https://github.com/kontent-ai/sample-app-net/tree/master/DancingGoat/Tools

are confusing to new users exploring the sample .NET application. On build, the PowerShell script generates models from a default sample project, which doesn't reflect the changes in models a user may have made to the content model in their own project.

Proposed solution

Add a disclaimer to the README describing the PowerShell script's purpose, benefits, and how it can be adjusted/disabled.

Additional context

The automatically generated models can be useful for demonstrating the model generator's capabilities and ensuring the application is aligned with the sample in its original state, but the automatic behavior can be confusing to users evaluating the platform and experimenting with the sample.

Support runnable templates

Similarly to kontent-ai/boilerplate-net#1, we'd like to support the new VS tooling and be able to install the site using the dotnet new command.

Ideally, the template should be parameterized with the project guid.

All necessary resources can be found in the related task.

Secure Sections

Hope I'm not missing something obvious.

What would be the general way to go about putting certain sections (received from kentico cloud) behind a login screen.

Add a test project

Blocked by #35 .

Motivation

The sample application is often used to demo the overall concept of headless CMS to non-technical people. It is highly undesired to see exceptions or perhaps missing pieces of content in the output pages.

Proposed solution

Once the application is ported to ASP.NET Core MVC, it will make sense to add a test project.

  • Create an example unit test that would test controller by providing mocked responses as described here.
  • Add an example of a UI test
  • Make sure the tests run locally and in AppVeyor

Reference

Try Advanced Routing/Filtering Scenarios

Try some advanced routing scenarios to verify whether there needs to be support for them in the KC product itself. Or, whether it is possible (or even better) to implement them on the app side.

The goal is to verify whether the MVC app could return proper content based on such types of URLs.

Scenario 1:

  • blog/
    • april-2017/ (automatically recognized in requests and mapped to month and year metadata)
      • blogpost-1

Scenario 2:

  • products/
    • coffee/ (automatically recognized and mapped to product type metadata)
      • brazil-natural-barra-grande (automatically recognized and mapped to the URL slug)

Scenario 3:

  • products/
    • coffee/ (automatically recognized and mapped to product type metadata)
      • brazillian/ (automatically recognized and mapped to coffee type metadata)

It should be relatively easy to support such scenarios with just the ASP.NET MVC routing and a few well-known elements in KC content types.

  1. Try to find an architecture that's as closely aligned to MVC conventions as possible.
  2. Try to implement it in at least one of the scenarios above.
  3. If you find that there's something that could be (or need to be) improved in Kentico Cloud or the .NET SDK, share your detailed thoughts.

Add error logging

Motivation

Sometimes, we receive error reports regarding this sample app. These reports lack detailed information. In some cases, the app just returns 500: Internal Server Error.

Solution

Use a simple error logging library such as Serilog to:

  • catch errors in controllers and especially razor views

Make sure that the logging is configurable (verbosity/output format/etc.) and that it's by default turned off.

It may make sense to wait for #13 to be implemented.

Demonstrate the URL slug

Once we add relevant sample content to the sample project we'd like to update this sample app to reflect the changes and demonstrate the URL slug functionality.

Internal reference: DEL-665

Switching the language does not preserve current route

Brief bug description

If you navigate to a specific page (other than home) and switch languages - the site is redirected to Home rather than styling on the page you were switching the language from.

Repro steps

  1. Go to '~/en-US/cafes'
  2. Click on Language selector and select Spanish
  3. You are redirected to ~/es-ES/inicio

Expected behavior

You should beredirected to ~/es-ES/cafeterias/indice

Test environment

  • Platform/OS: .NET 6, WIndows 10
  • Browser Chrome
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

Creating a new sample project fails

Upon creating a new sample project via the administration section, the request fails with 400 bad request.

Investigation: There has been an unannounced breaking change in the API surface.

Demonstrate the multiple choice element

Once we add relevant sample content to the sample project we'd like to update this sample app to reflect the changes and demonstrate the multiple choice element.

Internal reference: DEL-680

Localized URLs don't return expected localized pages

Brief bug description

Entering a URL containing the Spanish culture code or localized route without culture code directly into the address bar returns the default English version of the page or returns 404.

Using the navigation bar also yields unexpected address bar URLs.

Actual vs. Expected Results:

  1. Directly entered URLs and results:
  1. The English home page catches some invalid urls:
  1. Using the links in the navigation bar render the English controller name even when the Spanish language has been chosen:

Steps for Repro:

  1. Click "Spanish" from the language selector on Home
  2. Click "Artículos" in the navigation bar

Replace hardcoded content type and element names with generated ones

In order to follow the best practices, the sample app should use generated content type and content element code names instead of hard-coded strings.

Content type code names:

Elements code names:

  • Do that same for element names, eg. new ElementsParameter("image", "price", "product_status", "processing", "url_pattern")

All models should already contain generated codenames, if not, it's possible to regenerate them using this utility.

Migrate the application to ASP.NET Core MVC

Target ASP.NET Core version: 2.1.0

Expected changes:

  • NuGet packages:
    • microsoft.* and system.* should be fine (they should have their .net standard alternative)
    • anglesharp supports netstandard = ok
    • kenticocloud.* supports netstandard = ok
    • jquery&bootstrap are not dependent on clr = ok
    • antlr is used by webgrease which is used by Microsoft.AspNet.Web.Optimization (for js/css bundling)...we can replace it with an analogical asp.net core package...see the docs
  • Configuration.
  • take advantage of Dependency Injection to inject services like DeliveryClient into controllers.
  • There may be some places where we can make use of the view components and some other new ASP.NET Core functionality.
  • Changes in multilingual support
  • appveyor.yml in case the build procedure needs some adjustments (e.g. change the platform)

Workflow:

  • We won't merge it to master until it's done and thoroughly tested.
  • Before we merge the changes, we'll backup the original code in a separate branch.

Feel free to refactor the code to use the latest standards.

Other things to consider during the conversion:

Add support for content type snippets

Kentico Cloud now supports so called content type snippets. These are sets of content elements that can be added to content types to enrich their structure.

They allow you to add several content elements that are managed in one single place, similarly to how inheritance in object oriented programming works. You can add one snippet to a content type. Snippets cannot be added to other snippets, only to content types. The Delivery API responses contain both the elements originating from snippets alongside their own elements. The only difference in them is that elements from snippets have code names prefixed with the code name of the respective snippet. The format of code names is [code name of snippet]__[code name of element].

A shortened example of a content item:

{
    "item": {
        "system": {
            // ...
            "type": "brewer",
	// ...
        },
        "elements": {
	// ...
            "product_name": {
                "type": "text",
                "name": "Product name",
                "value": "AeroPress"
            },
	// ...
            "metadata__meta_title": {
                "type": "text",
                "name": "Meta title",
                "value": null
            },
	// ...
        }
    },
    "modular_content": {}
}

Implement support for rendering content items of content types that utilize a content snippet.

A temporary Dancing Goat project with a preview of snippets is available for everyone who wants to participate in this effort. If you're interested in either adjusting the sample content or implementing the support in the app, let @JanLenoch know and you'll be given access to that project in Kentico Cloud.

The implementation should be in line with how the code generatorworks.

Currently, this issue is blocked by kontent-ai/model-generator-net#43 . But, the models of this app could be modified manually to overcome the block.

Migrate the application to ASP.NET Core MVC

Target ASP.NET Core version: 3.1

Expected changes:

  • NuGet packages:
    • microsoft.* and system.* should be fine (they should have their .net standard alternative)
    • anglesharp supports netstandard = ok
    • kenticocloud.* supports netstandard = ok
    • jquery&bootstrap are not dependent on clr = ok
    • antlr is used by webgrease which is used by Microsoft.AspNet.Web.Optimization (for js/css bundling)...we can replace it with an analogical asp.net core package...see the docs
  • Configuration.
  • take advantage of Dependency Injection to inject services like DeliveryClient into controllers.
  • There may be some places where we can make use of the view components and some other new ASP.NET Core functionality.
  • Changes in multilingual support
  • appveyor.yml in case the build procedure needs some adjustments (e.g. change the platform)

Workflow:

  • We won't merge it to master until it's done and thoroughly tested.
  • Before we merge the changes, we'll backup the original code in a separate branch.

Feel free to refactor the code to use the latest standards.

Other things to consider during the conversion:

Use smart-link SDK instead of custom made tag helper

Motivation

The project currently uses a custom-made tag helper that allows for opening Kontent UI after a click. It would be superb if it could leverage kontent-smart-link SDK and so Dancing Goat was made Web Spotlight ready.

Proposed solution

Use UMD bundle instead of currently used (EditLinkTagHelper)[ https://github.com/Kentico/kontent-sample-app-net/blob/master/DancingGoat/TagHelpers/EditLinkTagHelper.cs].

Additional context

Error on build inheriting ICodeFirstTypeProvider in DancingGoat.Models

Brief bug description

After cloning the repository to my local machine and opening the solution in Visual Studio 2017, I proceeded to build the project before attempting to run it. Upon running, I'm met with an error as follows:

"Error CS0246 The type or namespace name 'ICodeFirstTypeProvider' could not be found (are you missing a using directive or an assembly reference?) DancingGoat C:\Users<my user>\KC demo\DancingGoat\Models\ContentTypes\CustomTypeProvider.cs 8 Active"

An older version from ~ a month ago did not see this error.

Repro steps

  1. Go to Visual Studio, open DancingGoat.sln
  2. Click on Build
  3. Scroll down to Error List
  4. See error

Expected behavior

Should build as expected, I would assume.

Test environment

  • Platform/OS: .NET Framework 4.6.1, Windows 10

Additional context

I have the required using statement, updated all NuGet packages, and this is the most recent version of the repository.

Screenshots

Error (with using statement)

Error

Edit Model Panel target=_blank links should have rel="noopener" added

This is something that came up during SEO review of our implementation of Kentico, and we had copied this stuff from the dancing goat sample.

The Edit toolbar's / links should have rel="noopener" added whenever there is a target=_blank. It allows the new target window to not have access to the prior windows "window" object in javascript. It's a security best practice item during the Lighthouse testing in chrome.

https://github.com/Kentico/kontent-sample-app-net/blob/80a84b80f2099b5cb75044671fe915f75793766a/DancingGoat/TagHelpers/EditPanelTagHelper.cs#L50

Reference: https://web.dev/external-anchors-use-rel-noopener/

Replace hardcoded sample project items count in SelfConfigController.

Motivation

In SelfConfigController.cs there is a hardcoded PROJECT_EXISTENCE_VERIFICATION_REQUIRED_ITEMS constant which is used in the wizard.

This wizard checks if the Delivery API has already accessible all items in the user's Dancing Goat project and if the project is fully accessible. If the count of all items in the project is more or equals to items from constant then we consider the project to be ready.

However, if the user's sample Dancing Goat project changes (we add/remove new content) this logic might not work. Under the hood, we clone the Dancing Goat project from 'one-source-of-truth' project.

Proposed solution

The goal of this issue is to implement logic which will get count of items in from this source (-of-truth) project (projectId: 975bf280-fd91-488c-994c-2f04416e5ee3) and store it to existing (non)constant which will be checked the same way as it is right now.

Refactor Product Detail

Product Detail view now serves Coffee and Brewer models which causes ugly isCoffee switches.

It should be refactored in a way that the shared product-related markup is stored in the Detail.cshtml but the model-specific details are handled using e.g. Display templates (per type).

Extract HTML helpers (edit mode panel, etc.) to a separate library

Motivation

Some HTML helpers can be reused in production projects.

Proposed solution

Extract HTML helpers to a separate project: https://github.com/Kentico/kontent-aspnetcore

Outstanding:

  • Convert HTML helpers to tag helpers (both in the sample app and in the boilerplate
  • Make the tag helpers easily configurable (remove dependencies on IConfiguration)
  • Extract Image/Asset HTML helpers from the sample app
  • Consolidate with Image/Asset HTML helpers from the boilerplate
  • Extract Edit Panel HTML helpers from the sample app
  • Publish as a NuGet package

To be considered:

After deploying to Azure, the app returns 500 Internal server error.

Brief bug description

I went through the whole deployment process initiated by the "Deploy to Azure" button in the Readme.
image
The deployment succeeded. However when accessing the newly deployed app, I get this:
image
So I've turned on the logging in the Azure App and this is what I got from the Application logs:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>IIS Detailed Error - 500.0 - Internal Server Error</title><style type="text/css"><!--body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;}code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;}.config_source code{font-size:.8em;color:#000000;}pre{margin:0;font-size:1.4em;word-wrap:break-word;}
ul,ol{margin:10px 0 10px 5px;}ul.first,ol.first{margin-top:5px;}fieldset{padding:0 15px 10px 15px;word-break:break-all;}.summary-container fieldset{padding-bottom:5px;margin-top:4px;}legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;}legend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px;font-weight:bold;font-size:1em;}a:link,a:visited{color:#007EFF;font-weight:bold;}a:hover{text-decoration:none;}h1{font-size:2.4em;margin:0;color:#FFF;}h2{font-size:1.7em;margin:0;color:#CC0000;}h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;}h4{font-size:1.2em;margin:10px 0 5px 0;}#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif;color:#FFF;background-color:#5C87B2;}#content{margin:0 0 0 2%;position:relative;}.summary-container,.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}.content-container p{margin:0 0 10px 0;}#details-left{width:35%;float:left;margin-right:2%;}#details-right{width:63%;float:left;overflow:hidden;}#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF;background-color:#5A7FA5;border-bottom:1px solid #C1CFDD;border-top:1px solid #4A6C8E;font-weight:normal;font-size:1em;color:#FFF;text-align:right;}#server_version p{margin:5px 0;}table{margin:4px 0 4px 0;width:100%;border:none;}td,th{vertical-align:top;padding:3px 0;text-align:left;font-weight:normal;border:none;}th{width:30%;text-align:right;padding-right:2%;font-weight:bold;}thead th{background-color:#ebebeb;width:25%;}#details-right th{width:20%;}table tr.alt td,table tr.alt th{}.highlight-code{color:#CC0000;font-weight:bold;font-style:italic;}.clear{clear:both;}.preferred{padding:0 5px 2px 5px;font-weight:normal;background:#006633;color:#FFF;font-size:.8em;}--></style>
</head><body><div id="content"><div class="content-container"><h3>HTTP Error 500.0 - Internal Server Error</h3><h4>The page cannot be displayed because an internal server error has occurred.</h4></div><div class="content-container"><fieldset><h4>Most likely causes:</h4><ul> 	<li>IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.</li> 	<li>IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.</li> 	<li>IIS was not able to process configuration for the Web site or application.</li> 	<li>The authenticated user does not have permission to use this DLL.</li> 	<li>The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.</li> </ul></fieldset></div><div class="content-container"><fieldset><h4>Things you can try:</h4><ul> 	<li>Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.</li> 	<li>Check the event logs to see if any additional information was logged.</li> 	<li>Verify the permissions for the DLL.</li> 	<li>Install the .NET Extensibility feature if the request is mapped to a managed handler.</li> 	<li>Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click <a href="http://go.microsoft.com/fwlink/?LinkID=66439">here</a>. </li> </ul></fieldset></div>
<div class="content-container"><fieldset><h4>Detailed Error Information:</h4><div id="details-left"><table border="0" cellpadding="0" cellspacing="0"><tr class="alt"><th>Module</th><td>&nbsp;&nbsp;&nbsp;ManagedPipelineHandler</td></tr><tr><th>Notification</th><td>&nbsp;&nbsp;&nbsp;ExecuteRequestHandler</td></tr><tr class="alt"><th>Handler</th><td>&nbsp;&nbsp;&nbsp;System.Web.Mvc.MvcHandler</td></tr><tr><th>Error Code</th><td>&nbsp;&nbsp;&nbsp;0x00000000</td></tr>
</table></div><div id="details-right"><table border="0" cellpadding="0" cellspacing="0"><tr class="alt"><th>Requested URL</th><td>&nbsp;&nbsp;&nbsp;https://cloud-sample-app-net5a38:80/</td></tr><tr><th>Physical Path</th><td>&nbsp;&nbsp;&nbsp;D:\home\site\wwwroot</td></tr><tr class="alt"><th>Logon Method</th><td>&nbsp;&nbsp;&nbsp;Anonymous</td></tr><tr><th>Logon User</th><td>&nbsp;&nbsp;&nbsp;Anonymous</td></tr>
</table><div class="clear"></div></div></fieldset></div>
<div class="content-container"><fieldset><h4>More Information:</h4>This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.<p><a href="http://go.microsoft.com/fwlink/?LinkID=62293&amp;IIS70Error=500,0,0x00000000,14393">View more information &raquo;</a></p><p>Microsoft Knowledge Base Articles:</p>
</fieldset></div></div></body></html>

Repro steps

  1. Go to this repository
  2. Click on "Deploy to Azure" button
  3. Follow through with the deployment
  4. Access the newly deployed site
  5. See error 500

Expected behavior

The configuration wizard appears.

Test environment

  • Platform/OS: Azure...
  • Browser Vivaldi
  • Version 2.5.1525.46 (Stable channel) (64bit)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.