I have deployed one web application on window Azure portal and after connecting to RDP of that instance I have also installed on service and created on certificate in IIS.
Now when this webrole will reboot , all data (certificate & window service) will lost.
so to handle this situation which options can be possible?
Thanks.
What you could do is handle these activities as startup tasks which will get executed every time your role starts. Check out this link for more information on startup tasks: http://msdn.microsoft.com/en-us/library/gg456327.aspx.
Related
We have several ASP.NET Core web apps that use the Azure Key Vault.
This works well through all manual restarts, but when the web app is recycled automatically by Azure it does not start successfully due to a "KeyVaultErrorException: Client address is not authorized and caller is not a trusted service".
Restarting manually then works correctly. We have appinitialization turned on.
I realize that multiple instances would mitigate this, but how can we have the app successfully restart when recycled by Azure?
Edit:
The key vault is setup using the "Add connected services" through Visual Studio 2019, via the Microsoft.AspNetCore.AzureKeyVault.HostingStartup package v2.0.4
Navigate to the keyvault in the portal -> Networking, make sure you select the Allow access from All networks.
Or if you select the Private endpoint and selected networks, try to add all the Additional Outbound IP Addresses to the firewall.
We have a site that keeps falling to sleep, which causes an error due to the time-sensitivity of our sporadic requests.
I've seen how there is an "Always On" setting in the old Azure console, but it doesn't appear to apply to the new interface:
How to prevent an Azure website from going to sleep?
Where is this setting now, or how do I do the equivalent?
Here's what I see:
There's a couple of options. One of those is to use Traffic Manager Endpoint Monitoring which keeps calling your app so it doesn't recycle. Or is automatically started again when it does.
According to the blog post Windows Azure WebSites and Cloud Services Slow on First Request you can "include a script with your package, which is configured to run as a startup script, every time the role is restarted."
REM *** Prevent the IIS app pools from shutting down due to being idle.
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00
REM *** Prevent IIS app pool recycles from recycling on the default schedule of 1740 minutes (29 hours).
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.recycling.periodicRestart.time:00:00:00
How to proceed with the configuration can be found under "Avoid automatic recycle of Azure Cloud Services Web Role" of that post.
Check the Cloud Service availability on Azure portal.
Ensure that all role instances are in a Ready state. If they are not,
refer to the troubleshooting blade.
RDP into the role instance and check the IIS process (w3wp.exe) in
Task Manager is running.
If the w3wp.exe process does not show in Task Manager, go to IIS
Manager and restart the application.
Check the http response code you get in the browser. 50x errors are
application-related issues, refer to the troubleshooting blade.
Check that the default ports 80 (for http) and 443 (for https) are
accessible. Use TELNET or TCPING to ensure that the w3wp.exe process
is listening on it.
If your web application is accessible locally but not externally, it
could be a network-related issue.
You may want to refer this as well.
I am get error below on publish to azure using web deploy profile i downloaded from azure website
Web deployment task failed. (The maximum number of connections for this site has been exceeded. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEEDED_MAX_SITE_CONNECTIONS.)
I am using visual studio 2012
I was having the same issue but after restarting management service it worked for me.
Here are the steps:
Go to your windows server where IIS Server configured.
Control Panel => System and Security => Administrative Tools => Services.
In the Services. Restart Web Deployment Agent Service and Web Management Service
Give a try now to web deploy.
This may occur if you are connecting to the internet via a 3G dongle or card.
I have the same error and earlier in my warnings was "Retrying the sync because a socket error (10054) occurred" I'm stuck on a 3G connection today and getting this for the 1st time so presume these are related.
I know that it's been a long time ago, but I was struggling with the same issue lately. For me, it helped to restart the Web Management Service.
It might hang in Stopping status - if so, you can forcibly kill it:
First, open cmd with elevated privileges, and use sc queryex wmsvc command to find out the PID of the service.
Then, use taskkill /PID [the pid] /F command to kill the process. After that, you just start it again with services.msc
Hope it'll help :)
I had a similar problem trying to publish a WebSite on Azure. I solved it by restarting the website from azure management. If you're deploying to IIS, I suggest to try a restart or a stop and start for your website and try publishing again.
Hi I am implementing a TCPIP listener in Azure WorkerRole. The WorkerRole listens for incoming TCP data and stores it in Azure Table Storage.
Everything is working fine when i do this in Run() of WorkerRole.
But when implement the same thing in a Run() of WebRole, i get a message "WebIIS has exited" and debug mode exits in dev environment.
Why is this?
Can some one explain where the WebRole difers from WorkerRole? Can we implement a TCPIP listener which continuously listens in a WebRole?
Thanks
Anil
Just think that WebRole works like a Web Application. by receiving a request then it returns a reponse while Worker Role works like a Windows Service. Although both can hand TPC messages they difers in the way they hand it. Web Role only will be available while process the request. Worker Role will be available constantly. If you want a Web Role to be continuosly listening a TCP channel the most probably is that Worker Role will fit your requierements better.
Regards,
My answer on a similar question: https://stackoverflow.com/a/2610895/94559
In short, web roles are for IIS, and worker roles are for everything else. In this case, I think you want a worker role.
What is an Azure Cloud Service Role?
In Azure, a Cloud Service Role is a collection of managed, load-balanced, Platform-as-a-Service virtual machines that work together to perform common tasks. Cloud Service Roles are managed by Azure fabric controller and provide the ultimate combination of scalability, control, and customization
What is a Web Role?
Web Role is a Cloud Service role in Azure that is configured and customized to run web applications developed on programming languages / technologies that are supported by Internet Information Services (IIS), such as ASP.NET, PHP, Windows Communication Foundation and Fast CGI.
What is a Worker Role?
Worker Role is any role in Azure that runs applications and services level tasks, which generally do not require IIS. In Worker Roles, IIS is not installed by default. They are mainly used to perform supporting background processes along with Web Roles and do tasks such as automatically compressing uploaded images, run scripts when something changes in database, get new messages from queue and process and more.
I have created a WCF service which i have hosted in IIS. When I start the service in IIS, the Service do not started until I browse my Service.svc file.
Application pool gets recycled after a specific interval, then when the Service is restarted I again need to go and browse the Service.svc file.
I have set this Service as Default bt it does not work and results the same.
Is there any way to automatic browse my Service.svc file when the Service is started or restarted.
This is a general annoyance with IIS. It launches worker processes to perform website processing which don't (always) start until the website has been requested. The workaround I've used in the past is to hit a page outside of my web application to launch the IIS worker process so it is available when I need it. Be careful though there are some nuances to the app pools that can make this more complicated than it needs to be.