Is it possible to edit a project once is published on Azure? - c#

I'm testing an application I just published using the free option that Azure gives us.
In this process I found out that I need to make a change to a Controller (ASP.NET Core 2.0) and I've been looking for the options to do so.
I've encountered with Azure App Service Editor and I'm reading some documentation about it. However, it does not seem the way to do this kind of change since I can't access the *.cs files thru this service. This is the list of files that are shown:
So, my question is:
Is there a way to edit these files (controllers, views) with Azure App Service Editor?
If no, what would be the way to reflect this changes on my already published application? Also, in the case the answer is "republish the project", is it possible to do so without alter the information contained in the database that has been added during this test process and only update the modified files?
I apoligize if these questions are very basic but I'm just getting started to know about Azure. Thanks in advance.
How I publish it:
In order to publish this project I used the option Visual Studio gives us:
Now, if I go to the same option, this windows shows up:
Question: If I hit the 'Publish' button I believe it will republish, the whole project, correct (the database included)? If this is the case, I believe there will be conflicts about the databases, since I have already information in the project published and other information in the local project. Is it possible to reflect the update for everything but the databases?

No, you can't update the files there as this is a compiled web app, so you have to publish the update.
I'm assuming you're using EntityFramework and originally publishing the database via the web publish.
If you click "settings" on the publish dialogue, on the second page (settings tab) you'll see the options for publishing the database.
Here you'll see options as to whether to update the database during deployment, this I believe is to apply migrations. But if you uncheck these it should not update your database at all.
You should verify this after saving the publish by looking at the generated publish profile (you don't have to do a publish to see this)
It will be located at "YourApp\Properties\PublishProfiles" and should have been added to your solution, and will be called something like "Your App - Web Deploy.pubxml"
Within this you will see a <PublishDatabaseSettings> section, where the Enabled properties should be set to False
However I would advice that before publishing any update:
Test the deployment to a new server
Back up the database before deploying and test you can restore from it.

Related

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:

mvc4 vs2010 iis7 - set server auhentication

so my problem Erises as i refuse to advance nor to vs2012/15 nor to mvc 6 i think is the latest and nor using EF... well latest.
as the configuration i am in :
windows 7 .net 4.03... mvc4 iis7
i have a problem adding a new website/application so i could simply publish using built-in arrangement via vs2010... instead..as i did with webforms(my till now approach) copying source to wwwroot by my self.
so the issue is i can not find any article /tutorial to set it correctly as the guidance is to set via web platform referencing this age of versions is via using older Wplatform that has Install Web Deploy - via using option in list "Recommended Server Configuration for Web Hosting Providers" which does not exist in current wplatform...
update i forgot to mention i did not want to set any kind of athuresation till i know what will be the effect and what problems in connectivity to the application it will apply from other hand how easy will it be to hack even via spoofing no sweat
as it seems the problem till now was the access permit to the folder of the project i suggest to not use the vs studio as the folder of the project but to make a copy on a normal directory otherwise u need to set user as the user of iis asp.net iis/nameofpool and give it a read right ...full rights accessing the folder.

Error message on Azure after upload website onto it

I've got a page of error message displayed on my Azure mainpage after uploaded a website to Azure through Visual Studio 2015.
http://i60.tinypic.com/2ed8v1e.png
It is difficult to say without more information! but my initial thought would be that you have tried to deploy a number of solutions to the same website, and they are interfering with each other.
If you click on settings on the publish dialogue, inside 'File Publish Options' tick 'Remove additional files at destination'
Run that and see what it does.
It looks like you haven't properly configured OWIN, read this article to fix your OWIN App Startup class, then redeploy to see if that fixes it

Update existing asp.net Project with WCF

I have eCommerce ASP.net Project, This project have 20 important dlls and more java script files when i want to update website for my clients i have to give them dlls and js files and ask them to replace new files with old files and many many troubles.
But I want to create system like web service to update each client automatically like antivirus Update !
Is That even possible !
How about ClickOnce?
It's a microsoft tool that allows you to update the client automatically. When the client opens the application, it asks the server if there are any updates - If there are, it downloads them and updates. If not - nothing special happens and the app just start regulary.
A Web Deploy Package works quite nicely.
Create Package:
right click Publish and choose Web Deploy Package. This creates a .zip deploy package, which you can then easily import into IIS.
Deploy to IIS 7:
right click your site -> Deploy -> Import Application -> Navigate to the .zip deployment package, that's it. Here's a detailed walkthrough

Publish Winforms Application to a website

I've built a Winforms Application, and I want to publish it. I'd like to have a link on a website https://sites.google.com/site/satsavvyboardgame/home where I can have the user download the application and have it install on their computer. So far, I haven't found any way to wrap everything up in one package, or successfully publish to the web. What are the specifications for the URL to publish to the web?
Is there any way to package everything into one item (the site won't allow me to upload/download folders), so that the user could download one item, then run that or something in it?
Is there another way to do this that I haven't seen?
I'm using C# Visual Studio 2010 Express, and my application has the code and a couple of XML files that I need to run. All are part of the project, and run fine when I install from a file using the CD publish settings.
I've never published an application before, so any help would be much appreciated. Thanks!
You have 2 general options:
use "ClickOnce" which will enable automatic updates each time the user click to install and have several other benefits such as less problems with priviliges.
Use "Windows-Installer", which allows you more control of how to do and what to do during the installtion phase. However, shamefully, Package & Deployment project types do not exist anymore in vs2012. there are several 3rd party packages you can work with to create your setup-project.
The ClickOnce is preferable if what the user download is a just a simple standalone game application for example.. the MSI is for the more "rich" applications that should make extensive usage in the machine registry and etc..
The table in this link will give you the data you need to make a decision:
http://msdn.microsoft.com/en-us/library/142dbbz4(v=vs.80).aspx

Categories

Resources