Earlier we used to have a .Client project where we store proxies but this is not available in the new microservices template created by abp studio. so How and where to create static proxies
I am tyring to create it in the Blazor web app but when I create the proxy through abp generate-proxy -t csharp -m myprabh -u http://localhost:44314/
it only generates the json file but no proxy files.
-
Exception message and full stack trace: No Exceptions comes when run abp genearate... and only json file is created
-
Steps to reproduce the issue:
7 Answer(s)
-
0
Hi, If you are using ABP Studio, then in your final application, you can directly generate C# proxies, through ABP Studio UI. Please check https://abp.io/docs/latest/tutorials/microservice/part-03#generating-the-ui-proxy (this is explained for MVC, but it's not so different in the Blazor side, you should do it in your final blazor application)
-
0
Thanks EngincanV that is quite helpful. I will use this method from now on.
But I would like to inform you that I am still not able to see proxies yet.
-
0
Thanks EngincanV that is quite helpful. I will use this method from now on.
But I would like to inform you that I am still not able to see proxies yet.
Thanks for your prompt response. Let me check it and write you back then.
-
0
@EngincanV
FYI, I am facing this issue when I am trying to create proxy based on a microservice that I created along the basic other prebuilt microservice in the initial project creation time using abp studio.I found I am able to create proxy for chat microservice.
-
0
Hi, you should run your service while generating client proxies. To demonstrate it, I have created a CatalogMicroservice and then, expanded my blazor webapp project, right-click to generate client-proxies and you can see the configuration below:
Then, when it's completed:
I can see the client-proxies in my project:
-
both in ABP Studio UI (so I can re-generate it again if I want):
-
and also in my project's ClientProxies folder:
-
-
0
Strange. It only generates json file for me.
I am stuck and there is not error to look into.Mine project is blazor server based and you are using blazor web app template.
It is possible for you to try it with blazor server template?
FYI
proxies are created for abp
but not myPrabh -
0
Strange. It only generates json file for me.
I am stuck and there is not error to look into.Mine project is blazor server based and you are using blazor web app template.
It is possible for you to try it with blazor server template?
FYI
proxies are created for abp
but not myPrabhHi, I've checked with your exact configuration, but still could not reproduce it, please see the steps below:
1-) Created microservice solution:
2-) Created a new service called
MyPrabhService
(and also created a dummy appservice ->ProductAppService.cs
)3-) Then, run all services and try to generate client proxies:
All of the proxies are generated correctly ( I only defined
GetProductsAsync
method in my dummyProductAppService
class):
Please ensure that you have created the server by using our Microservice template, and in your blazor-server project there is a configuration as below:
context.Services.AddStaticHttpClientProxies(typeof(Issue9128BzServerMyPrabhServiceContractsModule).Assembly);