This continuation post of Implementing Azure AppFabric Service Bus series. Look at the end of this post for other parts.
The next step on Implementing Azure App Fabric Service Bus is to configure the service be Auto Start enabled. Before going for the steps, we required to know what Auto Start feature is and why it required to be configured for Service Bus.
In the previous step, we had developed WCF service and did required configuration for exposing to public using Service Bus. After the service ready for exposing to public, we ran the service application from Visual Studio. The service gets connected with Service Bus and register the public endpoints on it. So we are able to access the public endpoints after that.
But if the system or IIS server restarted, we required to open the application run the service for exposing again and the service must be connected with the Service Bus all the times for any communication.
Windows Server AppFabric is another Microsoft release which is a great way of improving a platform for providing better application infrastructure. Currently it comes with two parts
- App Fabric Hosting Service – Making it easier to run and manage services created with WCF and/or WF.
- App Fabric Cashing Service – Used for cashing the resources which are frequently accessed by the applications and speed up the resource availability.
As explained in Post 1, we required Windows Server App Fabric Hosting Service for auto starting the WCF Service in the on-premise when the system, IIS starts. So it will get connected with the Service Bus automatically and make TCP connection for further communications.
To know more about Windows Server App Fabric, use the below url
http://msdn.microsoft.com/en-us/windowsserver/ee695849
To install the Windows Server App Fabric in the system, use the below url.
http://www.microsoft.com/download/en/details.aspx?id=15848
Below are the steps for configuring Auto Start feature for WCF Service created in previous step.
Step 1: Open the IIS Manager using Start-> Run -> Inetmgr -> OK.
Step 2: Select the WCF Service virtual directory name (DotNetTwitterSOPService) under Default Web Site which required configuring Auto-Start features.
Step 3: Click Configure… under Manage WCF and WF Services section in Action panel.
The system will open Configure WCF and WF for Application window.
Step 4: Select the Auto-Start tab in the left side and select the Custom option. As defined information with each option, selecting Custom option enables to start particular services instead of all the services under the WCF Service application.
Note: If you happy to start all the services in the WCF service application, you can select Enable and skip steps 5 to 10. Enable option will start all the services under the application.
Step 5: Click Apply. It will popup and information regarding all the existing services will be recycled. Press Yes.
Step 6: Press OK in the Configure WCF and WF for Application window.
Step 7: Select the virtual directory (DotNetTwitterSOPService) of service under Default Web Site and double click the Services option from the App Fabric section (middle panel of the screen).
Step 8: IIS Manger will show list of services under the service application we are configuring (DotNetTwitterSOPService).
Note: Currently we are developed only one service (CustomerService), so we are getting only one service in the list. You can view the information of the service by double click the service in the list and select the General tab.
Below is the screen shot of two services I made in another sample WCF application. (just for demo)
Step 9: Double click a service from the list you required to configure the Auto-Start feature and select the Auto-Start tab.
Step 10: Check the Enable check box and click OK.
Step 11: Restart the IIS Server. You can do by selecting the IIS Server and selecting Restart command from Manage Server section of Action panel or using iisreset command from command window.
Now after you close the WCF application from Visual Studio, Restart the IIS Server, Restart the system – the WCF service will start automatically with IIS starts. So the public endpoint will be accessible once the service comes up.
Note: When the system or IIS Server is down, the service will not be exposed and will not be accessible in public.
The other links on Implementing Azure AppFabric Service Bus:
- Implementing Azure AppFabric Service Bus - Part 1
- Implementing Azure AppFabric Service Bus - Part 2
- Implementing Azure AppFabric Service Bus - Part 3
- Implementing Azure AppFabric Service Bus - Part 4
- Implementing Azure AppFabric Service Bus - Part 5
0 Responses to “Implementing Azure AppFabric Service Bus - Part 4”
Post a Comment