Wednesday, August 10, 2011

Publishing WCF Services using IIS and .NET 4.0

1.0 Run the command aspnet_regiis -i to register asp.net 4.0 with IIS, updates both the classic and integrated mode handlers and script mappings in the IIS metabase.
1.1. Open Visual Studio in Run as Administration mode.
2. Right click on the WCF Service Project and choose Publish.
3. In the Publish Web Site Dialog box, choose following settings -
3.1 Publish Method: Web Deploy
3.2 Service Url - Address of the Service through which the publishing happens.
Ex: publishing locally - localhost
3.3 Site/Application - Url of Publish To site Ex: Default Web Site/MyApp. Note - This site should be already created in IIS as an application.
4. By Default the service will be deployed to run as Default App Pool which uses .NET 2.0. and will fail. Therefore, you need to change the App Pool of this Web Site to ASP.NET V4.0 Application Pool.
5. Ensure the Account used for the Application Pool has necessary permission on the resources used by WCF Service like DB Access etc.

No comments:

Post a Comment