One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE PROC [dbo].[pr_ins_test] | |
@CompanyID INT | |
AS | |
SET NOCOUNT ON |
background-color: rgb(0, 163, 187); | |
background-color: rgb(161, 60, 180); | |
background-color: rgb(166, 50, 50); | |
background-color: rgb(241, 118, 167); | |
background-color: rgb(253, 87, 61); | |
background-color: rgb(255, 0, 122); | |
background-color: rgb(255, 0, 26); | |
background-color: rgb(27, 136, 122); | |
background-color: rgb(31, 161, 93); | |
background-color: rgb(93, 175, 221); |
<httpProtocol> | |
<customHeaders> | |
<add name="Access-Control-Allow-Origin" value="*" /> | |
<add name="Access-Control-Allow-Headers" value="Content-Type" /> | |
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" /> | |
</customHeaders> | |
</httpProtocol> |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
namespace Quantech_mda.mil.Controllers | |
{ | |
[Authorize(Roles = "SuperUser")] | |
public class EventsController : BaseController |
// NOTE: For that code to work, you need install System.IdentityModel.Tokens.Jwt package from NuGet (the link includes the latest stable version) | |
// Link: https://www.nuget.org/packages/System.IdentityModel.Tokens.Jwt/4.0.2.206221351 | |
using System.IdentityModel.Tokens; | |
// a sample jwt encoded token string which is supposed to be extracted from 'Authorization' HTTP header in your Web Api controller | |
var tokenString = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC8wMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJpYXQiOiIxNDI4MDM2NTM5IiwibmJmIjoiMTQyODAzNjUzOSIsImV4cCI6IjE0MjgwNDA0MzkiLCJ2ZXIiOiIxLjAiLCJ0aWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJhbXIiOiJwd2QiLCJvaWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJlbWFpbCI6Impkb2VAbGl2ZS5jb20iLCJwdWlkIjoiSm9obiBEb2UiLCJpZHAiOiJsaXZlLmNvbSIsImFsdHNlY2lkIjoiMTpsaXZlLmNvbTowMDAwMDAwMDAwMDAwMDAw |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Optimization; | |
using ZetaProducerHtmlCompressor.Internal; | |
namespace PmdWebsite.Helpers.ActionFilters |
1. Install nodejs. https://nodejs.org/en/ | |
2. Check npm (node package manager) is installed via command prompt: | |
$ npm | |
3. Install gulp: | |
$ npm install gulp --global | |
4. In relevant project folder, create 'gulpfile.js': |
import { Injectable } from 'angular2/core'; | |
import { Storage } from './storage'; | |
import { CurrentUser } from '../interfaces/common'; | |
@Injectable() | |
export class Authentication{ | |
private _storageService : Storage; | |
private _userKey : string = "CURRENT_USER"; | |
constructor(storageService : Storage){ |
// OLD CODE WITH INLINE REMARKS | |
public class TestController : Controller | |
{ | |
[HttpOptions] | |
public ActionResult Xlsx() | |
{ | |
// Catches and authorises pre-flight requests for /data/xlsx from remote domains | |
// Remark: Don't touch Response / Request object directly inside the Controller | |
Response.AddHeader("Access-Control-Allow-Origin", "*"); |