зеркало из https://github.com/aspnet/MusicStore.git
Updating sample readme
Also removing some mono related settings on NtlmStartup.
This commit is contained in:
Родитель
f400550b5b
Коммит
3d79659cc0
|
@ -25,8 +25,9 @@ This project is part of ASP.NET vNext. You can find samples, documentation and g
|
||||||
* Try `k kestrel` to run the application
|
* Try `k kestrel` to run the application
|
||||||
**NOTE: On Mono since SQL client is not available the sample uses an InMemoryStore to run the application. So the changes that you make will not be persisted.
|
**NOTE: On Mono since SQL client is not available the sample uses an InMemoryStore to run the application. So the changes that you make will not be persisted.
|
||||||
|
|
||||||
###NTLM authentication & Environment based Startup detection
|
###NTLM authentication
|
||||||
TODO
|
More information at src/MusicStore/StartupNtlmAuthentication.cs
|
||||||
|
**NOTE: Ntlm authentication works only on desktop CLR right now.
|
||||||
|
|
||||||
### Note:
|
### Note:
|
||||||
1. Application is started on different ports on different hosts. To change the port or URL modify ```Helios.cmd``` or project.json commands section in case of self-host and customhost.
|
1. Application is started on different ports on different hosts. To change the port or URL modify ```Helios.cmd``` or project.json commands section in case of self-host and customhost.
|
|
@ -1 +1 @@
|
||||||
Only for testing purposes. Not needed for production deployments.
|
# Mock code added only for testing purposes. Not to be used for production deployments.
|
|
@ -21,7 +21,6 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="CopyAspNetLoader.cmd" />
|
<Content Include="CopyAspNetLoader.cmd" />
|
||||||
<Content Include="favicon.ico" />
|
|
||||||
<Content Include="Helios.cmd" />
|
<Content Include="Helios.cmd" />
|
||||||
<Content Include="LocalConfig.json" />
|
<Content Include="LocalConfig.json" />
|
||||||
<Content Include="project.json" />
|
<Content Include="project.json" />
|
||||||
|
|
|
@ -68,20 +68,9 @@ namespace MusicStore
|
||||||
|
|
||||||
app.UseServices(services =>
|
app.UseServices(services =>
|
||||||
{
|
{
|
||||||
//If this type is present - we're on mono
|
|
||||||
var runningOnMono = Type.GetType("Mono.Runtime") != null;
|
|
||||||
|
|
||||||
// Add EF services to the services container
|
// Add EF services to the services container
|
||||||
if (runningOnMono)
|
services.AddEntityFramework()
|
||||||
{
|
.AddSqlServer();
|
||||||
services.AddEntityFramework()
|
|
||||||
.AddInMemoryStore();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
services.AddEntityFramework()
|
|
||||||
.AddSqlServer();
|
|
||||||
}
|
|
||||||
|
|
||||||
services.AddScoped<MusicStoreContext>();
|
services.AddScoped<MusicStoreContext>();
|
||||||
|
|
||||||
|
@ -90,14 +79,7 @@ namespace MusicStore
|
||||||
{
|
{
|
||||||
options.DefaultAdminUserName = configuration.Get("DefaultAdminUsername");
|
options.DefaultAdminUserName = configuration.Get("DefaultAdminUsername");
|
||||||
options.DefaultAdminPassword = configuration.Get("DefaultAdminPassword");
|
options.DefaultAdminPassword = configuration.Get("DefaultAdminPassword");
|
||||||
if (runningOnMono)
|
options.UseSqlServer(configuration.Get("Data:DefaultConnection:ConnectionString"));
|
||||||
{
|
|
||||||
options.UseInMemoryStore();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
options.UseSqlServer(configuration.Get("Data:DefaultConnection:ConnectionString"));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add Identity services to the services container
|
// Add Identity services to the services container
|
||||||
|
@ -143,4 +125,4 @@ namespace MusicStore
|
||||||
SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait();
|
SampleData.InitializeMusicStoreDatabaseAsync(app.ApplicationServices).Wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Загрузка…
Ссылка в новой задаче