Skip to main content

Posts

Showing posts with the label authentication on a wcf rest service json

What Is Angular Singleton Service?

In Angular, two ways to make a singleton service - 1.       Include the service in the AppModule 2.       Declare that the service should be provided in the application root. The preferred way to create a singleton service - Form beginning to Angular 6 is – import { Injectable } from '@angular/core' ; @ Injectable ({   providedIn: 'root' , }) export class CustomerService { } Another way to create a singleton service - Include service in the AppModule customer.service.ts – import { Injectable } from '@angular/core' ; @ Injectable () export class CustomersService {   constructor () { } } And app.module.ts - import { CustomerService } from './customers.service' ; //AppModule class with @NgModule decorator @ NgModule ({   //Static, this is the compiler configuration   //declarations is used for configure the selectors.   declarations: [ ...

91 Best WCF Security Questions and Answers [Interview Q/A]

Design Considerations Q/A :- How do you decide on an authentication strategy? How do you decide on an authorization strategy? When should you use message security vs transport security? How do you use Active Directory infrastructure? What bindings should you use over Internet? What bindings should you use over Intranet? When should you impersonate the original caller? How do you migrate to WCF from a COM, DCOM and WSE application? How do you migrate to WCF from an ASMX Web service? What is the difference between resource-based, roles-based, and claims-based authorization? Auditing and Logging Q/A:- How do you protect my log files? What events should be logged in WCF service security? How do you enable logging and auditing in WCF? How do yo...

Best 101 WPF Tutorial | Controls | Interview Questions and Answers!

Introduction to WPF Why WPF? What Is WPF? .NET Frameworks WPF Overview Application and Window A Simple WPF Application Using Visual Studio 2015 Brushes Panels About XAML Role of XAML Elements and Attributes Namespaces Property Elements Type Converters Content Property Collections WPF Controls Button Label TextBox ToolTip RadioButton CheckBox ListBox ComboBox DataGrid(CRUD Operation) Layout Sizing Positioning Transforms Canvas StackPanel WrapPanel ...

27 Best WCF Interview Questions & Answers [How To?]

27 Tips To Handle WCF Job Interview Successfully! What is WCF Services? Tell tell Actual use of WCF? What are the most important features of WCF? What is the WCF Architecture? What is the difference between WCF and Web service? What are WCF Contracts, explain in details? What are WCF service contracts? What are Addresses in WCF services? What type of Bindings in WCF? What is Format Binding? What is Encoding Binding? Can you tell me about WCF Hosting? What type of Reliability in WCF services? How to work WCF services Channel? Can you tell me about WCF Endpoints in detail? What are per call services? What are per session services? Can you tell me about call-back re-entrancy? ...

Authentication on a WCF REST Service using JSON Request

Hello everyone,  I am going to share the code sample how re st service  authenticate using  JSON Request. Table of Contents First added to request headers for rest service authenticate. Encrypt the username and password and added in the heder. In Step 1 Need to add request headers to authenticate a wcf rest services using json request response. i.e. beforeSend: function (xhr)  {    xhr.setRequestHeader( "UserRoleId" , "1" );    xhr.setRequestHeader( 'Authorization Basic ' , authenticatedByRequestHeader(username, pwd)); } In the 2nd Step Need to encrypt username and password and sent with heeder responses. i.e. var username = "validate@gmail.com" ; var pwd = "validate" ; function authenticatedByRequestHeader(username, pwd)  {    var token =  username  + ':' + pwd;    var hashpwd = btoa(token);    return hashpwd; } Example for Authenticate REST WCF Servi...