Free Code Snippets in C#, Net Framework, Office 365, ASP.Net,WPF, Visual Studio, SQL Server, Antivirus free
#
Error The algorithm HS256 requires the SecurityKey.KeySize to be greater than 128 bits Net-Framework/ASP_dot_Net-Core/Auth
Error The algorithm HS256 requires the SecurityKey.KeySize to be greater than 128 bits
19.01.2018 110
Error: System ArgumentOutOfRangeException The algorithm: 'HS256' requires the SecurityKey KeySize to be greater than '128' bits The error message occurs when creating a security token for authentication Asp Net Core Wep Api, Identity, Authentication, JWTBearer

Asp WPF: Web API Read Values from Asp Net Api with HttpClient Net-Framework/ASP_dot_Net-Core/API
Asp WPF: Web API Read Values from Asp Net Api with HttpClient
17.01.2018 67
This example shows how to read the values ​​from a web server with API in WPF ASP Net Core Web API is installed on the server (IIS Express Server with SQL Server Express local DB) As desktop program a WPF application is installed

ASP.Net: create a website with authentication auth Net-Framework/ASP_dot_Net-Core/Auth
ASP.Net: create a website with authentication auth
17.01.2018 59
Start Visual Studio and choose under the menu File-> New-> Project Then in the dialog: New Project at Visual C # -> Net Core -> ASP NET Core Web Application select In the Location field set the directory where the web application will be s

Asp Auth: Account Views Forms Net-Framework/ASP_dot_Net-Core/Auth
Asp Auth: Account Views Forms
17.01.2018 50
The following view forms are set with the standard installation of Asp Net Core Authentification, with user-password combination root Account Register Manage Index

ASP: Create web application with authentication Net-Framework/ASP_dot_Net-Core/Auth
ASP: Create web application with authentication
16.01.2018 58
In the Package Manager Console, the command PM> update-database To run This creates the authentication database with the appropriate context description fo

ASP.Net: A database operation failed while processing the request. Net-Framework/ASP_dot_Net-Core/Errors
ASP.Net: A database operation failed while processing the request.
11.01.2018 72
The first time an Asp Net MVC Core 2 application with Authentication is called, the error occurs: A database operation failed while processing the request

API: Data Modify and Create with Api Example Net-Framework/ASP_dot_Net-Core/API
API: Data Modify and Create with Api Example
10.01.2018 61
With API interfaces, clients such as smartphones, desktop programs or IoT devices can exchange data with an Internet server Api corresponds to the so-called REST interface on the Internet, where data is exchanged with HttpGet, HttpPut and HttpPost

API error: Could not get any response Net-Framework/ASP_dot_Net-Core/Errors
API error: Could not get any response
10.01.2018 101
When executing the API request to an ASP Net application, the feedback comes in the API client: Could not get any response This seems to be like an error connecting to

Problem ASP.Net: ID is increased by 1000 Net-Framework/ASP_dot_Net-Core/API
Problem ASP.Net: ID is increased by 1000
10.01.2018 51
Error Description: When entering new records via an API in ASP Net Core MVC, it may happen that the ID is not increased by 1 as specified, but increased by 1000 Reason: It may be that the incoming record has a weigh

Postman: Check API Controller with Chrome Extension Net-Framework/ASP_dot_Net-Core/Tools
Postman: Check API Controller with Chrome Extension
09.01.2018 90
To check the data of the API interface, you now have direct access via the URL Api Instead of the address in the browser localhost: 51081 Projects to enter for the website in the browser, Now give the URL localh

🚩#23 ASP.Net: Add Web API Controller Net-Framework/ASP_dot_Net-Core/Learning
🚩#23 ASP.Net: Add Web API Controller
09.01.2018 65
If you need an external interface of devices to a web application, then you add an API controller to the web application, which then devices such as mobile phones, IoT devices, WPF desktop applications and other apps can exchange data directly The easiest way to create

Asp.Net Mvc: DbContext as interface of a SQL database Net-Framework/ASP_dot_Net-Core/Data-Model
Asp.Net Mvc: DbContext as interface of a SQL database
09.01.2018 66
Asp Net Mvc: DbContext as interface of a SQL database to the Asp Net Core application A connected database is always connected to Asp Net Core Mvc with some kind of bridge or interface This is called DbContext In principle, the Entity Framework DbContext translate

🚩#11 Create and Connect a database to ASP.Net MVC Core 2 Net-Framework/ASP_dot_Net-Core/Learning
🚩#11 Create and Connect a database to ASP.Net MVC Core 2
09.01.2018 103
Connect database to ASP Net Core 2 Step 1: Create a database without migration You can either create a database via CodeFirst under ASP Net Core or Code-First Codefirst uses Entitiy Framework Migration At Codefirst, the database is c

🚩# 23 ASP.Net: Adjust Validation Net-Framework/ASP_dot_Net-Core/Learning
🚩# 23 ASP.Net: Adjust Validation
22.12.2017 75
# 23 ASP Net: Adjust Validation Colorize the validation If you want to adjust the validity when entering an Asp Net MVC form, then you can evaluate an element like here the textbox element in the browser with Examine First, open the view form (h

🚩#22 ASP.Net: Validation, validity Net-Framework/ASP_dot_Net-Core/Learning
🚩#22 ASP.Net: Validation, validity
15.12.2017 68
ASP Net MVC Core 2 Check for validity when entering data Set validation The foundations for validity are defined in the model [MaxLength(50)]

