(Original) Error reported when Web Service is called in SharePoint webpart

Source: Internet
Author: User
Error reported when Web Service is called in SharePoint webpart An error is reported when Web Service is called in SharePoint webpart. Error message: In servicemodel
In the client configuration section, the default endpoint element of the reference protocol "pmadmwebservice. pmadmwebservicesoap" cannot be found. This may be because the application configuration file is not found, or because the client element cannot find the endpoint element that matches this agreement.

This is because no service mode configuration is added to the web. config of the website that calls the web service. Add the related configuration and restart the SharePoint site.

When you add a WebService reference to a webpart project, the following configuration information is generated in the configuration file of your Web part. Copy the entire servicemode configuration section.

The configuration information is as follows:

<System. servicemodel>
<Bindings>
<Basichttpbinding>
<Binding name = "basicdatawebservicesoap" closetimeout = "00:01:00"
Opentimeout = "00:01:00" receivetimeout = "00:10:00" sendtimeout = "00:01:00"
Allowcookies = "false" bypassproxyonlocal = "false" hostnamecomparisonmode = "strongwildcard"
Maxbuffersize = "65536" maxbufferpoolsize = "524288" maxcompute edmessagesize = "65536"
Messageencoding = "text" textencoding = "UTF-8" transfermode = "buffered"
Usedefaultwebproxy = "true">
<Readerquotas maxdepth = "32" maxstringcontentlength = "8192" maxarraylength = "16384"
Maxbytesperread = "4096" maxnametablecharcount = "16384"/>
<Security mode = "NONE">
<Transport clientcredentialtype = "NONE" proxycredentialtype = "NONE"
Realm = ""/>
<Message clientcredentialtype = "username" algorithmsuite = "default"/>
</Security>
</Binding>
<Binding name = "pmadmwebservicesoap" closetimeout = "00:01:00" opentimeout = "00:01:00"
Receivetimeout = "00:10:00" sendtimeout = "00:01:00" allowcookies = "false"
Bypassproxyonlocal = "false" hostnamecomparisonmode = "strongwildcard"
Maxbuffersize = "65536" maxbufferpoolsize = "524288" maxcompute edmessagesize = "65536"
Messageencoding = "text" textencoding = "UTF-8" transfermode = "buffered"
Usedefaultwebproxy = "true">
<Readerquotas maxdepth = "32" maxstringcontentlength = "8192" maxarraylength = "16384"
Maxbytesperread = "4096" maxnametablecharcount = "16384"/>
<Security mode = "NONE">
<Transport clientcredentialtype = "NONE" proxycredentialtype = "NONE"
Realm = ""/>
<Message clientcredentialtype = "username" algorithmsuite = "default"/>
</Security>
</Binding>
</Basichttpbinding>
</Bindings>
<Client>
<Endpoint address = "http: // localhost/basicwebservice. asmx"
Binding = "basichttpbinding" bindingconfiguration = "basicdatawebservicesoap"
Contract = "basicdatawebservice. basicdatawebservicesoap" name = "basicdatawebservicesoap"/>
<Endpoint address = "http: // localhost: 8090/pmadmwebservice. asmx"
Binding = "basichttpbinding" bindingconfiguration = "pmadmwebservicesoap"
Contract = "pmadmwebservice. pmadmwebservicesoap" name = "pmadmwebservicesoap"/>
</Client>
</System. servicemodel>

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.