Skip to content

Commit ca88050

Browse files
committed
Rename connectionstring variable in Idsrv
1 parent 89cbbb4 commit ca88050

6 files changed

Lines changed: 12 additions & 13 deletions

File tree

ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
<EnvironmentVariables>
2323
<EnvironmentVariable Name="ASPNETCORE_ENVIRONMENT" Value="Development"/>
2424
<EnvironmentVariable Name="ASPNETCORE_URLS" Value="http://0.0.0.0:80"/>
25+
<EnvironmentVariable Name="PATH_BASE" Value="/eShopOnServiceFabric/IdentityApi"/>
2526
<EnvironmentVariable Name="SpaClient" Value="http://your_servicefabric_dns:19081/eShopOnServiceFabric/WebSPA"/>
2627
<EnvironmentVariable Name="XamarinCallback" Value="http://your_servicefabric_dns:19081/eShopOnServiceFabric/IdentityApi/xamarincallback"/>
27-
<EnvironmentVariable Name="ConnectionStrings__DefaultConnection" Value="Data Source=sqlserver.eshoponservicefabric,5433;Database=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word"/>
28+
<EnvironmentVariable Name="ConnectionString" Value="Data Source=sqlserver.eshoponservicefabric,5433;Database=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word"/>
2829
<EnvironmentVariable Name="MvcClient" Value="http://your_servicefabric_dns:19081/eShopOnServiceFabric/WebMVC"/>
2930
<EnvironmentVariable Name="LocationApiClient" Value=""/>
3031
<EnvironmentVariable Name="MarketingApiClient" Value=""/>
@@ -43,7 +44,7 @@
4344
<!-- This endpoint is used by the communication listener to obtain the port on which to
4445
listen. Please note that if your service is partitioned, this port is shared with
4546
replicas of different partitions that are placed in your code. -->
46-
<Endpoint Name="IdentityApiTypeEndpoint" Port="5105" UriScheme="http" Protocol="http" Type="Input" PathSuffix="eShopOnServiceFabric/IdentityApi"/>
47+
<Endpoint Name="IdentityApiTypeEndpoint" Port="5105" UriScheme="http" PathSuffix="eShopOnServiceFabric/IdentityApi"/>
4748
</Endpoints>
4849
</Resources>
4950
</ServiceManifest>

ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<EnvironmentVariable Name="CatalogUrl" Value="http://catalogapi.eshoponservicefabric:5101"/>
2727
<EnvironmentVariable Name="OrderingUrl" Value="http://orderingapi.eshoponservicefabric:5102"/>
2828
<EnvironmentVariable Name="BasketUrl" Value="http://basketapi.eshoponservicefabric:5103"/>
29-
<EnvironmentVariable Name="IdentityUrl" Value="http://your_servicefabric_dns:19081/eShopOnServiceFabric/IdentityApi"/>
29+
<EnvironmentVariable Name="IdentityUrl" Value="http://eshopservicefabricwin:19081/eShopOnServiceFabric/IdentityApi"/>
3030
<EnvironmentVariable Name="MarketingUrl" Value=""/>
3131
</EnvironmentVariables>
3232
</CodePackage>
@@ -40,7 +40,7 @@
4040
<!-- This endpoint is used by the communication listener to obtain the port on which to
4141
listen. Please note that if your service is partitioned, this port is shared with
4242
replicas of different partitions that are placed in your code. -->
43-
<Endpoint Name="WebMVCTypeEndpoint" UriScheme="http" Port="5100"/>
43+
<Endpoint Name="WebMVCTypeEndpoint" UriScheme="http" Port="5100" PathSuffix="eShopOnServiceFabric/WebMVC"/>
4444
</Endpoints>
4545
</Resources>
4646
</ServiceManifest>

ServiceFabric/eShopOnServiceFabric/PublishProfiles/Cloud.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
AzureActiveDirectory="true"
2121
ServerCertThumbprint="0123456789012345678901234567890123456789" />
2222
-->
23-
<ClusterConnectionParameters ConnectionEndpoint="eshopsfwin.westeurope.cloudapp.azure.com:19000" />
23+
<ClusterConnectionParameters ConnectionEndpoint="your_servicefabric_dns:19000" />
2424
<ApplicationParameterFile Path="..\ApplicationParameters\Cloud.xml" />
2525
</PublishProfile>

docker-compose.override.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545
- ASPNETCORE_URLS=http://0.0.0.0:80
4646
- SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104
4747
- XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always
48-
- ConnectionStrings__DefaultConnection=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word}
48+
- ConnectionString=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word}
4949
- MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110.
5050
- LocationApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5109
5151
- MarketingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110

src/Services/Identity/Identity.API/Startup.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
5555

5656
// Add framework services.
5757
services.AddDbContext<ApplicationDbContext>(options =>
58-
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
58+
options.UseSqlServer(Configuration["ConnectionString"]));
5959

6060
services.AddIdentity<ApplicationUser, IdentityRole>()
6161
.AddEntityFrameworkStores<ApplicationDbContext>()
@@ -81,15 +81,15 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
8181
{
8282
minutes = minutesParsed;
8383
}
84-
checks.AddSqlCheck("Identity_Db", Configuration.GetConnectionString("DefaultConnection"), TimeSpan.FromMinutes(minutes));
84+
checks.AddSqlCheck("Identity_Db", Configuration["ConnectionString"], TimeSpan.FromMinutes(minutes));
8585
});
8686

8787
services.AddTransient<IEmailSender, AuthMessageSender>();
8888
services.AddTransient<ISmsSender, AuthMessageSender>();
8989
services.AddTransient<ILoginService<ApplicationUser>, EFLoginService>();
9090
services.AddTransient<IRedirectService, RedirectService>();
9191

92-
var connectionString = Configuration.GetConnectionString("DefaultConnection");
92+
var connectionString = Configuration["ConnectionString"];
9393
var migrationsAssembly = typeof(Startup).GetTypeInfo().Assembly.GetName().Name;
9494

9595
// Adds IdentityServer
@@ -114,7 +114,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
114114
{
115115
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
116116
loggerFactory.AddDebug();
117-
117+
118118
if (env.IsDevelopment())
119119
{
120120
app.UseDeveloperExceptionPage();

src/Services/Identity/Identity.API/appsettings.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"ConnectionStrings": {
3-
"DefaultConnection": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word;"
4-
},
2+
"ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word;",
53
"IsClusterEnv": "False",
64
"MvcClient": "http://localhost:5100",
75
"SpaClient": "http://localhost:5104",

0 commit comments

Comments
 (0)