What is the recommend strategy to deploy a Blazor server SPA on a windows server machine with IIS without having a (even very short) downtime?
When I do some changes, I publish the project on local folder but then I have to manually stop the site on the server, else the copy hangs due file access lock.
Thanks
In my opinion, if you want to achieve zero downtime publish the new site, the only way is using two server.
You should use two servers and IIS load balance. You could firstly modify the load balance to transfer all the request to the second server and then publish the application to the first server.
After you tested the first server and make sure the first server is working well. Then you could transfer all the request to first server.
More details about how to use IIS loadbalance, you could refer to this article.
At the end, I created a .bat that before copying to production server rename a App_offline.xxx file in App_offline.htm, copy the files and then do the vice versa renaming.
Some seconds of downtime (with a message "server updating, refresh in few seconds...") much better that manual stop the site and then restart.
Related
I wrote a classic ASP script (.asp) for a customer a while back. it was running on IIS v6.1 Windows 2003. The customer contacted me and said they had a catastrophic server failure and restored from backup but my script isn't running now. I logged onto their server to check it out and IIS is serving the file (I am prompted to save when I browse to the script) but not executing the script.
Several people's hands were in the server before they called me, I think this is probably a simple config setting someone tried before they figured out how to enable the "ASP" web server roll feature. But for the life of me I can't figure out how they did it. this is obviously not the default behavior. If I was trying to get this behavior I would add the .asp extension to the MIME types, but I checked and it isn't there.
What could cause IIS to serve the source of the ASP script without executing it?
Based on your question I am assuming your restored server is also windows server 2003 ... in that case you will go to the file\folder and the permissions and select execute permission to enable a server side script processor to handle that request. Been almost a decade that I have touched a 2003 server so I can’t give you the exact steps ... but, you want to enable script permissions on that folder(I think, don’t remember if it’s granular enough to drill down to a file). Also, why on earth are they still running server 2003? Is that version even supported yet?
If it’s IIS 7, you want to make sure your app pool is in Classic ASP mode first off. Then go to site and then the handler mapping section, click edit and configure it that way.
I am new in share point. I just made some static site and host it on server, its was working fine. due to some reason I change my server location now this site is responding very slow. I did not get any root cause why its happening, even there is 5 more share point sites all are working very slow. May be there is some configuration problem please help me to fix it
Sounds like IIS is rebuilding the cache. This happens whenever the server is rebooted, or sharepoint is loaded in a new/different web server. Typically the speed increases after a few minutes as everything gets cached.
What #marten said is correct.. its takes time for distributed cache service to kick in for new server. also check if there is any app pool/IIS recycling schedule is applied on new server.
We are planning to start our new project in node.js but I want to be clear on the deployment side. Previously we have some applications written in asp.net. We deploy our applications as websites so when some page changes we deploy only that page on the web server and we don't need to restart the website or server. This type of deployment where we can deploy a particular page reduces our risk of letting those changes go on the production which we don't want to release as opposed to the mvc where you have to deploy the dll.
So my question is that can we do that kind of deployment on our node.js production site where I can deploy only one changed file lets say 'abc.js' and I don't need to restart the server and the connected users to my site shouldn't experience any issue or disconnection as in the case with .net mvc where user's session is ended.
Sorry if this seems too basic but I need to know.
Thanks
I updated a ASP.NET CORE/ASP.NET 5 RC1 controller cs file with a programming change.
The site has previously been deployed on production on IIS7.5 Windows 2012 Server which makes use of HTTPPlatformHandler installed in IIS.
This is a remote server I have to access via VPN.
The site is setup as an application in IIS and the folder points to the wwwroot directory of the deployed site.
I deploy it currently by deploying it first locally by right clicking on my project in Visual Studio 2015 and selecting publish to local folder. I then copy the contents of the local folder to the remote network IIS7.5 web server site folder.
If I copy for example the appsettings.json or a changed .cs file to the server, the change will not reflect.
If I copy the whole site to the production server I get folders and files in use messages. I have to kill the 'dnx' process in order to copy without getting these messages.
From my understanding if I kill the process dnx it will force a recompile. This is currently the only way I know of to restart the site after updating it but I imagine it is not the best way.
What is the standard practice to restart your website after you update your production sites that run ASP.NET5 RC1?
Also changing my app.settings json file aslo doesn't trigger a site reload like changing the web.config did in ASP.NET 4 so being able to restart a site is important.
If I have multiple sites on the same app pool and I only want to update one in production. How can I only restart the one site to reflect the latest changes?
Is it possibly to restart the website to reflect the change as updating it directly doesn't cause a recompile taking into consideration if I only have access to a shared folder and not the web server itself?
With IISPlatformHandler, DNX process is started by IIS (instructions are in wwwroot\web.config).
IIS knows nothing about your source files, all requests are forwarded to DNX.
DNX does NOT watch source files for changes, because there is no dnx-watch there.
IIS only watches for wwwroot\web.config file changes, so you need to change/edit/touch it to force IIS to restart website (and DNX process).
I use msdeploy to deploy, it has commands to stop and start app pools, using these commands has resolved my file in use errors. There are lots of ways to use msdeploy, below is how I happen to be using it.
msdeploy -verb:sync -source:recycleApp -dest:recycleApp="site/pool",recycleMode="StopAppPool",computername=COMPUTERNAME
msdeploy -source:contentPath='SOURCE PATH' -dest:contentPath='\\COMPUTERNAME\wwwroot\' -verb:sync -retryAttempts:2 -disablerule:BackupRule
msdeploy -verb:sync -source:recycleApp -dest:recycleApp="site/pool",recycleMode="StartAppPool",computername=COMPUTERNAME
We have an ASPNet5 site (angular site and webapi service) running under IIS 8.5 successfully. The issue we have now run into is dnx holding locks on files that prevent us from re-deploying the site from our automated deployment server. The task is simply using robocopy to perform the task but I can reproduce with a simple copy as well. Essentially, the error is "process cannot access the file xxxx because it is being used". The files in question are mostly under the approot/packages dir.
The question is how to work around this. The main goal being able to re-deploy without having to bring down the site which seems impractical.
We are running on Win2012R2, IIS8.5 and clr rc1-update1.
Thanks for your help in advance.