How to configure IIS manager and PI Notification to get a text output file using the Web Service delivery channel

Version 2

    This is tested on

    Windows Server 2008 R2 and IIS 7.5

    MS Visual Studio 2012

    PI Server 2012

    PI AF 2014 R2

    PI Notification 2012

     

    Issue

    How do I configure IIS manager and PI Notification to get a text output file using WebService delivery channel.

     

    Solution

    This is an example of text output using PI Notification WebService delivery channel. When a notification triggered, this will create a text file in your local folder. The text file contains attributes information like below example.

     

       textoutput_1.png

     

     

    You can change parameter names by editing webservice coding and you can select values from your AF attributes. You can download this sample text output webservice coding from attached "WebServiceTXTOutput.zip".

     

    The following steps are the details of how to configure IIS and PI notifications.

     

    1. Open IIS manager and choose your server.

     

    2. Add a new website for webservice and add an application under the site.

      to2.PNG

     

    2-1. Create a new physical folder and put the location in Physical path.

    ->Create a Web Site

      to3.png

     

    ->Create an application

      to4.PNG

     

     

    2-2. Set Credentials and proceed test

      to5.png

     

      to6.png

     

     

    3. Move to Application pool and right click on Noti_WebService to check .NET Framework version is 2.0. If it's not, you should configure it to ".NET Framework version 2.0".

    ->To check application pool : Right click on "TextOutput" application>manage Application>Advanced Settings...

        to7.PNG

     

    4. Open Visual studio to publish text output webservice coding.

     

      to8.PNG

     

     

     

    4-1. In the publish Web window, check Site/application. It has to be matched with IIS.

     

      to9.PNG

     

    5. Create a folder in your local hard drive such as "C:\WebServiceOutput". This folder is the place where the text output files will be stored.

     

    6. Open PI System Explorer and go to Contacts.

     

    7. Add a new delivery endpoints and choose WebService for Delivery Channel.

     

    7-1. Put your web service address plus "service1.asmx" at the end. You can also find the address from IIS>Browse.

     

      to10.PNG

     

    ->how to check the URL in IIS.

     

      to11.PNG

     

      to12.PNG

    to13.PNG

      7-2. Click "Get Web Services" and choose OutputToString for Default Web Method, and click Test.

     

      to14.png

     

    8. Go to Notifications and create a new notification.

     

    8-1. After finish set up trigger tab, move to Subscriptions tab. Drag&drop the WebService delivery endpoint which is "Textoutput" from the right pane to Subscriptions window.

     

    8-2. Double click on the value to select an attribute you want to choose for each parameters.

      to15.pngto16.png

     

     

    9. Start your notification and check your "c:\WebServiceOutput" folder.

    to17.png

     

    to18.png

     

    Written by: Kevin Won

    Worked with: WebService coding is created by HanYong Lee.