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
Related
I have a website that running locally on IIS Manager. Every time when I update website, I communicate client via Anydesk and update its file. Whenever the client got any update from server than it should be automatically updated.
I got it solution to push dll file on GitHub. When customer click on update button GitHub file download automatically in where website hosted folder. The problem is here when I replace updated file, it will give an error 'The process cannot access file, because it already used'.
If this solution is correct, kindly guide me how to overwrite file while application running on IIS manager without stop application
Otherwise give me suggestion to update file from online window server to local IIS manager without closing application.
Currently, in ASP.NET Core apps, it is impossible to replace binaries when the application is still running, but it will possible in .NET 6 by Shadow-copying in IIS.
You should consider the Blue Green deployemnt for your app https://docs.cloudfoundry.org/devguide/deploy-apps/blue-green.html
Options that I can suggest for your:
Move app to the cloud provider and use their features. For example Azure has Load Balancer/Traffic Manager/Slot deployment that can solve your issue
You can play with IIS Load Balancer: https://learn.microsoft.com/en-us/iis/web-hosting/scenario-build-a-web-farm-with-iis-servers/configuring-step-3-configure-iis-web-farm-load-balancing#:~:text=To%20configure%20load%20balancing%20with,Open%20IIS%20Manager.&text=Under%20the%20server%20node%2C%20expand,list%2C%20and%20then%20click%20Apply.
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.
Currently I try to host webAPI to Microsoft Azure and it is showing me this error as below, but when I am running it on localhost, it is not showing this error.
Error in HelpPage_Default
According to your description, since it's working on your local side, I assumed that you could clean your solution and remove all files under your bin folders, then rebuild your solution. When deploying your web application via Visual Studio, check "Remove additional files at destination" under "Settings > File Publish Options" as follows to avoid something residue from older versions of your code.
Also, you could leverage KUDU to compare your deployed web application content with the local version. Delete all files under "D:\home\site\wwwroot" via KUDU, and re-deploy your web application.
I am using visual studio 2010 on .net4.0 for my projects and I've found that each time I do a change in my project, I build and run but I cannot see my changes. I've found this happening once or twice mostly with my web service projects. I'm no pro with web services and am encountering this problem for the first time so would be grateful to anybody who can tell me what has gone wrong with my project and how to fix it.
Edit
My asmx file is where I have added an additional method but am not able to see it when I run F5
When you change the compiled code in a web service or site, you need to make sure you restart the web server hosting that service or site.
You are probably using the ASP.Net Development Server. Although Visual Studio starts this server for you, it does not restart it automatically when you rebuild. As a result, the server will still be referencing the previous version of the assembly that you changed.
In the Windows system tray you should see one or more icons depicting a web page with a purple gear overlapping it at the bottom-left.
There are three of them in this example:
You can stop the server by right-clicking its icon and selecting "Stop". (If you have more than one, you will learn to identify the one you need to stop by recognizing the port number shown in the tooltip when you hover the mouse over the icon.) Visual Studio will restart it when needed.
When you're making changes to a service or site, use this workflow:
Make code changes
Stop the ASP.Net Development Server
Rebuild the project containing the changes
Run
Client-side code vs. Server-side code
If you're changing client-side code (HTML or JavaScript), then you may need to force your web browser to refresh its cache. In Windows this is normally done by pressing CTRL+F5 in the browser (see refreshyourcache.com/en/cache for more info). If you're changing compiled code (C#), and restarting the server doesn't help, try restarting Visual Studio, then do Build -> Clean Solution, then Rebuild.
If you are facing issues in ASP.Net Development Server, I think you are better off creating a virtual directory in IIS and host your web service there. That way you should be able to make your changes, just build it (don't run it) and that should be available on your virtual directory and you just browse to webservice. Then you don't have to hit F5 again and again and don't have to worry about instances of ASP.NET dev server.
Following article contains good step-by-step instructions on how you do it on IIS 7.0. This article is about hosting a website - however, hosting a webservice is not different.
http://www.codeproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS-7-0
I am trying to publish my project from my development machine to the staging environment. I would right click the project in visual studio and click publish. Most of the files would publish just fine, but a few were giving me problems. In the output log, there were multiple error messages, all stating:
Unable to add ‘XXX.ext’ to the Web site. Unable to add file ‘XXX.ext’. Access is denied (550)
I'm following this : But I don't find the "Read-only" attribute checkbox...
So have you any ideas ? Thanks in advance.
I just solved this problem on my own system. It was a permissions issue. What I had to do was grant "write" rights to myself on the IIS directory (in my case wwwroot). I retried the publish from Visual Studio and it worked perfectly.
Open visual studio in administrator mode. It solved my problem.
If you only get this for select files:
Go to the Server Published file folder
Select the problem Files
Properties
Uncheck Read-Only
Apparently this can occur when Source Control non-checked out files are read only, and then someone just copies specific files.
(I tried other people's suggestions: giving myself write access to wwwroot, running VS as admin, but for me it was the read-only that did the trick.)
If you have already published your solution and now it is not publishing, then run the Visual Studio on Administration mode and then publish it.
We had to add full path to publish location. So whereas the publish location used to be:
\webtest1\W_Apps
We did this:
\webtest1\D$\webdata\Intranet\Depts\SO\W_Apps
and then we didn't have the error message
The solution for me was to recycle the Application Pool for the website in IIS. I had this problem (access denied) for a few of the folders in the publish directory and none of the above solutions worked for me. After I recycled the app pool, I was able to publish with no problems.
it has permission problem of your web server
You must go to physical address of your website and share in with user of ftp account that you've create before and and your problem solve
In my case, I already tried to uncheck the 'Read-only' in the problem folder and files but still doesn't work. I already run the VS as administrator. What I did is just simply restart the visual studio and publish the project again, and it solves the problem.
Are you LOCAL administrator to your own PC? If not, that could be the problem and it's how I solved the issue at work.
This is a permission issue. I solved this by giving Full control under 'Security' tab for Users for the deployment folder.
I had same issue. I have followed the below steps to fix the issue:
First of all you have to identify that which account you are accessing visual studio. In my case, I have used my organization account.
Go to your deployment which you set as "Target Location" in publish
profile
Right click the deployment folder
Go to Security tab
In the list of users, identify the account using which you are
accessing Visual Studio ( in my case organization account)
Grant full permission by checking the check box "Full control" and click
"Apply"