Activities of "liangshiwei"

Hi,

You need to override UI interface. See https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Overriding-User-Interface

Add to app.UseSwagger(); before

Hi,

You can add a middleware to do it: like this:

if (!env.IsDevelopment())
{
    app.Use(async (httpContext, next) =>
    {
        if (httpContext.Request.Path.Value.ToLower().Contains("swagger"))
        {
            var user = httpContext.RequestServices.GetService<ICurrentUser>();
            if (user.IsAuthenticated && user.IsInRole("Admin"))
            {
                httpContext.Response.StatusCode = 404;
                return;
            }
        }
        await next.Invoke();
    });
}

Hi,

You need to enable multi-tenancy and install the saas module.

Hi,

You can refer the audit-loggin module.

Hi,

Please see: https://github.com/abpframework/abp/issues/4388, https://github.com/abpframework/abp/issues/4350. They can help you.

Hi,

if it is a simple service and not use database,you can just create libary project , like volo.abp.automapper.

Hi,

Example (c# client):

var client = new HttpClient();
var disco = await client.GetDiscoveryDocumentAsync(_configuration["IdentityClients:Default:Authority"]);
if (disco.IsError)
{
    Console.WriteLine(disco.Error);
    return;
}

// request token
var tokenResponse = await client.RequestClientCredentialsTokenAsync(new ClientCredentialsTokenRequest()
{
    Address = disco.TokenEndpoint,
    ClientId = _configuration["IdentityClients:Default:ClientId"],
    ClientSecret = _configuration["IdentityClients:Default:ClientSecret"],
    Scope = _configuration["IdentityClients:Default:Scope"]
});

using (var httpClient = new HttpClient())
{
    httpClient.SetBearerToken(tokenResponse.AccessToken);

    var url = _configuration["RemoteServices:MyProjectName:BaseUrl"] +
              "api/MyProjectName/sample/authorized";

    var responseMessage = await httpClient.GetAsync(url);
    if (responseMessage.IsSuccessStatusCode)
    {
        var responseString = await responseMessage.Content.ReadAsStringAsync();
        Console.WriteLine("Result: " + responseString);
    }
    else
    {
        throw new Exception("Remote server returns error code: " + responseMessage.StatusCode);
    }
}

Hi,

Are you logged in to the application? Can you share the request message? thanks.

Hi,

You don't need do this, because abp has completed the configuration.

Showing 5621 to 5630 of 5863 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35