- プロジェクトは新しい csproj を使用し、その基本は下記とする。
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
using System; | |
using System.IO; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc.Formatters; | |
using Microsoft.Net.Http.Headers; | |
using ProtoBuf; | |
namespace Inasync { | |
public class ProtobufInputFormatter : InputFormatter { |
using System; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.Filters; | |
namespace Inasync { | |
/// <summary> | |
/// AdX OpenRTB に適したレスポンスにする属性。 | |
/// </summary> |
<configuration> | |
<system.web> | |
<compilation xdt:Transform="RemoveAttributes(debug)" /> | |
<httpCookies httpOnlyCookies="true" requireSSL="true" lockItem="true" xdt:Transform="Replace" /> | |
</system.web> | |
<system.webServer> | |
<httpProtocol> | |
<customHeaders> | |
<add name="Strict-Transport-Security" value="max-age=31536000" xdt:Transform="Insert" /> | |
</customHeaders> |