Changed localhost urls.

pull/221/head
Halil İbrahim Kalkan 7 years ago
parent 2874436afb
commit 696cad6017

@ -3,7 +3,7 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:54307/",
"applicationUrl": "http://abp-test-authserver.com:54307/",
"sslPort": 0
}
},
@ -21,7 +21,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:54308/"
"applicationUrl": "http://abp-test-authserver.com:54308/"
}
}
}

@ -16,7 +16,7 @@ namespace MicroserviceDemo.ConsoleClient
private static async Task RunDemo()
{
// discover endpoints from metadata
var disco = await DiscoveryClient.GetAsync("http://localhost:54307");
var disco = await DiscoveryClient.GetAsync("http://abp-test-authserver.com:54307");
if (disco.IsError)
{
Console.WriteLine(disco.Error);
@ -39,7 +39,7 @@ namespace MicroserviceDemo.ConsoleClient
var client = new HttpClient();
client.SetBearerToken(tokenResponse.AccessToken);
var response = await client.GetAsync("http://localhost:63877/api/multi-tenancy/tenant?SkipCount=0&MaxResultCount=100");
var response = await client.GetAsync("http://abp-test-tenancy.com:63877/api/multi-tenancy/tenant?SkipCount=0&MaxResultCount=100");
if (!response.IsSuccessStatusCode)
{
Console.WriteLine(response.StatusCode);

@ -58,7 +58,7 @@ namespace MicroserviceDemo.TenancyService
services.AddAuthentication("Bearer")
.AddIdentityServerAuthentication(options =>
{
options.Authority = "http://localhost:54307";
options.Authority = "http://abp-test-authserver.com:54307";
options.RequireHttpsMetadata = false;
options.ApiName = "multi-tenancy-api";

@ -3,7 +3,7 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:63877/",
"applicationUrl": "http://abp-test-tenancy.com:63877/",
"sslPort": 0
}
},
@ -21,7 +21,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:63878/"
"applicationUrl": "http://abp-test-tenancy.com:63878/"
}
}
}

@ -38,7 +38,7 @@ namespace MicroserviceDemo.Web.Controllers
var client = new HttpClient();
client.SetBearerToken(accessToken);
var content = await client.GetStringAsync("http://localhost:63877/identity");
var content = await client.GetStringAsync("http://abp-test-tenancy.com:63877/identity");
ViewBag.Json = JObject.Parse(content).ToString();
return View("json");
@ -46,12 +46,12 @@ namespace MicroserviceDemo.Web.Controllers
public async Task<IActionResult> CallApiUsingClientCredentials()
{
var tokenClient = new TokenClient("http://localhost:54307/connect/token", "client", "secret");
var tokenClient = new TokenClient("http://abp-test-authserver.com:54307/connect/token", "client", "secret");
var tokenResponse = await tokenClient.RequestClientCredentialsAsync("multi-tenancy-api");
var client = new HttpClient();
client.SetBearerToken(tokenResponse.AccessToken);
var content = await client.GetStringAsync("http://localhost:63877/identity");
var content = await client.GetStringAsync("http://abp-test-tenancy.com:63877/identity");
ViewBag.Json = JObject.Parse(content).ToString();
return View("json");

@ -80,7 +80,7 @@ namespace MicroserviceDemo.Web
{
options.SignInScheme = IdentityConstants.ApplicationScheme;
options.Authority = "http://localhost:54307";
options.Authority = "http://abp-test-authserver.com:54307";
options.RequireHttpsMetadata = false;
options.ClientId = "client";

@ -3,7 +3,7 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:61144/",
"applicationUrl": "http://abp-test-web.com:61144/",
"sslPort": 0
}
},
@ -21,7 +21,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:61145/"
"applicationUrl": "http://abp-test-web.com:61145/"
}
}
}

@ -7,7 +7,7 @@
},
"RemoteServices": {
"AbpMultiTenancy": {
"BaseUrl": "http://localhost:63877/"
"BaseUrl": "http://abp-test-tenancy.com:63877/"
}
}
}

@ -0,0 +1,58 @@
# Micro-service Architecture Demo
## Applications
* **MicroserviceDemo.AuthServer**: Identity4 Server used for authentication.
* **MicroserviceDemo.TenancyService**: API service to manage tenants.
* **MicroserviceDemo.Web**: Web UI application to manage users, roles and tenants.
## How To Run
#### Run Database Migrations
TODO:... Also need to seed database!
#### Host File
Add these lines into *C:\Windows\System32\drivers\etc\host* file:
````
127.0.0.1 openidclientdemo.com
127.0.0.1 abp-test-authserver.com
127.0.0.1 abp-test-web.com
127.0.0.1 abp-test-tenancy.com
````
#### IIS Express Configuration
Add the sites into *C:\Users\%USER%\Documents\IISExpress\config\applicationhost.config* file:
````xml
<site name="MultiTenancyDemo.WebSite" id="2" serverAutoStart="true">
<application path="/">
<virtualDirectory path="/" physicalPath="D:\Github\abp\src\MicroserviceDemo\MicroserviceDemo.Web" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":61144:abp-test-web.com" />
</bindings>
</site>
<site name="MultiTenancyDemo.TenancyServiceSite" id="3" serverAutoStart="true">
<application path="/">
<virtualDirectory path="/" physicalPath="D:\Github\abp\src\MicroserviceDemo\MicroserviceDemo.TenancyService" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":63877:abp-test-tenancy.com" />
</bindings>
</site>
<site name="MultiTenancyDemo.AuthServerSite" id="4" serverAutoStart="true">
<application path="/">
<virtualDirectory path="/" physicalPath="D:\Github\abp\src\MicroserviceDemo\MicroserviceDemo.AuthServer" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":54307:abp-test-authserver.com" />
</bindings>
</site>
````
...
Loading…
Cancel
Save