1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 21:33:27 +00:00

Upgrade to ASP.NET Core RC2 release.

This commit is contained in:
Kyle Spearrin
2016-05-19 23:16:27 -04:00
parent fbeedec694
commit 35bdc82243
9 changed files with 80 additions and 61 deletions

View File

@@ -1,6 +1,6 @@
{ {
"projects": [ "src", "test" ], "projects": [ "src", "test" ],
"sdk": { "sdk": {
"version": "1.0.0-rc1-final" "version": "1.0.0-preview1-002702"
} }
} }

20
src/Vault/Program.cs Normal file
View File

@@ -0,0 +1,20 @@
using System.IO;
using Microsoft.AspNetCore.Hosting;
namespace Bit.Vault
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
}
}
}

View File

@@ -12,14 +12,16 @@
"commandName": "IISExpress", "commandName": "IISExpress",
"launchBrowser": true, "launchBrowser": true,
"environmentVariables": { "environmentVariables": {
"Hosting:Environment": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
}, },
"web": { "Web": {
"commandName": "web", "commandName": "Project",
"launchBrowser": true,
"launchUrl": "http://localhost:5001",
"environmentVariables": { "environmentVariables": {
"Hosting:Environment": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
} }
} }
} }

View File

@@ -1,6 +1,5 @@
using System; using System;
using Microsoft.AspNet.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNet.Hosting;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace Bit.Vault namespace Bit.Vault
@@ -11,11 +10,7 @@ namespace Bit.Vault
public void Configure(IApplicationBuilder app) public void Configure(IApplicationBuilder app)
{ {
app.UseIISPlatformHandler();
app.UseFileServer(); app.UseFileServer();
} }
// Entry point for the application.
public static void Main(string[] args) => WebApplication.Run<Startup>(args);
} }
} }

View File

@@ -4,16 +4,17 @@
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>0bebf47c-ba0b-48ac-b48c-718f94084ad5</ProjectGuid> <ProjectGuid>0bebf47c-ba0b-48ac-b48c-718f94084ad5</ProjectGuid>
<RootNamespace>Bit.Vault</RootNamespace> <RootNamespace>Bit.Vault</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath> <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<DevelopmentServerPort>4001</DevelopmentServerPort> <DevelopmentServerPort>4001</DevelopmentServerPort>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
</Project> </Project>

View File

@@ -1,27 +1,49 @@
{ {
"version": "0.0.1", "version": "0.0.1",
"environment": "Development", "environment": "Development",
"dependencies": { "dependencies": {
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final", "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final" "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final"
}, },
"commands": { "tools": {
"web": "Microsoft.AspNet.Server.Kestrel" "Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
}
}, },
"frameworks": { "frameworks": {
"dnx451": { } "net46": { }
}, },
"exclude": [ "buildOptions": {
"wwwroot", "emitEntryPoint": true,
"node_modules" "preserveCompilationContext": true
], },
"publishExclude": [
"**.user", "runtimeOptions": {
"**.vspscc" "gcServer": false,
] "gcConcurrent": true
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"settings.json",
"settings.Development.json",
"settings.Production.json",
"settings.Staging.json",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
},
"userSecretsId": "aspnet-Vault-20160519103145"
} }

9
src/Vault/web.config Normal file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
</system.webServer>
</configuration>

View File

@@ -47,24 +47,3 @@
/// <reference path="app/vault/vaultEditFolderController.js" /> /// <reference path="app/vault/vaultEditFolderController.js" />
/// <reference path="app/vault/vaultEditSiteController.js" /> /// <reference path="app/vault/vaultEditSiteController.js" />
/// <reference path="app/vault/vaultmodule.js" /> /// <reference path="app/vault/vaultmodule.js" />
/// <reference path="lib/admin-lte/js/app.min.js" />
/// <reference path="lib/angular/angular.min.js" />
/// <reference path="lib/angular-bootstrap/angular-bootstrap-tpls.min.js" />
/// <reference path="lib/angular-bootstrap-show-errors/showerrors.min.js" />
/// <reference path="lib/angular-cookies/angular-cookies.min.js" />
/// <reference path="lib/angular-jwt/angular-jwt.min.js" />
/// <reference path="lib/angular-md5/angular-md5.min.js" />
/// <reference path="lib/angular-messages/angular-messages.min.js" />
/// <reference path="lib/angular-resource/angular-resource.min.js" />
/// <reference path="lib/angular-toastr/angular-toastr.min.js" />
/// <reference path="lib/angular-toastr/angular-toastr.tpls.min.js" />
/// <reference path="lib/angular-ui-router/angular-ui-router.min.js" />
/// <reference path="lib/bootstrap/js/bootstrap.min.js" />
/// <reference path="lib/clipboard/clipboard.min.js" />
/// <reference path="lib/jquery/jquery.min.js" />
/// <reference path="lib/ngclipboard/ngclipboard.min.js" />
/// <reference path="lib/ngstorage/ngstorage.min.js" />
/// <reference path="lib/papaparse/papaparse.min.js" />
/// <reference path="lib/sjcl/bitarray.js" />
/// <reference path="lib/sjcl/cbc.js" />
/// <reference path="lib/sjcl/sjcl.js" />

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
</handlers>
<httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/>
</system.webServer>
</configuration>