Build an ASP. NET-based WCF service implementation record for iOS client calls

Source: Internet
Author: User

First, write WCF

Problem:

1. Specific formats

2. Data binding

3. Encrypt and decrypt

Second, publish to IIS

Problem:

1. Access rights issue, add everyone permission

When visiting the website: http://localhost/WebbUploadSample/ZipUpload.aspx

Server error in the "/webbuploadsample" application.

--------------------------------------------------------------------------------

Access is denied.

Description: An error occurred while accessing the resources required to service this request. You may not have permission to view the requested resource.

Error message 401.3: You do not have permission to view this directory or page with the credentials you provide (access is denied due to access control lists). Please let the administrator of the Web server grant you access rights.

Workaround: Add the Everyone permission

2. Firewall off, or add port

3. To open Directory browsing when no master item is available

4.

Server error in Application "WCF"

Internet Information Services 7.5

Workaround: IIS re-enroll. netframework4.0

%windir%\microsoft.net\framework\v4.0.30319\aspnet_regiis.exe-i

Cmd.exe Run as Administrator

Third, call the interface

Problem: no return value

Problem: Local can test interface, remote No

  Add the following configuration section content in the <system.web></system.web> center of Web. config
<webservices>
          <protocols>
             <add name= "HttpSoap"/>
             <add name= "HttpPost"/>
             <add name= "HttpGet"/>
             <add name= "Documentation"/>
          </protocols>
</webservices>

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.