Currently trying to executing Azure with forms TO DO sample application.
When I executing I facing some issues
When I trying to publish the service there is no option for Microsoft Azure App service instead of that I am getting Microsoft Azure web app
After run app (Emulator).when trying to add new record I am getting Name Resolution Failure error
Well... not a lot of details but I will give a try...
Go to your Azure Dashboard and look for your App Service to download the publish profile.
Now, import it on your Visual Studio Project:
Related
I have a C# application that is built using the .NET Core Web API template. This works great locally and I can access the rest endpoints in my application.
For example /api/person/0 where 0 is the id of a person.
The problem is with Azure. When I create an app service and use a github repository the app gets deployed. In the logs I see the following partial error:
Physical Path C:\home\site\wwwroot\api\gerecht\1
Azure thinks that my C# app is a simple website and tries to access the path as a physical file and not as an endpoint in my application. Why is Azure not accessing the endpoint?
Thanks
How did you deploy the application to Azure?
[Brute Force]
You may want to use GitHub Action from inside Visual Studio for this.
Right Click Publish
Azure (Select appropriate OS)
Deploy using GitHub Action
I experience this in the past and that was how I solved it.
Alternatively, you could use the Azure CLI from inside the directory that contains your .csproj file.
Official documentation here.
I have built a Web App Bot via Azure Dashboard. I have played around with the code using the online editor, but I really need to download it to work in Visual Studio.
Whenever I try - via multiple PCs - to download via
Download source code Download your source code and develop locally
using your favorite IDE. You can publish your code back to the bot
when ready.
Download zip file
I get the error:
Failed to download the file. Error details: error 404 Not Found
What am I doing wrong? There's not much detail in the error. I'm sure I've been able to do this a while ago. Plenty of Google references on getting 404's uploading code TO Azure, but not downloading it :)
When you created bot application in Azure also has created web application with the same name. You can download the source code from web app - it has the same codebase with the bot app.
When going to publish my Mobile Service Backend there is supposed to be an option that says "Microsoft Azure App Service" but instead I get two other options: "Microsoft Azure Web Apps" & "Microsoft Azure API Apps (Preview)".
The Web Apps option identifies my service plan and SQL server but wants me to create a new mobile web app url which I already have.
Neither of these show my App Service I have already created. Is it because I don't have Azure SDK v2.9 or higher (as stated by the online resource I'm using)? When going into the NuGet Packages and it only has v2.0 for Microsoft.Windows.Azure.Server and no higher version
Anybody know how to get the higher SDK without going through VS 2015 or any other options?
According to your description, I suggest you could firstly check the existing of the mobile service resource in the VS2015 server explorer.
You could open it in the view --> server explorer.
Anybody know how to get the higher SDK without going through VS 2015 or any other options?
If this resource is existing, but the publish windows doesn't show this resource.
I suggest you could update your azure SDK(the newest is 3.0.1), you could install it in this link.
Besides, I suggest you could check you have created mobile service not web app service.
Problem
Getting a deployment error when trying to publish to an Azure Web App from TFS CI. A file is locked and this prevents the build from updating.
Symptoms
Publishing manually (Web Deploy publish from within Visual Studio) usually succeeds.
Stopping the Web App and publishing allows it to succeed, however this defeats the point of our CI if we need need to stop and start the Web App each time.
CI publish to Web roles and Worker roles don't appear to have this issue, we only get it on publishing to Web Apps (formerly Web Sites, the current Azure Portal term is now App Service).
Only publishing from a CI build via TFS fails consistently in this way.
Error
Web deployment task failed. (Web Deploy cannot modify the file
'msvcr100.dll' on the destination because it is locked by an external
process. In order to allow the publish operation to succeed, you may
need to either restart your application to release the lock, or use
the AppOffline rule handler for .Net applications on your next publish
attempt. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.)
The information at the link isn't very helpful.
ERROR_FILE_IN_USE
Diagnosis – A destination file cannot be overwritten or deleted because it is currently in use.
Resolution – Make sure that the destination file is not in use before performing a sync. If you are syncing content to a web site
hosted on IIS 7 or later (using the appHostConfig, iisApp, or
contentPath providers), consider taking the application offline during
the sync by enabling the appOffline rule.
Attempted resolutions
We were using New Relic - have since removed New Relic and this issue still persists. The binary appears to be a Microsoft library but it's unclear how it is relevant to the application (it's not referenced).
Some other SO questions have addressed similar issues with publishing but none of these relate to getting this issue from TFS CI.
azurew website continious deployment - Web Deploy cannot modify the file 'XXX' on the destination because it is locked by an external process
How to take web app offline while publishing?
One answer in the above question suggests using the EnableMSDeployAppOffline configuration in the publish profile, and adding this configuration works OK for doing a publishing manually from within VS but it doesn't fix the problem when publishing automatically from TFS/CI.
Edit
How to take web app offline while publishing? deals with taking the app offline using the EnableMSDeployAppOffline configuration - unfortunately this config only seems to be supported when doing WebDeploy through Visual Studio (not CI).
You can use the Web Deploy v3 in CI to deploy your web app.
In Web Deploy V3, we added support to automatically take an ASP.Net
application offline before publishing to it. This is useful if a user
wants to ensure that their application does not have a lock on a file
(e.g. SQL CE sdf files which only allow one connection to the file at
a time) being overwritten, or if they want to ensure that visitors to
their site cannot affect the publish process. When the publish process
is completed, the App_Offline.htm file will be removed and the site
will be online again.
Or you can add a PowerShell script like following to deploy the web app to Azure:
param($websiteName, $packOutput)
$website = Get-AzureWebsite -Name $websiteName
# get the scm url to use with MSDeploy. By default this will be the second in the array
$msdeployurl = $website.EnabledHostNames[1]
$publishProperties = #{'WebPublishMethod'='MSDeploy';
'MSDeployServiceUrl'=$msdeployurl;
'DeployIisAppPath'=$website.Name;
'Username'=$website.PublishingUsername;
'Password'=$website.PublishingPassword}
Write-Output "Stopping web app..."
Stop-AzureWebsite -Name $websiteName
Write-Output "Publishing web app..."
$publishScript = "${env:ProgramFiles(x86)}\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Scripts\default-publish.ps1"
. $publishScript -publishProperties $publishProperties -packOutput $packOutput
Write-Output "Starting web app..."
Start-AzureWebsite -Name $websiteName
Reference from: https://msdn.microsoft.com/en-us/Library/vs/alm/Build/azure/deploy-aspnet5
The new "Deploy AzureRM Web App" task has an option to take the app offline which will prevent this error.
See screenshot for checkbox
This is my first time trying to develop a windows azure application on my visual studio 2010.
what I have done so far is:
Open new project > C# > Cloud.
Downloaded the SDK.
Add new class with code that only displays my name and age.
try to run this code locally and failed!
My questions is:
am I able to run the application locally? if yes the how?
How can I deploy the application? (I already have an account)
Well for what I see your problem is not your windows azure sdk, the thing is that you are creating a WorkerRole project which is a Class Library type and that won't give you an output, for that you need to create a WebRole project.
here I let you this tutorial, it would show you how to create your first WebRole project.
http://www.dotnetcurry.com/ShowArticle.aspx?ID=801
And this one would show you how to deploy on the cloud
http://www.developerfusion.com/article/125435/deploying-an-azure-application
What type of application are you trying to build? Your error is because you are trying to run a class library, which isn't an executable.
There are primarily two types of applications that are hosted in Azure:
Website - These are just standard ASP.NET WebForms or MVC projects, hosted on Azure. These are the easiest to get going, and with the latest Azure release, require nothing special. Simply create a Web project, and git deploy to your Azure Web Site
Worker Role - Worker roles are usually for background tasks like performing computations, sending emails, distributing work, etc. These can effectively be thought of as console applications that never end.
For example:
while(true)
{
// do work here
Thread.Sleep(5000);
}
When developing Azure applications, you need to either create a website (WebForms, MVC, WebAPI), a WCF service, or a console application to run as a background worker. Once you've built the application locally, then you can add an Azure Cloud project, which will handle the actual deployments.
Yes, you can run your application locally: Select the Azure application project in the Solution Explorer, right click, "Set as StartupUp Project" and run
To Publish: goto https://manage.windowsazure.com/ . Create a new web role and download the publishing settings.