You are not authorized to access this resource.
14 | } 15 |Sorry, there's nothing at this address.
21 |Loading...
20 | } 21 | else 22 | { 23 |Category | 26 |Name | 27 |Description | 28 |Price | 29 |30 | 31 | 32 | @foreach (var product in _products) 33 | { 34 | |
---|---|---|---|---|
@product.Category.CategoryName | 36 |@product.ProductName | 37 |@product.Description | 38 |@product.UnitPrice.GetValueOrDefault().ToString("C") | 39 |Edit | 40 |
Current count: @currentCount
6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/BlazorCocoon/Client/Pages/FetchData.razor: -------------------------------------------------------------------------------- 1 | @page "/fetchdata" 2 | @using BlazorCocoon.Shared 3 | @inject HttpClient Http 4 | 5 |This component demonstrates fetching data from the server.
8 | 9 | @if (forecasts == null) 10 | { 11 |Loading...
12 | } 13 | else 14 | { 15 |Date | 19 |Temp. (C) | 20 |Temp. (F) | 21 |Summary | 22 |
---|---|---|---|
@forecast.Date.ToShortDateString() | 29 |@forecast.TemperatureC | 30 |@forecast.TemperatureF | 31 |@forecast.Summary | 32 |
You are not authorized to access this resource.
14 | } 15 |Sorry, there's nothing at this address.
21 |Current count: @currentCount
6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/BlazorServerCocoon/src/BlazorServerCocoon/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace BlazorServerCocoon.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | [IgnoreAntiforgeryToken] 14 | public class ErrorModel : PageModel 15 | { 16 | public string RequestId { get; set; } 17 | 18 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 19 | 20 | private readonly ILoggerThis component demonstrates fetching data from a service.
9 | 10 | @if (forecasts == null) 11 | { 12 |Loading...
13 | } 14 | else 15 | { 16 |Date | 20 |Temp. (C) | 21 |Temp. (F) | 22 |Summary | 23 |
---|---|---|---|
@forecast.Date.ToShortDateString() | 30 |@forecast.TemperatureC | 31 |@forecast.TemperatureF | 32 |@forecast.Summary | 33 |
Category | 23 |Name | 24 |Description | 25 |Price | 26 | 27 | 28 | @foreach (var product in Model.Products) 29 | { 30 |
---|---|---|---|
@product.Category.CategoryName | 32 |@product.ProductName | 33 |@product.Description | 34 |@product.UnitPrice.GetValueOrDefault().ToString("C") | 35 |
Learn about building Web apps with ASP.NET Core.
8 |Use this page to detail your site's privacy policy.
7 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model MvcCocoon.Models.ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |
12 | Request ID: @Model.RequestId
13 |
18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |
20 |21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |
26 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 2 | @addTagHelper *, Facade 3 | @addTagHelper *, MvcCocoon 4 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "ConnectionStrings": { 10 | "WingtipToys": "Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=D:\\Cocoon\\Cocoon\\samples\\Wingtip-Toys\\WingtipToys\\App_Data\\wingtiptoys.mdf;Integrated Security=True" 11 | }, 12 | "Cocoon": { 13 | "Proxy": { 14 | "DestinationPrefix": "http://localhost:8080/" 15 | }, 16 | "Authentication": { 17 | "BackendApiUrl": "http://localhost:8080/facadeauth", 18 | "LoginUrl": "/Account/Login?ReturnUrl={{ReturnUrl}}", 19 | "Cookies": [ 20 | ".AspNet.ApplicationCookie" 21 | ] 22 | }, 23 | "Session": { 24 | "BackendApiUrl": "http://localhost:8080/facadesession", 25 | "Cookies": [ 26 | "ASP.NET_SessionId" 27 | ] 28 | }, 29 | "Cookies": { 30 | "BackendApiUrl": "http://localhost:8080/facadecookies" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/wwwroot/css/Site.css: -------------------------------------------------------------------------------- 1 | /* Move down content because we have a fixed navbar that is 50px tall */ 2 | body { 3 | padding-top: 50px; 4 | padding-bottom: 20px; 5 | } 6 | 7 | /* Wrapping element */ 8 | /* Set some basic padding to keep content from hitting the edges */ 9 | .body-content { 10 | padding-left: 15px; 11 | padding-right: 15px; 12 | } 13 | 14 | /* Set widths on the form inputs since otherwise they're 100% wide */ 15 | input[type="text"], 16 | input[type="password"] { 17 | max-width: 280px; 18 | } 19 | 20 | /* Responsive: Portrait tablets and up */ 21 | @media screen and (min-width: 768px) { 22 | .jumbotron { 23 | margin-top: 20px; 24 | } 25 | .body-content { 26 | padding: 0; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VisualReCode/Cocoon/b616544200d14e0e55f9e1fd4a9dd84074c99f71/samples/MvcCocoon/src/MvcCocoon/wwwroot/favicon.ico -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/wwwroot/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VisualReCode/Cocoon/b616544200d14e0e55f9e1fd4a9dd84074c99f71/samples/MvcCocoon/src/MvcCocoon/wwwroot/images/logo.jpg -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your JavaScript code. 5 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/MvcCocoon/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /samples/MvcCocoon/src/ReCode.Cocoon.Proxy/Authentication/FacadeAuthenticationDefaults.cs: -------------------------------------------------------------------------------- 1 | namespace ReCode.Cocoon.Proxy.Authentication 2 | { 3 | public static class FacadeAuthenticationDefaults 4 | { 5 | public const string Scheme = "Facade"; 6 | } 7 | } -------------------------------------------------------------------------------- /samples/MvcCocoon/src/ReCode.Cocoon.Proxy/Authentication/FacadeAuthenticationExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.AspNetCore.Authentication; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Options; 5 | 6 | namespace ReCode.Cocoon.Proxy.Authentication 7 | { 8 | public static class FacadeAuthenticationExtensions 9 | { 10 | public static AuthenticationBuilder AddFacade(this AuthenticationBuilder builder) 11 | { 12 | builder.Services.AddOptionsUse this area to provide additional information.
7 |8 | | <%=Request.QueryString.Get("ErrorCode")%> | 9 |
12 | | <%=Request.QueryString.Get("Desc")%> | 13 |
16 | | <%=Request.QueryString.Get("Desc2")%> | 17 |
We're all about transportation toys. You can order 7 | any of our toys today. Each toy listing has detailed 8 | information to help you choose the right toy.
9 |9 |
11 |
12 |
16 |
17 |
21 |
22 |
24 |
Use another service to log in.
5 |6 |
10 | 14 |
15 |There are no external authentication services configured. See this article for details on setting up this ASP.NET application to support logging in via external services.
19 |