Azure Bot Service code update with continues developmemt - c#

We had set up a bot service with LUIS in c# for a few months, now on we want to enable continues development with VSTS. we had set up the project in VSTS and commit the source without problem. And the bot service is configured with VSTS and able to deploy successfully without errors. But we found the bot still operating with sample code logic and the code still a sample code in the build tab. Is it any solution to let the bot service replace the old sample code?

I personally recommend using the SDK over Azure Bot Service, but that is a personal preference. I say this because it feels much like any project in Visual Studio and there are fewer steps to set up continuous deployment and other things like debugging locally.
For Azure Bot Service continuous deployment please read through this link to get started and make sure you did not miss a step. There are also instructions to debug your bot locally here. I hope this helps, please let me know if it does not.

Related

Cannot post activity. Unauthorized

For some reason, I am unable to start even the simplest bot in Bot Framework Emulator.
Steps to reproduce:
In VS2019, create new Echo Bot (Bot Framework v4 - .NET Core 3.1) project (using Bot Framework v4 SDK Templates for Visual Studio)
Run project without making any changes whatsoever (empty strings for MicrosoftAppIdand and MicrosoftAppPasswordin in appsettings.json)
Start Bot Framework Emulator
http://localhost:3978/ opens up in the browser without issue but in the Emulator I get the below errors:
Cannot post activity. Unauthorized.
POST 401 directline/conversations/<conversationId>/activities
What could be causing these errors with such a minimal project? My understanding is this should just work straight out of the box when running on localhost and no security credentials have been provided.
I am using a work computer and I'm wondering if there is something 'behind the scenes' blocking a connection somewhere/somehow? I have no idea where to look, though. It works fine on another computer and was working fine on this machine when I last tried a couple of months ago so I'm really confused.
Any clues or suggestions on how to debug this problem would be greatly appreciated.

Azure Service Fabric continuous integration fails in Visual Studio Team Services (was VSO)

I have tried to set up continuous integration to deploy my Azure Service Fabric cluster automatically on git push events in Team Services. I followed the default template for a Team Services Build Definition and a Team Services Release Definition based on this guide:
Set up continuous integration for a Service Fabric application by using Visual Studio Team Services
Here are my settings:
For the most part everything works for the first deployment. After that it throws the following error:
An application with name 'fabric:/<APP>' already exists, its type is '<APP>Type' and version is '1.0.0.20160812.7'. You must first remove the existing application before a new application can be deployed or provide a new name for the application.
From that it appears as though it is trying to completely redeploy the service instead of just upgrading the service. I have searched through all of the settings and tried creating and recreating the tasks but have not been able to resolve.
Has anyone encountered this before?
You need to add or update a publish profile to enable the upgrade mode and use that profile to deploy the Service Fabric after the first deployment is succeed.
To do this quickly, you can right click on your project and select "Publish" from Visual Studio, check "Upgrade the Application" option and click "Configure Upgrade Settings" if needed, and then click “Save Profile" link and commit/push the changes.
Though there is an accepted answer, I would still like to add to this thread. In the approach below we need to edit only the Azure Devops Task. Hopefully this will be useful to others who may encounter the same issue: One simple workaround when you encounter this issue is to change the "Overwrite Behavior" under the Advanced Setting for the build task to "Always". However, care must also be exercised so that if there are services which may already be running - all of them do get upgraded via a rolling upgrade (see second image).
To ensure that rolling upgrade is applied to all the services, in addition to the above, also ensure that the upgrade settings are configured as below:

install UCMA 3.0 and create a trusted application pool

