How do I restart a biztalk application automatically? - biztalk

I want to restart a biztalk application automatically everyday. What's a good way to do it?

Related

BizTalk looses port bindings when deploying

As the title says: every time I deploy from Visual Studio to BizTalk 2013 R2 the orchestration gets unbounded and unenlisted. The receive/send port looses its pipeline.
I have tried to clean cached bindings on C:\Users\<your_user>\AppData\Roaming\Microsoft\BizTalk Server\Deployment\BindingFiles and do a redeployment on everything, but no success.
Any ideas on how to solve this?
Export the bindings before the deployment and re-import them after the deployment.
Another option is to install BizTalk Deployment Framework which has an option to Quick Deploy, that just simply re-GACs the DLLs, useful for when making small changes to existing objects that don't need to update the BizTalk DB

IIS 8 publish ASP.NET core application - file in use

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.

How to restart an ASP.Net Application automatically when it goes down

I have developed a asp.net application which is deployed on his personal server. The application is running in the background and updating his e-commerce database automatically. I have used Quartz.net for scheduling purpose.
My problem is that the application gets stopped after certain period (3-8 hours) of time.
I want a way to restart the application automatically as soon as it goes down.OR alternatively a service which visit the application periodically so it goes live.
Note: I have access to my client server and can yous windows scheduling if there is any solution relatively.
I have also read similar post but had no luck.
Your prompt response will be highly appreciated.
Thanks

aspnet_wp.exe restart automatically

Our web-application is on .net 1.1 and we have some legacy code that hangs-up IIS after every couple of days.
I was thinking about modifying machine.config settings to restart aspnet process after every couple of days, but the problem is it's going to kill existing sessions in process. Can I avoid it somehow.
Is there a better way to deal with this situation? right now client restarts IIS manually after every couple of days.
Thanks,
A
Edit:
If you have
- un-serializable objects in your session,
- cant work with sql-server
Then the good work around is to use "idleTimeout". It shuts down asp_net process if there is no activity on the server until the time specified. On the next request, it spawns asp_net process.
I suggest two things:
Configure the application to use SQL Server to store session data - this allows the session data to survive a restart of the web application
Configure the application pool to recycle worker processes periodically:
Of course, even better would be to update the web application to a recent framework version and fix at the same time the problem to prevent this from happening in the first place.
Do you actually store any type of data in Session? if you do, is it Serializable? If it is, just change the Web.config to use StateServer.
You just need to start ASP .NET State Service automatically by going to control panel--> administrative tools --> Services and setting up ASP .NET State Server to start automatically.
This will allow you to restart the aspnet_wp.exe process w/o losing session information; again, the only requirement is that the information you put in session is Serializable (which is likely the case or at least should be easy to do if your the code is not doing anything crazy)

Hosting an ongoing process in IIS

Is there a way to host an ongoing process in IIS? Let's say i'm writing an invoicing web site and every so often I need to send out scheduled invoices. This is really part of my invoicing app and I'd like it to be deployed as part of my invoicing app, by copying files to the web server. I don't want the deployment headaches or the awkward separation that would come with writing this as a Windows Service. Is there a way this can be done in IIS?
Probably your simplest solution would be to develop a simple console EXE that does its thing and you schedule it in Scheduled Tasks. Updates to the EXE are done the same way as the web app, just overwrite the file.
Take a look Best way to run scheduled tasks, it'd probably fit your use case.

Resources