зеркало из 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
|
||||
**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
|
||||
TODO
|
||||
###NTLM authentication
|
||||
More information at src/MusicStore/StartupNtlmAuthentication.cs
|
||||
**NOTE: Ntlm authentication works only on desktop CLR right now.
|
||||
|
||||
### 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 +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>
|
||||
<ItemGroup>
|
||||
<Content Include="CopyAspNetLoader.cmd" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="Helios.cmd" />
|
||||
<Content Include="LocalConfig.json" />
|
||||
<Content Include="project.json" />
|
||||
|
|
|
@ -68,20 +68,9 @@ namespace MusicStore
|
|||
|
||||
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
|
||||
if (runningOnMono)
|
||||
{
|
||||
services.AddEntityFramework()
|
||||
.AddInMemoryStore();
|
||||
}
|
||||
else
|
||||
{
|
||||
services.AddEntityFramework()
|
||||
.AddSqlServer();
|
||||
}
|
||||
services.AddEntityFramework()
|
||||
.AddSqlServer();
|
||||
|
||||
services.AddScoped<MusicStoreContext>();
|
||||
|
||||
|
@ -90,14 +79,7 @@ namespace MusicStore
|
|||
{
|
||||
options.DefaultAdminUserName = configuration.Get("DefaultAdminUsername");
|
||||
options.DefaultAdminPassword = configuration.Get("DefaultAdminPassword");
|
||||
if (runningOnMono)
|
||||
{
|
||||
options.UseInMemoryStore();
|
||||
}
|
||||
else
|
||||
{
|
||||
options.UseSqlServer(configuration.Get("Data:DefaultConnection:ConnectionString"));
|
||||
}
|
||||
options.UseSqlServer(configuration.Get("Data:DefaultConnection:ConnectionString"));
|
||||
});
|
||||
|
||||
// Add Identity services to the services container
|
||||
|
|
Загрузка…
Ссылка в новой задаче