I am following the tutorial
.As explained in the tutorial, I have installed UCMA 3.0 SDK
Next is, I ran Run Bootstrapper.exe /BootstrapLocalMgmt /MinCache successfully.
In the third step, I am trying to run the command Run Get-CsSite to get the SiteId, but I am getting an error as:
"Cannot find information about the local domain".
I am not sure about this error. Can somebody help me out with this. I am doing this on an azure machine.
Assuming that your machine is correctly joined to the domain, and meets the other pre-requisites:
You may be missing the configuration store, or the Lync components installation didn't succeed or didn't perform all needed setup properly.
I'd suggest to run the Lync 2010 setup (UI) on that machine, in order to have it joining the Lync farm properly (I use to do in this way), and get the configuration store as well.
My suggestion is to perform Step 3 and 4 from the following article:
http://lyncinsider.com/conferencing/how-to-add-new-servers-to-lync-20-tasks-every-lync-administrator-must-know/

How to deploy a C#, MVC4 application on Azure using Git

I am developing a C#, MVC4, EF5 Code First application on .NET in Visual Studio 2012 and have used the VS publish mechanism to deploy it to an Azure Website with an Azure SQL Database.
I now want to use Git and GitHub for version control and involve others in the project.
However, although I am familiar with using Git in a LAMP environment, I have no experience of using Git with Windows, Azure Websites and a compiled environment.
I would like to use the Azure Website as the production server, another Azure Website as a Staging server, developer Windows machines using Visual Studio for development and GitHub as the central repository.
There is a helpful article here: http://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-git/ . I can get my head around what would be needed here for, say, a PHP application on Azure. But I am unsure of the best approach with a compiled application and what I can achieve using Azure Websites and Visual Studio.
A nudge or two in the right direction would be greatly appreciated!
don't publish from VS to azure, instead setup your azure website to pull from the github repo. the deployment process compiles your solution.
watch http://www.youtube.com/watch?v=5NGieL0tinw&feature=youtu.be&hd=1 or read http://vishaljoshi.blogspot.com/2012/09/continuous-deployment-from-github-to.html
Also SocttGu announced this on his blog # http://weblogs.asp.net/scottgu/archive/2012/09/17/announcing-great-improvements-to-windows-azure-web-sites.aspx he also talks about a cool feature of publishing branches, this will nail your requirement for a stage server and production server. Have a stage branch and a production branch and merge to them as desired. see the section "Support for multiple branches"
looks like they added support for private repos finally.
appharbor is a competitor to azure that does something similar.
You are basically introducing a new step with the requirement that the source code must be compiled before it can be deployed to the server. Where you implement this step is up to you. You could:
Ensure that your target server has the capabilities to compile the source code (some Continuous Integration tools could help with this, such as CruiseControl.NET). This has the caveat that the target server be able to compile source code (possibly even requiring Visual Studio to be installed), so that may not be an option.
Check the compiled binaries into source control. You could keep these compiled binaries separate from the main source branch, to keep things clean. Deploy the binaries to the target server.
Some hybrid of the previous two options is also possible; you could set up a Continuous Integration server with CruiseControl.NET, which can check out the current source, build it, and check the resulting binary back into a special branch, then deploy that branch to your target Server.

Transitioning a cloud service from being local to being hosted on Windows Azure

I'm trying to host a very simple database on Azure and going out of my mind doing so. I've managed to get a local service running and communicating with my WP7 app just fine :).
I got this far by following this tutorial:
http://breathingtech.com/2011/how-to-use-wcf-services-to-access-sql-azure-database-from-windows-phone-7-app-part-1/
The tutorial provides steps to publish the service to Azure but my version of Visual Studio (2010 Professional SP1) is different and I can't do the final bit (hosting it on Azure).
When I hit 'publish...' as per the tutorial I get this (what do I do next?):
Can anybody point me in the right direction please?
Well if you want to follow that tutorial, you should right click the project, but instead of choosing Publish you should choose Package. After packaging this will open up a new Explorer window with the 2 files (the package and the cscfg).
Then you can simply go ahead and follow the rest of the tutorial.
Alternatively, you could simply change the environment from Staging to Production in the screen which you display in your question and click publish. This packages the application and deploys it to the selected hosted service (in your case apprehensive3months). If you do this, you won't need to upload the files manually in the portal (as described in the tutorial).

Categories

Resources