Coder Social home page Coder Social logo

microsoftdocs / mslearn-create-razor-pages-aspnet-core Goto Github PK

View Code? Open in Web Editor NEW
64.0 6.0 381.0 1.01 MB

Sample app for "Create a web UI with ASP.NET Core" training module

License: Creative Commons Attribution 4.0 International

C# 55.68% HTML 32.19% CSS 10.23% JavaScript 1.90%

mslearn-create-razor-pages-aspnet-core's Introduction

Starter app for Create a web UI with ASP.NET Core

Welcome! This is the starter app for the Create a web UI with ASP.NET Core Microsoft Training module.

Completed version

The completed version of this module is available on the solution branch of this repo.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://privacy.microsoft.com/en-us/

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.

mslearn-create-razor-pages-aspnet-core's People

Contributors

camsoper avatar microsoft-github-operations[bot] avatar microsoftopensource avatar

Stargazers

 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mslearn-create-razor-pages-aspnet-core's Issues

`dotnet watch` command fails, incorrect .Net version

I received this error when I got up to running the dotnet watch command and I haven't been able to figure out how to solve it.

dotnet watch ๐Ÿš€ Started
You must install or update .NET to run this application.

App: C:\Users\danie\projects\other\dot-net-training\mslearn-create-razor-pages-aspnet-core-main\ContosoPizza\bin\Debug\net7.0\ContosoPizza.exe
Architecture: x64
Framework: 'Microsoft.AspNetCore.App', version '7.0.0' (x64)
.NET location: C:\Program Files\dotnet

The following frameworks were found:
  8.0.6 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=7.0.0&arch=x64&rid=win-x64&os=win10

dotnet watch โŒ Exited with error code -2147450730
dotnet watch โณ Waiting for a file to change before restarting dotnet...

I am getting: 404 Page Not Found

I cloned the project and built it and then run it and get 404 Page Not Found.
Here is the log below. What am I missing? Seems like Rathor Pages routing is not working (?)

[18:43:24 INF] User profile is available. Using 'C:\Users\Dev\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
[18:43:24 INF] No action descriptors found. This may indicate an incorrectly configured application or missing application parts. To learn more, visit https://aka.ms/aspnet/mvc/app-parts
[18:43:24 INF] Now listening on: https://localhost:7040
[18:43:24 INF] Now listening on: http://localhost:5257
[18:43:24 INF] Application started. Press Ctrl+C to shut down.
[18:43:24 INF] Hosting environment: Development
[18:43:24 INF] Content root path: D:\Projects\mslearn-create-razor-pages-aspnet-core\ContosoPizza
[18:43:25 INF] Request starting HTTP/2 GET https://localhost:7040/ - -
[18:43:25 INF] Request:
Protocol: HTTP/2
Method: GET
Scheme: https
PathBase:
Path: /
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7
Host: localhost:7040
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Upgrade-Insecure-Requests: [Redacted]
sec-ch-ua: [Redacted]
sec-ch-ua-mobile: [Redacted]
sec-ch-ua-platform: [Redacted]
DNT: 1
sec-fetch-site: [Redacted]
sec-fetch-mode: [Redacted]
sec-fetch-user: [Redacted]
sec-fetch-dest: [Redacted]
[18:43:25 INF] Response:
StatusCode: 404
[18:43:25 INF] Request finished HTTP/2 GET https://localhost:7040/ - - - 404 0 - 33.8056ms

Build fails without nuget as package source

I was following the Create a web UI with ASP.NET Core Microsoft Learn module and hit a snag trying to build the project after cloning this repo.

Specifically I received the following error:

error NU1101: Unable to find package Microsoft.VisualStudio.Web.CodeGeneration.Design. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages

I was able to fix the issue by adding https://api.nuget.org/v3/index.json as a package source for the ContosoPizza project in Visual Studio.

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.