Publish History in Windows Azure Websites - c#

How can i check the Publishing History of Windows Azure Websites. We are publishing our application using Publish Profile in Visual Studio 2012. We are using Code First Approach of Entity Framework
Last night someone changed the DB or Application from Production server but we are unable to check the History...

I dont think you can check the publish history, if you are using publishsettings file.
But you can use most of the version controls repositories like Git, TFS, Dropbox etc., and integrate automated deployments to azurewebsite from them. In that case deployment history will be maintained by Azure itself and you can view the history on Azure Portal.
Check out this ref for Git Deployment

Related

Uploaded mvc5 application files without publishing files in live site using code first

I have created the MVC5 code first Website on IIS and established the site with the Application pool in Live., then I did it manually. I did not publish my application, because the IT Network team do not know the publishing process. I uploaded as it visual studio files into live, users are registering live successfully but I saw so many examples are saying to publish the site, please suggest I have to publish my application is mandatory. And If I will keep my application like now into live any issue will come in futures.
There are multiple ways supported by Visual Studio to deploy an application. One of them is to publish it to local folder. You can publish your application to local folder, create a package and deploy it to hosting server.

Azure App Services isn't available

I've been trying to use Azure as Mobile App service and in the tutorial it is given to choose this :
Whilst when i try to follow it shows this :
Can anyone help ? Thank you :)
The Azure Visual Studio tooling, however, should be upgraded to version 2.8.1 or later...
https://azure.microsoft.com/en-us/downloads/
https://azure.microsoft.com/en-us/documentation/articles/app-service-api-whats-changed/
As Thiago suggested, you will have to install the latest Azure SDK to get the option.
If not, then you can select the Import option. This will require you to provide the publishsettings file.
You can download the publishsettings file from the Azure Portal. Here is a sample image: http://i.stack.imgur.com/YV2OQ.jpg
Once you have imported it, the IDE will pick the deployment endpoints from the file and you will be able to publish the App.
NOTE: Mobile Apps have the same deployment as the Web Apps. The IDE doesn't have the tooling to pick Mobile APPS from the subscription. Until then you will have to use the Import option in the VS deployment wizard.

Upon publishing to windows azure, Object reference not set to an instance of an object

Using my old computer. I used to publish web sites to windows azure (that was before the latest azure design) via Visual Studio 2013:
Right-click the project
Select Publish
Select Profile
Enter credentials
Validate connection
Publish
Now (with the latest azure design, and I am now using VS2015), with my new computer. I downloaded the profile I used to have then imported it then published it.
But then I got this error message
Then I tried to debug the error:
I used the connection string from my old published profile then pasted it in my webconfig. Upon running the application, it does not break the application instead it showed the error above.
Basically, I want to use the old profile I used to publish on windows azure. Same domain name and same database (I also want to keep the data)
What options do I have?
PS. I'm still new to windows azure. All I know is publishing website via Visual Studio
EDIT: I don't have any error locally
For the issue at hand, You can enable Diagnostics Logs and Check them to see why your site is crashing. You can even do remote debugging by attaching to the website running on the cloud.
To get the diagnostics logs follow the below steps.
Go to portal.azure.com.
Browse to your web app
Open the Settings Blade and Click on the Diagnostics Logs Settings.
Set the Diagnostics Settings as below.
After this go to the Tools by Clicking on Tools Command on the Web App Blade.
Click on Streaming Logs to see logs coming in at real time.
If you need to see the logs dumps, You can download the Publishing Profile and access the file share directly using any FTP Client like Filezilla using the FTP UserId and Pwd from the .publish file when you open it with notepad.
The other way to debug you app is to attach your visual studio directly to the Web App running on the cloud, This is very simple and powerful way to debug the issue interactively, As your error is a null ref the exception will break directly on VS and you should be able to see the cause quickly.
Great Blogs on Attaching to VS for a Web App Here.
There are multiple ways to publish your site to Azure Web App.
Using Continuous Deployment feature to deploy your bits based on your repo updates. Great Blog to learn how to setup Continuous Deployment on Azure App Service.
Publishing directly from Visual Studio which you are already familiar.Publishing Profile which you can download from the Web App Blade can be used in Web Matrix and other tools to deploy your site directly into a web app.
Downloading the Publishing Profile and directly placing the files in to the wwwroot of your website using FTP.
Glad to see developers starting into our product, hope this information helps you get started !.