🚩#21 ASP.Net: Update Data, Save Edit View Net-Framework/ASP_dot_Net-Core/Learning
🚩#21 ASP.Net: Update Data, Save Edit View
15.12.2017 75
The following example creates changes the Create form into an edit form for articles Here, the View Edit is used as an input form to create new records, but also as a pure update input form Open the view The view form is either

ASP.Net: Assign Form ID with asp-action asp-route-id Net-Framework/ASP_dot_Net-Core/Basics
ASP.Net: Assign Form ID with asp-action asp-route-id
14.12.2017 112
Task: ASP form must have the appropriate ID in the action parameter Problem: If you build a form in an ASP Net MVC Core application that has a different post-back action in name naming, then ASP Net MVC Core does not add an ID With an appropriate

ASP Error: System.InvalidOperationException, An exception occurred while reading a database value Net-Framework/ASP_dot_Net-Core/Errors
ASP Error: System.InvalidOperationException, An exception occurred while reading a database value
13.12.2017 138
ASP Error: System InvalidOperationException, An exception occurred while reading a database value Error message in ASP Net System InvalidOperationException: 'An exception occurred while reading a

ASP.Net MVC: Show Date Formatted Net-Framework/ASP_dot_Net-Core/Basics
ASP.Net MVC: Show Date Formatted
13.12.2017 72
Definition of the date field in the MVC Model DisplayFormat DataFormatString sets the formatting of the date for output [Display(Name = "Date Edit" )]

# 20 Bind form data and attach to database Net-Framework/ASP_dot_Net-Core/Learning
# 20 Bind form data and attach to database
13.12.2017 80
- Model binding, bind form to data model, data binding - Attach data from MVC Model to SQL Server In the input form, sends the data to the create action of the controller of the same name All input data is transferred as form data

ASP.Net Core MVC: Insert dropdown list Net-Framework/ASP_dot_Net-Core/Learning
ASP.Net Core MVC: Insert dropdown list
12.12.2017 110
This code example shows how to display a dropdown list in ASP Net Core MVC Specification: In the connected database, there is a small table with selection texts with the name tblBase_Product groups The selection table has an ID and

ASP.Net: adapt the label Net-Framework/ASP_dot_Net-Core/Learning
ASP.Net: adapt the label
11.12.2017 63
If you want to customize the automatic label of an MVC field, then specify a DisplayAttribute in the form [Display (Name = abc)] [Display(Name = "Artikel Bezeichnung" )]

#17 ASP MVC: New form for creating an entry Net-Framework/ASP_dot_Net-Core/Learning
#17 ASP MVC: New form for creating an entry
11.12.2017 62
The controller creates a new action method called New public IActionResult New() {

ASP EF Error: Unable to create object of type DbContext Net-Framework/ASP_dot_Net-Core/Errors
ASP EF Error: Unable to create object of type DbContext
09.12.2017 87
Problem: When uploading the Code First data to a SQL Server with Entity Framework comes the message PM: Add-migration initial Unable to create an object of type 'a

EF: Update Migration Type Mappings. Which C # variable types are to which SQL server field types Net-Framework/ASP_dot_Net-Core/Data-Model
EF: Update Migration Type Mappings. Which C # variable types are to which SQL server field types
09.12.2017 57
Entity Framework, Default, Types In the following I created a model class under ASP Net Core 2 MVC and transferred them via add-migration and update-database to a SQL server The following variables are converted to C # including default defaults on

EF: Specify default values ​​and Type Double and Bool from ASP.Net Model to SQL Server Net-Framework/ASP_dot_Net-Core/Learning
EF: Specify default values ​​and Type Double and Bool from ASP.Net Model to SQL Server
08.12.2017 82
In ASP Net Core MVC conversion from CodeFirst to SQL Server databases, the variables must be of the correct type to be set correctly on SQL Server How does the ASP Net C # Model boolean and currency fields connect to fields in SQL Server

#16 ASP.Net MVC: Eager Loading Include Data Net-Framework/ASP_dot_Net-Core/Learning
#16 ASP.Net MVC: Eager Loading Include Data
07.12.2017 54
If you want to display data from a linked table in a view view, then you use the so-called Eager loading The following is done in the view If, for example, you want to know the name of the assigned product groups in the follo

#15 ASP.Net Core MVC: View data tables on web page with MVC Net-Framework/ASP_dot_Net-Core/Learning
#15 ASP.Net Core MVC: View data tables on web page with MVC
06.12.2017 75
How To Display Data From A SQL Server On An ASP Net MVC Core 2 Website 1) Assign DbContext You have to extend the database model with OnModelCreating, which allows you to view the tables in the SQL Server database

ASP.Net: Define string length and Not Null Net-Framework/ASP_dot_Net-Core/Learning
ASP.Net: Define string length and Not Null
06.12.2017 62
How to specify properties of table fields in the Asp net core mvc model classes By entering attributes in front of the field names like here [Required] fuer nicht null

#13 ASP.Net MVC: Define Data Tables wie EF Migration Net-Framework/ASP_dot_Net-Core/Learning
#13 ASP.Net MVC: Define Data Tables wie EF Migration
01.12.2017 66
ASP Net MVC: Data Asp net Core 2 MVC If you want to predefine tables in Asp net core 2 MVC with values during the development time, then you can fill them out using the migration In the example, the selection table product groups with the selec

Mobile

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de