Hi gterdem,
As mentioned, Web Server are not allow to access DB Tier, So non-tiered template cannot apply in this environment. For .IdentityServer are not allow to host in Web Server due to .IdenityServer can direct access to database.
anyway to configure .IdentityServer to consume api from .HttpsApi.Host rather than direct access to database? If yes, then the ,IdentityServer should able to host in Web Server.
Thanks .
Happened same error in 4.3.2
Hi,
I can see the AppUser.cs if in Application Template.
But I can't find the AppUser.cs in Module Template for Navigation binding.
Regard, Yap
Hi @liangshiwei,
due to some hardware sdk only work on .net framework, I have to comsume the web api in wpf .net framework.
I hit the error for invalid_scope,
Do you have the complete sample code for .net framework to call web api in wpf?
Below is my code to get token and to call web api :-
private async void DoTest()
{
//discover endpoints from metadata
var client = new HttpClient();
var disco = await client.GetDiscoveryDocumentAsync("https://localhost/");
if (disco.IsError)
{
Console.WriteLine(disco.Error);
return;
}
// request token
var tokenResponse = await client.RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest
{
Address = disco.TokenEndpoint,
ClientId = "My_App",
ClientSecret = "1q2w3e*",
Scope = "Myapp"
});
if (tokenResponse.IsError)
{
Console.WriteLine(tokenResponse.Error);
return;
}
Console.WriteLine(tokenResponse.Json);
Console.WriteLine("\n\n");
//// call api
var apiClient = new HttpClient();
apiClient.SetBearerToken(tokenResponse.AccessToken);
var response = await apiClient.GetAsync("https://localhost:443/connect/token");
if (!response.IsSuccessStatusCode)
{
Console.WriteLine(response.StatusCode);
}
else
{
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(JArray.Parse(content));
}
}
Hi ,
Thanks for your guide.
I want to release some Web Api Services to others system to comsume, Is there any documentation or guide regarding Identity Server/Client setup ?
Thank you.
Hi,
I have tried for both return data.record.xxx and return data.xxx, still not working.
For the data type is comfirmed correct as i have use the same data type to shown in datatable column as text.
Hi @liangshiwei,
Tested, no error when running, but it is not working. The actions button still no show when the data == 'New'.