How to debug a web assembly c# code deployed to local azure service fabric - azure-service-fabric

I have a web assembly application that I deployed to the local azure service fabric cluster on Windows 11. How can I debug the c# code defined in the web assembly page through the browser and/or visual studio?

Related

Deploy Service fabric application from powershell without service fabric SDK

I am trying to deploy service fabric application from powershell. I am able to deploy with service fabric SDK. is it possible to deploy service fabric application from powershell using powershell scripts without having service fabric sdk installed?(Scenario: in a standalone service fabric cluster)
I haven't worked with standalone clusters, but based on my experience just working with a local dev cluster, yes, you need the SDK because it installs both the runtime (without a runtime, what cluster will the scripts connect to?) and the Service Fabric PowerShell module you'll be using (per the docs for the cmdlets).

Unable to connect to service fabric cluster through visual studio for remote debugging

Unable to connect to service fabric cluster through visual studio for remote debugging
I have a service fabric cluster deployed using ARM template. I am using the same cluster certificate and client certificate to connect to cluster(for development purpose only). I am able to connect to the cluster using powershell. However, when I try to connect to the cluster using visual studio cloud explorer for remote debugging, I get below error in the output window in visual studio:
Cloud Explorer could not connect to cluster 'xxxxxxxx':
An authentication token could not be obtained. Refresh the node to sign in again.
I have tried to refresh the cloud explorer but it has no effect. Additionally, I tried to deploy the service fabric application and then try, however, it has the same error before and after deployment of service fabric application.

How deploy .NET Core web application via Visual Studio Team Services to hosting with IIS

I would like to deploy my .NET Core web application via Visual Studio Team Services to hosting with IIS.
I have tried to discover the possibility of deployment the final release but I don't know what type of task I can use.
I usually used the deploy via Visual Studio 2017 and using publish proccess with MSDeploy and setup profile like this:
<publishData>
<publishProfile
publishUrl="publishUrl"
msdeploySite="site"
destinationAppUrl="destinationAppUrl"
profileName="Default Settings"
publishMethod="MSDeploy" userName="login" />
</publishData>
This site is not running on azure but on shared asp.net hosting.
How can I setup the Visual Studio Team Services - Deploy release if I only know these information?
What type of task is necessary to use?
Since you can deploy it with publish profile, you can to do it in VSTS build/release too.
NuGet restore (2.*) or Dotnet restore task
Visual Studio Build task (MSBuild Arguments: /p:SkipInvalidConfigurations=true /p:DeployOnBuild=true /p:PublishProfile="[profile name]"
You can use IIS Web App Deployment Using WinRM tasks if you have admin account.
If the host supports FTP, you also can upload the published files through FTP task.

Hosting console application in public service fabric cluster

I am trying to deploy a console application to service fabric. I was able to successfully deploy and run the application in local service fabric cluster. But when I am trying with public service fabric cluster, I am seeing below warning in service fabric explorer and the application is not running.
Unhealthy event: SourceId='System.Hosting',
Property='CodePackageActivation:C:EntryPoint', HealthState='Warning',
ConsiderWarningAsError=false.There was an error during CodePackage
activation.The service host terminated with exit code: 3762504530
The most common explanation for code the runs locally but not in Azure is that you're targeting a .NET framework version that is not present on the VMs provisioned in a Service Fabric cluster. They currently provide .NET 4.5.1 out of the box, with .NET 4.5.2 getting added some time this month. Try retargeting your app to 4.5.1.
Update: as of February 2016, VMs provisioned for Service Fabric clusters come with .NET 4.5.2 by default.

Auto Deploy using Continuous Integration in TFS 2012

I have setup continuous integration for a WCF project and want to use the MSBuild Arguments to automatically deploy the application to a remote server but it is not deploying.
When running a new Build all the Tests pass and all the projects build but the website is not being deployed. Also, I am getting no errors back from the build to say anything has gone wrong.
I have opened up port 8172 on the remote server to ensure connections can be made to IIS and have even disabled the firewall.
In the Build Configuration I have specified the following arguments;
/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:DeployIisAppPath="Default Web Site/MYSite" /p:MsDeployServiceUrl=http://mysite.com /p:username=MySite\Administrator /p:password=thePassword
I compiled this configuration from the following examples:
http://vishaljoshi.blogspot.co.uk/2010/11/team-build-web-deployment-web-deploy-vs.html
http://www.chrissurfleet.co.uk/post/2011/07/21/Setting-Up-Continuous-Deployment-In-TFS.aspx
I have configured the Server's IIS to enable remote connections and I can Remotely administer IIS from the build server. Also I have successfully deployed the Application using Visual Studio 2012 Publish option.
can anyone see a problem with my MS Build Arguments? Am I missing anything?
Any help would be very grateful
Update:
I have checked the build server to check MS deploy is installed and have installed Web Deploy 3.0 to ensure this is capabale, but has not solved my problem.
I have check the IIS connection logs to see if the remote connection to IIS is being made and there is no connection being made from my build server to the app server.
I have tried running MSBuild.exe for the solution and project on the build server manually with the following:
MSBuild.exe "Project Location" /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:MSDeployPublishMethod=WMSVC /p:DeployIisAppPath="Default Web Site/app" /p:MsDeployServiceUrl=http://appserver:8172/MSDeploy.axd /p:AllowUntrustedCertificate=True /p:CreatePackageOnPublish=False /p:Username=username /p:Password=password
The MSBuild is successfully building the project but is making no attemp to deploy it.
Any Ideas?
Turns out the problem was files were missing on the Build Server as desibried in the Answer to this question:
Similiar problem
Also when installing Web Deploy 3.0 using Web Platform installer not all the features required are installed in order to connect remotely to IIS through MSBuild command line.
I copied the nessesery files from my dev machine to the build server and installed Web Deploy 3.0 manually with all features and this now works!
Maybe there is a bug with TFS 2012???