Publishing to Azure taking too much time

We are deploying our application to Azure through the publish option integrated in visual studio 2013. But it's taking too much time publish the site to Azure every time.
By looking at the Azure App Service Activity tab, it seems that publish tool pushing all the files to Azure, even files that not changed at all. I am want to publish only the modified files to Azure . Does the is there any options for that ?

Deploying a web site to azure as a package

I'm starting an ASP.net web project that will be hosted on Azure, but I'm not certain whether to develop the project as a regular ASP.net application and deploy it as a Web Site on Azure, or to develop it as a Cloud Application with a Web Role.
The project's nature is that of a web site (simple database back-end), but the question is one of deployment. We aim to build versions of the application and then deploy to staging and production environments, meaning the output of a build should result in a single package (similar to what's described in msdn).
There's plenty of information on how to create a service package to publish a cloud service, but articles on publishing a web site to azure follow a 'web deployment' scenario, where deployment is done via Visual Studio (subscription file from Azure etc).
Is there a way to deploy a web site to azure as a package? Or are tools like Visual Studio needed for a web deploy? If so, then is composing the project as a Cloud service with only a web role the correct choice?
I posted a comment under the question, regarding differences between Cloud Service & Web Site, but to answer your question about packaging: Cloud Services & Web Sites take two different approaches to deployment, and there's not really "works for both" packaging:
Web Sites are designed to accept your code deployment from either a source code repository. The idea is that you have a labeled version of your code, and push it out from TFS, git, Bitbucket, etc. You can also push your code up with ftp, or drop it into a dropbox folder. Because Web Sites run in IIS, and because you don't have any control over the VM farm running your Web Sites, you cannot push up startup scripts as you can with Cloud Services; you cannot install registry updates, COM objects, msi's...
Cloud Services are designed around a stateless VM model. Every time you scale out (add instances), a baseline Windows Server VM is spun up, and the contents of your deployment package is copied to the new VM instance and executed. This includes startup scripts, installers, etc. Since you have admin-level access to each VM, you can configure it as you need to, from your startup scripts / OnStart(). Definitions for each role are combined into a single deployment package. To update one or more roles, you need to redeploy the package.
Web Sites have no tooling pre-requisites, while Cloud Services require Visual Studio or Eclipse to help you manage the deployment package. You can also use PowerShell and Visual Studio command line tools to build the package, as #Ben Robinson mentioned in the comments above. You can also use PowerShell to create and administer Web Sites. Both Cloud Services and Web Sites provide Staging and Production slots.
You can't push a deployment package to Web Sites.
David's answer does a great job covering the Cloud Services option. However, I believe the Azure Website option is well-suited to your needs. You don't have to deploy using Visual Studio. Instead, you can create a publish profile in Visual Studio that creates a Web Deploy Package which is simply a ZIP file that can be published at a later time using command-line tools, no Visual Studio required. It also generates a .deploy.cmd file that you can run to deploy to a remote server, and a SetParameters.xml file with parameters such as connection string that you can modify for your target deployment environment. The .deploy.cmd file calls msdeploy.exe which does the actual deployment.
See this for more details on Web Deploy command-line deployment. There's also a ton of information on MSDeploy and its package system on Sayed Ibrahim Hashimi's blog.
If you want to be able to change files directly in the web application then it is best to use an Azure Web App, because you can access those through FTP.
However an Azure Cloud Service does not provide FTP Access, at least not a useful one that would allow you to use an FTP Client to upload files. A Cloud Service is where you do not want to be bothered too much with much of the details of hosting a web application. While an Azure Web App does much of the same thing, it also allows you to have FTP access and direct access to the files post-deployment.

Categories