Publishing to Azure taking too much time - c#

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 ?

Related

How to connect Azure webjob to local project so that I can remote debug my C# project on .NET

I have several Azure solutions with multiple projects inside, let's say one solution name is Customer. Inside are web jobs and api like:
CustomerHandler (web job)
CustomerApi (api)
This is written in C#, runs on .NET, and every time I commit my changes to git, it goes trough a pipeline in Jenkins and then to the Azure portal.
I have read in many places that I need to publish my project in Visual Studio to be able to attach a debugger and then be able to debug the web job running in Azure.
And that is the problem, I want to keep the flow that I have via, git and Jenkins. I don't want to publish the project from Visual Studio directly to Azure portal without going through the proper way.
So the question is: how can I remote debug my CustomerHandler web job that is live and running on Azure?
I have of course the code locally and can run the debugger locally, but sometimes the web job works locally but not in Azure. And it would be great to be able to debug directly on the cloud from my Visual Studio code. I have Visual Studio 2022.
Maybe one solution that I don't know how to do is to tell my local version of CustomerHandler to connect to the Azure CustomerHandler. Or somehow connect both?
I don't know I'm at lost here.
But there must be a way to just connect to Azure without publishing my local code directly to Azure and maybe breaking the working web job running in Azure.

.Net Core publish/deploy to Windows-Server-2019 from macos

I developed a WebApp using ASP.NET Core. I used VSCode on mac and also Visual Studio Professional 2017 for Mac (depending on my mood). 
Publishing on Azure through Git was pretty easy as there were a lot of resources to follow (especially Microsoft official documentation). 
I found out that Azure subscriptions are pretty expensive and i looked for a cheaper option. 
1&1 Ionos seemed to be a nice alternative. I subscribed to the WINDOWS .NET CORE hosting service, it come up with storage, database and domain. (cf) and it’s running the last version of windows server. Well.

But i couldn’t find nothing as documentation for publishing my website. 
I saw on Visual Studio than i can publish my project to a local folder on my pc and then copy paste the generated files on the server through FTP but i don’t even know where should i paste those files. Am i thinking/doing wrong ?
Finally it was as simple as this (in order to make it work)
First run from terminal "dotnet publish -c release" on the folder where .csproj is located.
This will generate files at bin/Release/netcoreapp2.2/publish/
Copy paste those files (under publish) through FTP at the root of your hosting service.

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.

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 !.

Publish History in Windows Azure Websites

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

Categories