I guess it should be like this: (document is misspelled)
typeof(MyClientAppContractsModule).Assembly
instead of
typeof(MyClientAppModule).Assembly
According to this link I try to add following lines in ConfigureServices
method.
public class MyClientAppModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
// Prepare for static client proxy generation
context.Services.AddStaticHttpClientProxies(
typeof(MyClientAppModule).Assembly
);
}
}
and add Project References MyApplicationService project into MyApplication.Http.Client projects
But I got compile error: Error NU1201 Project XXX.Application is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Project
.Application TargetFramework : .net6.0 .Client TargetFramework : netstandard2.0
I wrote Http Patch method in an application service.To make run patch method regarding to this url I added below codes to Program.cs:
try
{
Log.Information("Starting Sample.V6.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers().AddNewtonsoftJson(); // ONLY ADDED THIS LINE
builder.Host
.AddAppSettingsSecretsJson()
.UseAutofac()
.UseSerilog();
await builder.AddApplicationAsync<IntHttpApiHostModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();
await app.RunAsync();
return 0;
}
Added this nuget package : https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.NewtonsoftJson/Microsoft.AspNetCore.Mvc.NewtonsoftJson
Is these steps okay especially do adding builder.Services.AddControllers().AddNewtonsoftJson();
may cause any problem?
Note: I tested patch method and it run successfully.
it is an remote Url , channel engine is not our project :) Probably it is not an abp project. Can generate-proxy be run only for abp projects?
I have already tried it, unfortunately I got same error
ABP Framework version: v5.3.3
UI type: Angular
DB provider: EF Core
Tiered (MVC) or Identity Server Separated (Angular): no
Exception message and stack trace:
Response status code does not indicate success: 404 (). System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) at Volo.Abp.Cli.ServiceProxying.ServiceProxyGeneratorBase``1.GetApplicationApiDescriptionModelAsync(GenerateProxyArgs args) in D:\ci\Jenkins\workspace\abp-framework-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ServiceProxying\ServiceProxyGeneratorBase.cs:line 36
Steps to reproduce the issue:" Open a command-line terminal in the root folder of your client project:
abp generate-proxy -t csharp -u "https://demo.channelengine.net/api/swagger"
I can use generate-proxy for my abp project url successfully . But I failed when using generate-proxy command in another url . Can I use generate-proxy command for any swagger url?
Hı @liangshiwei ,
Yes, but it hasn't UI dashboard. if there was a UI we could use it.
@liangshiwei Could you implement inbox pattern like in eventbus
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
If you're creating a bug/problem report, please include followings:
Abp suite doesn't create UI Pages if Abp solution is a module. Is there a bug or is this impossible?