Saturday 13 April 2013

AX 2009/2012 : Deployment of web service on IIS


How to deploy a web service on IIS :
  • Open your We Service Application project. Go to Solution Explorer and right click on your Web Service Project. Select “Publish” from the drop down menu.

  •  A “Publish Web” window will appear.

Rename the Publish Profile name from “Profile1” to “MyFirstWebServiceProfile”. Select “File System” as Publish Method. And give the target location to publish the Web Service. I am keeping target location under “C:\inetpub\wwwroot\MyFirstPublishedWebService”.


Click on Publish button. The Web Service Application is now published.
  •  You will find following files and folder in your published folder.
i)             bin folder – this folder contains the .dll file.
ii)           Web.Config file
iii)          Service1.asmx file
  •  Now open IIS (Internet Information Service). Click here to know how to install and enable the IIS 7 in your Windows 7 machine.

Here, you can see your published folder under “Default Web Site”.  We will need to convert it to application.
  •   Right click on the published folder and select “Convert to Application”.
 

You can provide different Alias and application pool. The application pool must have a Read Access to the physical path.
Hitting on Ok button will publish your Web Service in IIS.

Note : Select the required application pool rather than selecting "Default application pool" .
  • Now you will need to enable the Directory Browsing of our newly created Web Service Application. While selecting “MyFirstPublishedWebService” application double click on “Directory Browsing”.
  • Click on enable to enable the Directory Browsing.


Now restart the IIS to take effect the changes.






No comments:

Post a Comment