azure-service-fabric

How to access settings.xml in Azure Service Fabric stateful/stateless service?

送分小仙女□ 提交于 2020-06-14 04:18:28
问题 How can I access and read parameters definied in PackageRoot/Settings/Settings.xml file from my stateful/stateless service code? For example I have a section DocumentDbConfig with Parameter EndpointUrl: <Section Name="DocumentDbConfig"> <Parameter Name="EndpointUrl" Value="{url}"/> </Section> And I would like to read it in my code: public async Task<ServiceActionResult<Result>> GetResult() { _client = new Client({{ EndpointUrl }}); //HOW TO GET ENDPOINT URL FROM SETTINGS? } 回答1: As long as

Deploying ServiceFabric apps using AzureAD Authentication

荒凉一梦 提交于 2020-06-08 12:51:28
问题 I want to deploy apps to my service fabric using azure ad & powershell. I've setup the required azure AD apps, but I don't know how to login to an Azure AD account programtically so it can be deployed from CD tool. It seems like this needs to be an AD user and not service principal. The COnnect-ServiceFabric cmdlet requires some sort of security token when using AzureAD and I don't know how to provide it to avoid the popup. 回答1: Here are steps that you could use to get things up and running -

Cannot start Service Fabric local cluster

怎甘沉沦 提交于 2020-04-18 03:51:36
问题 I am having an issue where the local cluster is not starting. This issue just started today because yesterday I was able to run my local cluster with no problems. Scenario 1 I can run the Service Fabric Local Cluster Manager without issues. (I have run this both as Admin and as non-elevated user and I get the same output). After I run this, I go to my system tray and click Setup Local Cluster > 1 Node After a while I get an error message that tells me that something failed and to take a look

Cannot start Service Fabric local cluster

£可爱£侵袭症+ 提交于 2020-04-18 03:51:33
问题 I am having an issue where the local cluster is not starting. This issue just started today because yesterday I was able to run my local cluster with no problems. Scenario 1 I can run the Service Fabric Local Cluster Manager without issues. (I have run this both as Admin and as non-elevated user and I get the same output). After I run this, I go to my system tray and click Setup Local Cluster > 1 Node After a while I get an error message that tells me that something failed and to take a look

Cannot start Service Fabric local cluster

会有一股神秘感。 提交于 2020-04-18 03:51:07
问题 I am having an issue where the local cluster is not starting. This issue just started today because yesterday I was able to run my local cluster with no problems. Scenario 1 I can run the Service Fabric Local Cluster Manager without issues. (I have run this both as Admin and as non-elevated user and I get the same output). After I run this, I go to my system tray and click Setup Local Cluster > 1 Node After a while I get an error message that tells me that something failed and to take a look

Wont add dependencies because of missing service fabric packages

坚强是说给别人听的谎言 提交于 2020-04-13 23:01:59
问题 Starting a new empty .NET Core 2 class library i try to add any dependency with nuget i get this error Error The local source 'C:\Program Files\Microsoft SDKs\Service Fabric\packages' doesn't exist. But service fabric should have nothing to do with this solution . Also the solution builds succesfully 回答1: I faced the same error. There was service fabric installed but I decided to delete it. Then after that, this error started to appear. All you have to do is create an empty packages folder C:

Wont add dependencies because of missing service fabric packages

怎甘沉沦 提交于 2020-04-13 22:54:53
问题 Starting a new empty .NET Core 2 class library i try to add any dependency with nuget i get this error Error The local source 'C:\Program Files\Microsoft SDKs\Service Fabric\packages' doesn't exist. But service fabric should have nothing to do with this solution . Also the solution builds succesfully 回答1: I faced the same error. There was service fabric installed but I decided to delete it. Then after that, this error started to appear. All you have to do is create an empty packages folder C:

Wont add dependencies because of missing service fabric packages

拜拜、爱过 提交于 2020-04-13 22:50:40
问题 Starting a new empty .NET Core 2 class library i try to add any dependency with nuget i get this error Error The local source 'C:\Program Files\Microsoft SDKs\Service Fabric\packages' doesn't exist. But service fabric should have nothing to do with this solution . Also the solution builds succesfully 回答1: I faced the same error. There was service fabric installed but I decided to delete it. Then after that, this error started to appear. All you have to do is create an empty packages folder C:

A registration already exists for URI - How to programmatically check / remove registration?

二次信任 提交于 2020-01-25 10:06:27
问题 I am hosting my WCF services in service fabric. One of the WCF service starts a HttpSelfHostServer on a port after startup. I sometimes gets the error: A registration already exists for URI 'http://localhost:10503/'. at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.CommunicationObject.EndOpen(IAsyncResult result) at System.Web.Http.SelfHost.HttpSelfHostServer.OpenListenerComplete(IAsyncResult result) In service fabric, I think there could be

Service Fabric .net core app not .net core

不问归期 提交于 2020-01-25 07:50:07
问题 We are in the process of building an service fabric application and have run into a bit of a issue, whenever you user Visual studio to create a new service fabric app and you specify to use a .Net core app, the app/api that is create is a .Net framework app and not .Net core. <TargetFramework>net452</TargetFramework> Instead of: <TargetFramework>netcoreapp2.0</TargetFramework> Does anyone know the reason for this, or is this intended behavior? Regards 回答1: You need to use the preview tools to