Tags: ASP.NET

How to install .NET Standard 2.0

ASP.NET Benjamin Perkins

The release of .NET Standard has been officially announced here.  I looked for a way to update .NET Standard to version 2.0 as I could see it was not installed on my workstation.  As shown in Figure 1, I only had version 1.0 – 1.6 installed. Figure 1, how to upgrade, install new version of […]

Read More →

A route named ‘*’ is already in the route collection, Azure Web App

ASP.NET Benjamin Perkins

I was deploying an ASP.NET Web API to an Azure App Service Web App and I got this error: Server Error in ‘/’ Application. A route named ‘HelpPage_Default’ is already in the route collection. Route names must be unique. Parameter name: name Description: An unhandled exception occurred during the execution of the current web request. […]

Read More →

Always get "Authorization has been denied for this request." ASP.NET Web API

ASP.NET Benjamin Perkins

I was creating an ASP.NET Web API today and when I called one of the Web APIs (/api/values) I got the following response: {“Message”:”Authorization has been denied for this request.”} It turns out by default ‘Individual User Accounts” authentication is enabled by default.  See Figure 1. Figure 1, {“Message”:”Authorization has been denied for this request.”} […]

Read More →

How to create a Feedback Web User Control form in C# (Part 2)

If you have not read Part 1, read it here. [sourcecode language=”csharp” gutter=”false” toolbar=”false” autolinks=”false”] <%@ Control Language="C#" CodeFile="LeaveFeedBack.ascx.cs" Inherits="include_LeaveFeedBack" %> <asp:Table HorizontalAlign="Center" ID="BlogFeedbackTable" runat="server"> <asp:TableRow><asp:TableCell>&nbsp;</asp:TableCell></asp:TableRow> <asp:TableRow><asp:TableCell BackColor="#2BA94F" HorizontalAlign="Center" ForeColor="White" ColumnSpan="2">Feedback / Question></asp:TableCell></asp:TableRow> <asp:TableRow><asp:TableCell>&nbsp;</asp:TableCell></asp:TableRow> <asp:TableHeaderRow> <asp:TableHeaderCell HorizontalAlign="Left">Your Name:</asp:TableHeaderCell> <asp:TableHeaderCell HorizontalAlign="Left">Your Email:</asp:TableHeaderCell> </asp:TableHeaderRow> <asp:TableRow> <asp:TableCell HorizontalAlign="Left"><asp:TextBox ID="TextBoxName" Width="245" MaxLength="20" runat="server" /></asp:TableCell> <asp:TableCell HorizontalAlign="Left"><asp:TextBox ID="TextBoxEmail" Width="245" MaxLength="50" […]

Read More →

Hacked

Benjamin Perkins C#

This happened to me way back in 2011.  I am migrating all my blogs and articles to this site and am adding it here.  This shouldn’t happen anymore if you use an ORM like Entity Frame Work or NHibernate.  A few weeks ago I had to fend off a hacker. Some of the database statements […]

Read More →

How (I) configured Azure Active Directory into my ASP.NET MVC OWIN web application

ASP.NET Benjamin Perkins

Before I get started, keep in mind, that I am not a security expert, if you want to enable security for your Azure App Service Web App I recommend using EasyAuth as described here, so much easier, IMO. You likely get some benefits from the ‘Change Authentication’ features of: No Authentication Individual User Accounts Work […]

Read More →