I am using the Shared IIS feature of IIS7 i have taken the config files of one server and put it in a shared location..in the second server i m using these config file from the shared location.I am able to synchronize this but the issue is whenever i m adding a new application in the IIS server of first server the other server doesn't show the latest application...in the second server i am just able to see the Virtual directory and not the application.
Can any1 help me on synchronising the two servers i.e when i add any new application in first server the other server should automatically show the changes.
My business requirement requires runtime generation of the applications in the IIS(which i have completed) the only problem is synchronisation.
Thanks,
Sajesh Nambiar
You need MS WebDeploy to do this implicitly.
http://www.iis.net/download/WebDeploy
Related
Scenario
I have an application that I have been developing for two years. I use the framework .NET to develop it in a language called Oxygene that comes from Pascal.
When I have something new in my code, I publish my application in File System method. I have a couple servers working on Amazon EC2, so I transfer this files to a folder in my IIS Server. In this IIS Server I already have a website that corresponds to my application, so I just replace the old files for the newest files.
I have another server that works as an SQL server.
Last detail is that in my application the user is able to attach files, import pictures, export PDF and Excel files. Attachments and pictures are stored in the same folder the application is located.
Issue
Here is my problem. I have got a new client that is kind of a big client. It seems like this company has a strong IT security, so the application must be located in their servers.
The big problem is that they required my application to be set in the following architecture:
I am used to only use an app server (works for external access) and a SQL server. They want the third server in DMZ net so they can let external access happen. The reason the application can't be placed in the DMZ is because there are the files I mentioned bellow that the user stores in the application. The database stores all the data, but not those files mentioned.
Solutions I have offered, but won't be accepted:
Publishing the application in a IIS server located in the DMZ: That won't be accepted since my application stores user attachments in the same folder the application is located. There are also images stored there.
Publishing the application in the app server, but also publishing a empty application in the DMZ server redirecting to the IIS server inside the LAN: That's the best solution I have come up.
Using a reverse proxy to protect the LAN Net: This is off the table, since reverse proxy is not safe at all.
I am kind of confused because I can't see a way to separate my application in two to make it work in that suggested architecture.
Can anybody give me a hint or ideas of how this would work?
-
You can't "redirect" to inside the LAN, a redirect is a client-side operation, so if the internal server isn't already exposed, you can't redirect someone to it.
A reverse proxy is likely your best bet. Why do you believe it is not safe? This is a tried-and-true solution, it allows you to leave additional ports/services open to internal requests (like a file server, which it sounds like you are trying to expose).
How are these files getting uploaded? Are you using FTP? SMB? HTTP? This solution will not expose those other protocols to the outside world (please don't expose SMB to the outside, it will result in tragedy). Do the external users need to upload these files?
I've got this Asp.Net MVC App I would like to deploy to my two servers running Windows Server 2012. Actually I've got two servers on which I would like the application to run. Only one server is used at some point in time and the second is just a copy of the first. Both servers must be in the exactly same state at any time so that when one of them is broken, I could redirect users to the second without them noticing any change.
Question:
How to sync the application on both servers to avoid having different states from one server to the other?
Check this ARR setup configuration in IIS
https://www.iis.net/downloads/microsoft/application-request-routing
Is it possible to publish an ASP.NET (core) application to a running site on IIS 8 without having to stop and start the website manually?
Visual Studio 2015 keeps giving the error that a file is in use. I'm using publish to the file system, because my Web Deploy to a server in our network fails at the end with an error that it cannot authenticate on the server with port 443.
I don't mind IIS having to recycle the application pool, but when I constantly have to put the app down, publish (which takes about a minute) and restart it, it's not really good for the users.
Another option would be something like 2 websites running the same application, but only if this is automatable. Then it would put down 1 of the 2, update this, put it on, put down the second, update this and start it.
A third option is something like a hot update, where I could just update the application while it being on.
Can anyone point me in the right direction (perhaps some blog posts), because my Google searches didn't give me any good information?
If you copy a file called app_offline.htm to the application folder IIS will gracefully stop your application and start serving the contents of the app_offline.htm file. When application is stopped you can copy your files. After files are copied remove the app_offline.htm file and IIS will start your app. VS does that for you when you deploy to Azure but not when deploying to file system.
You mention "two websites running the same application". Do you mean two web servers hosting the same app?
If you already have multiple web servers (a.k.a. cluster of servers, or web farm), you can simply take some servers out of the cluster and update them. That is how we push out our updates. We use software from Citrix for managing the server farm. It also handles load balancing. This type of software allows one to monitor the servers, so you can determine when all the users have "moved" off the web servers (that were recently taken out of cluster). Then you can iisreset, deploy the new build, and move on to the next server (or set of servers, depending on your configuration). We have more than 20 virtual web servers. Typically we take down half of the servers, update them, and take the other half down as we put the first half back in the cluster/farm. This should allow for uninterrupted service. I understand you want to automate the process. I'll assume you're using Windows NLB (network load balancing). You could write a PowerShell script to automate taking down the servers. Here's a reference:
https://technet.microsoft.com/en-us/library/ee817138
I understand this may be viewed as a workaround. I'm not sure if recycling the app pool is always necessary with ASP.NET Core. I wasn't able to find a definitive answer. Most production applications should be on more than one web server anyway. Even if you don't have a lot of users, you should have multiple web servers for failover purposes.
I have created a small web application with one page only. Now I want to host and deploy this application on one of our business's server so that anyone can access this small app.
Could please anyone tell me what will be the process as I don't have any previous knowledge or experience of doing this also, what changes I do need to make in my web config and the IIS configuration.
Kind Regards
Firstly: Install IIS on the server that you want to host your application on
Secondly: Setup the site in iis
Thirdly: If you have a database connection in your app check that the connection string is updated
Fourthly: Make sure that the relevant port in the firewall is not blocked
What would be the best architecture for ASP.NET MVC 4 website that has to be updatable when there is no (maintenance)access to the only server accessible from the Internet?
We have two servers: Server A has Internet access, but where we can't make updates when needed. Server B won't have this problem, but it's behind firewalls and can't be accessed from the Internet.
I have come up with a couple of ideas:
Run Asp.NET site on server B and build simple proxy to server A and tunnel the traffic. (how?) (cf. WCF routing)
Somehow dynamically load almost whole site from server B. It's Ok if the very core of the application can't be changed, as long as every sub application can be. Maybe build some maintenance page what provides action to load newest libraries and files from the server?
Build external updater -software.
Server A is also used by other companies and for example IISRESET is out of question. Application Pool that hosts the application can of course be recycled if needed.
With WPF I would just download the newest binaries and load them dynamically when starting the application, but with Asp.NET and IIS it's a bit more complicated.
Run Asp.NET site on server B and build simple proxy to server A and tunnel the traffic. (how?)
Any HTTP proxy can do this, with a mere handful of clicks or commandline instructions. I wouldn't go any other road.
Maybe try to run on Server A a WCF service, which can copy whole site files from Server B to Server A (I suppose Server B is available from Server A locally). In this scenario Server B is for updating and WCF service is only for deploying.