Skip to main content

Posts

Part 1: Share Authentication Cookie - SSO (Single Sign-On) In Dotnet Core

Introduction: Single Sign-On (SSO) is an authentication technique where the user uses one set of login credentials to access multiple web applications. About Platform: . Asp.net core MVC . Microsoft Identity Login . Dotnet core 2.2 . SQL LocalDB Core Concept: In the dotnet core, by sharing authentication cookie we can achieve SSO for the subdomains. A subdomain is a domain which part of another domain.  Additional name prefixed to a domain that URL can be a subdomain. For example " http://testmyapp.com/ " is a domain, its subdomain looks like " http://mobile.testmyapp.com ". Create MVC Application & LocalDB Setup To IIS & IIS Hosting: Create an Asp.net MVC Core application by selecting a login individual user template from a visual studio. For this application use, LocalDB as a database then host this application to local IIS, bind "http://testmyapp.com" as domain and "http://mobile.testmyapp.com" as a domain to test

IIS Server Sub Application Hosting Or Folder Level Hosting

Introduction: In IIS Server so many numbers of applications can be hosted as child applications under one main application. Domain bindings did at the main application, the same domain can be used by child application with their folder path as URL. Let say the "http://test.com" domain is assigned to the main application. Under it, child application hosted in a folder like "api" now it can be accessed with the URL "http://test.com/api" Step 1: Let host main application, open "Internet Information Services (IIS) Manager" goto  "Sites" right-click on it and select "add new website" a popup get open as follows . "Site Name" application name in IIS . "Physical Path" location of application source code . "Host Name" domain that configured to the application Step 2: Click ok our application created and hosted in IIS Server it looks as below Now we have our main

Access SQL LocalDB by an application hosted in local IIS

Introduction: SQL server express LocalDB  is a developer's database, which is a lightweight edition of Microsoft SQL. It works as same as SQL with fewer features. LocalDB can be created and managed by VisualStudio or SQL management studio. Using visual studio we can create database LocalDB either from "SQL Server Object Explorer" or by using code first approach using any asp.net web application. To configure LocalDB to an application hosted in local IIS, we need to set up a few additional settings. Here we are going to discuss the common problems and solutions while configuring. Create ASP.NET Core MVC Sample Application: Create asp.net MVC Dotnet core application. In VisualStudio, while selecting an MVC application template we can select the authentication option, in that select individual login option. After the project creates initially run the application using IIS Express server which is a prebuilt server in VisualStudio. We can observe a sample ap

Ionic 4: Ionic DevApp

Introduction: The Ionic DevApp mobile   application, which helps to test and run our ionic application on mobile device at the time of development. It is the most comfortable and fast way to test application when compared to traditional approaches like either run on emulators or connecting the real device to the application test machine. Ionic DevApp free mobile application which is available on Google Play Store and Apple App Store. How It Works: 1. Both development machine and mobile enable and connect  to the same WIFI 2. Run the application using the command "ionic serve --devapp" , after that application get build 3. mobile get detects our application and starts running. Step 1: Download "Ionic DevApp" from google play store on to your mobile as below Step 2: Open Ionic Dev App, on the first time it shows up login form just sign up with your account. After login, you can see where application tries to search for an ionic application running on

Ionic 4: Test mobile contacts at the local browser at development time using the mock plugin ( Part - 2)

Introduction: In part -1 we have written code to create contacts, now using the mock-up plugin API  "Cordova-Plugin-Contacts-Mock" access user mobile contact to our application listing contacts page .   Click here to read part - 1 Install Contact Mock Plugin: Install below mock plug-in                       "npm install cordava-plugin-contacts-mock --save-dev" for more  go to this mock plugin link Configure Mock Plugin Script To Our Application: Now add the below js file path to "Scripts" array property in the angular.json file.   "node_modules/cordova-plugin-contacts-mock/build/contacts-mock.js" after adding js file path rebuild the project again. Mock Contacts To Chrome Browser Local Storage: Run the application and go to the second tab in the sample project which is created to add new contacts. Using that code creates few dummy contacts which are going to be accessed as mobile contact to test "Cordova-plugin-contact

Ionic 4: Test mobile contacts at the local browser at development time using the mock plugin ( Part - 1 )

Introduction: In Ionic 4 had been provided with native API "Cordova-plugin-Contacts" to access mobile contacts. At development to test, accessing mobile contacts either we need to configure mobile emulators, or we need to connect the real device which bit complex approach. "Cordova-Plugin-Contacts-Mock" a third party plugin helps to mock the contacts and access them in the browser and test on the browser like do on mobile . So testing on the browser is the fastest and comfortable approach to test user contacts "Cordova-Plugin-Contact-Mock"  API helps mock the contacts in our local browser (Developer Tools => Application => Local Storage) which helps to test all the features that are originally provided by Ionic 4 native API   "Cordova-Plugin-Contacts". "Note: Mocking of contact only works with chrome browser" . About Platform : 1.Ionic 4 2.Angular 8.0v Create Ionic4 Application: Create an Ionic 4 application, i

Dotnet Core: Tranform web.config

Introduction: In dotnet core 2.2  or above, transformations of the web.config can be done with the following ways: 1. Build Configuration 2. Profile 3. Environment 4. Custom Any of the processes can be utilized in your project deployment pipeline. "In Dotnet core  2.2  and above transformation works directly with the core platform. In Dotnet core 2.1 or below transformation won't work directly for that please go through this link here. " Build Configuration: To create a Dotnet core MVC project, click here for   Dotnet core Mvc get started . Now by default web.config file will not be created. Now add the web.config file to the project and change the file as below. <configuration> <system .webserver=""> <handlers> <remove name="aspNetCore"> <add modules="AspNetCoreModule" name="aspNetCore" path="*" resourcetype="Unspecified" verb="*"> <