SharePoint uses BCS to develop your first application (4)
Source: Internet
Author: User
SharePoint uses BCS to develop your first application (4) many times, you want to integrate Web Services in IIS (Internet Information Services) with the external list. Here we will teach you how to create an ASP. NET web service, deploy it to IIS, and then create an external content type in SharePoint designer. 1. Open vs -- file -- New -- website, select. NET Framework 3.5, and then select ASP. NET web service. 2. The default file system provides the location for the web service and click OK. The default name is service. asmx. 3. navigate to the app_code folder and right-click Service. cs -- view code. 4. modify the code. It creates a mers MERs list set and adds three records. When the application calls the getmers MERs method, the data source with three records is returned. When the getacustomer method is called, a record is returned based on the input string parameter. The Code is as follows: 5. Click F5 to enable debugging.
You can click any web method (getcustomers or getacustomer ). If you click getcustomers, the page is as follows:
6. If debugging is successful, stop debugging. Right-click Project> Publish website. Select a file system and navigate to the folder where you want to deploy Web Services. Accept the default value and click OK.
7. Now you need to map the published Project to IIS. Click Start> Administrative Tools> IIS. Right-click the website and add the new website getmermerws. Make sure that the virtual path points to the address where you publish the service. A non-80 port is required, for example, 1141. You can provide a host name. Click Connect as -- specify a user and set to add your password as a service user.
Click OK. Click test settings to test your password and service calls.
8. Make sure Windows authentication is enabled. Click authentication to enable Windows authentication.
9. Test the service in IIS. Click Browse to find the corresponding service. asmx file.
10. Open SharePoint designer-external content type. Create one. 11. Name customerws. The display name is "customer ws" and "Contact". Click "discover data source"-"WCF Service. 12. Enter URL -- http: // Smallville-PC: 1141/service. asmx? WSDL to service metadata URL; and service node URL (no? WSDL ).
13. Click OK. 14. Right-click the getacustomer method and choose create read item operation. Click Next.
15. Select customerid and map it to the identifier. Click Next. Map Data and click Finish.
16. You must configure the new read list operation. Right-click the getmers MERs method to create a read list operation. Click Next twice. Click customerid ing as the identifier. Click Finish.
17. Click Save. This saves the external content type to the BDC metadata repository. Now you can create an external list.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.