azure-service-fabric

Service fabric actor state and list

坚强是说给别人听的谎言 提交于 2019-12-13 22:15:58
问题 Is it recommended to have a list in Service fabric actor? I am trying to keep User favorites in a User Actor. What is best approach for this scenario? 回答1: Yes, as long as you treat the list as immutable. The state manager retrieval methods return a reference to an object in local memory. Modifying this object in local memory alone does not cause it to be saved durably. When an object is retrieved from the state manager and modified, it must be reinserted into the state manager to be saved

Azure web app accessing service fabric's virtual network

折月煮酒 提交于 2019-12-13 20:16:06
问题 I have a Service Fabric cluster hosting many legacy WCF services and I would like to connect an Azure App Service (running a website) to the fabric cluster's VNET, such that it can communicate with the WCF services in the cluster. I connected my fabric cluster's VNET to an existing virtual network of our organization using VNET peering and I can connect to the WCF services from VMs within the existing virtual network. However, when connecting from the app service, I got the following error:

Azure AD, ASP.NET Core Web App, and Service Fabric: How to get auth working on multiple machines?

笑着哭i 提交于 2019-12-13 20:15:14
问题 I have an ASP.NET Core Web App, and I want to use Azure AD authentication. I've got it all set up and working locally, but when I deploy it to my Service Fabric instance, I'm getting errors on internal API calls, because it attempts to login again on the API call. After some digging, I discovered that by default, the Machine Key is used to encrypt the cookie. My SF instance has multiple machines running, which seems to be the culprit (different machines cannot read the same cookie, therefore,

Why does ServiceRuntime.RegisterServiceAsync return before the serviceFactory func completes?

故事扮演 提交于 2019-12-13 20:13:59
问题 I find it very unintuitive that the ServiceRuntime.RegisterServiceAsync returns before the service is actually registered and the factory Func that is passed as a parameter completes. Think about the scenario where you need to resolve the same ServiceName you're registering. You can only get the ServiceName from the ServiceContext you get in the serviceFactory Func. You'd think you could resolve within the serviceFactory Func once you get the context. But then you enter a "deadlock" where the

Service Fabric process isolation for dynamically created services on the same node

走远了吗. 提交于 2019-12-13 18:07:25
问题 I have an SF application type consisting of two service types – stateless WebApi Gateway service type and stateless Worker service type. I am creating one application instance with default Gateway service instance. The Gateway service instance creates Worker service instances dynamically on demand by using code like this (the client variable is the System.Fabric.FabricClient instance): var serviceDescription = new StatefulServiceDescription() { ApplicationName = new Uri("fabric:/Gateway"),

Programmatically create Applications and Services

夙愿已清 提交于 2019-12-13 17:33:01
问题 For our new project we have to support a multi-tenant scenario. It has been recommended that having an application per tenant is the safest model, so we have logically separated our Apps into SystemApps and TenantApps Where the tenant services should be accessible (internally) via fabric:/TenantApps_{tenantId}/SomeTenantSvc We intend to have a System service that creates and remove client applications and checks their health. These applications will have a default service which in turn starts

FabricInvalidAddressException: NamedEndpoint 'V2Listener' when trying to connect from .NET Core application

非 Y 不嫁゛ 提交于 2019-12-13 15:30:28
问题 I'm am trying to connect to a Service Fabric application using the ServiceProxy class like so: return ServiceProxy.Create<ISomeService>( new Uri("fabric:/SomeService.App/ISomeService"), new ServicePartitionKey(0)); When I do this from a .Net Framework application everything works fine. However, when I try this from a .Net Core application I get the following error: InnerException = {System.Fabric.FabricInvalidAddressException: NamedEndpoint 'V2Listener' not found in the address '{"Endpoints":

configuration transforms in service fabric?

[亡魂溺海] 提交于 2019-12-13 14:26:48
问题 When you create an empty Service Fabric application through Visual Studio, the project template will automatically create different configuration files for you such as Node1.XML, Node5.XML, etc. We are much less concerned with the number of nodes than with which environment we are targeting. Is it contrary to Service Fabric recommendations to have simply 1 configuration file and create transforms from it? For example we might have something like this: <?xml version="1.0" encoding="utf-8"?>

Share queue with two or more stateful services within Service Fabric

核能气质少年 提交于 2019-12-13 08:36:58
问题 Is it possible to share a queue between 2 or more stateful services, or do I need to directly call it via tcp/http to put a message on its own internal queue? For example; say I have my first service that puts an order on a queue based on a condition: public sealed class Service1 : StatefulService { public Service1(StatefulServiceContext context, IReliableStateManagerReplica reliableStateManagerReplica) : base(context, reliableStateManagerReplica) { } protected override async Task RunAsync

SignalR client connection error (UWP & JavaScript Client)

扶醉桌前 提交于 2019-12-13 06:52:41
问题 I have both, a simple UWP app running on local machine in Visual Studio and a simple AngularJS SPA. I have also an OWIN based self hosted server running in a Service Fabric Cluster. The server use web api and signalR. When I'm hosting the Service Fabric Cluster on my local machine, the UWP app and the angular app can open a connection to a signalR hub on the server. When I'm hosting the Service Fabric Cluster on Azure, the clients are not able to connect to the signalR hub. I'm getting: