.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

WCF web service hosted in Sharepoint 2010 is called TWICE for a single client call. WHY??

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :SharePoint
 

We have WCF SOAP web service hosted in Sharepoint 2010 using service factory method and observe behavior which we cannot explain.

When authenticated web client invokes our service method “Generate” (synchronously) it is first get called with Anonymous credentials (SPContext.Current.Web.CurrentUser == null). Anonymous users don’t have enough permissions, so the first attempt of the service method to access a folder (SPContext.Current.Web. GetFolder("Shared Documents")) throws ThreadAbortException. But control does not return to the client. Instead the service method gets called AGAIN, now with correctly set SPContext.Current.Web.CurrentUser. Nowit works successfully to the end and result returns to the client.

 

The question which puzzles us a lot is WHY the service is called first time with Anonymous creds? We’d rather avoid this first invocation if possible.


View Complete Post


More Related Resource Links

WCF web service hosted in Sharepoint 2010 is called TWICE for a single client call. WHY??

  

We have WCF SOAP web service hosted in Sharepoint 2010 using service factory method and observe behavior which we cannot explain.

When authenticated web client invokes our service method “Generate” (synchronously) it is first get called with Anonymous credentials (SPContext.Current.Web.CurrentUser == null). Anonymous users don’t have enough permissions, so the first attempt of the service method to access a folder (SPContext.Current.Web. GetFolder("Shared Documents")) throws ThreadAbortException. But control does not return to the client. Instead the service method gets called AGAIN, now with correctly set SPContext.Current.Web.CurrentUser. Nowit works successfully to the end and result returns to the client.

 

The question which puzzles us a lot is WHY the service is called first time with Anonymous creds? We’d rather avoid this first invocation if possible.

WCF Service hosted inside SharePoint 2010's ISAPI folder and MaxReceivedMessageSize

  

I got a WCF service hosted inside the SharePoint 2010 following this article http://answers.oreilly.com/topic/1404-how-to-customize-wcf-services-in-sharepoint-2010/

Everything was going great until I wanted to increase the MaxReceivedMessageSize however there is no configuration file for this service.

I tried to add a configuration file to be deployed along with the svc service in the same directory inside the ISAPI mapped folder but I get this error:

The service '/_vti_bin/epcc/messagesarchive/contactssearcher.svc' cannot be activated due to an exception during compilation.  The exception message is: Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are []..

Here is my configuration,

<configuration>
 <system.serviceModel>
  <services>
   <service name="WCFServices.ContactsSearcher.ContactsSearcher" behaviorConfiguration="ContactsSearcherBehavior">
    <endpoint address="ContactsSearcher"
         binding="basicHttpBinding"
         bindingConfiguration="ContactsSearcherBinding"
         contract="WCFServices.ContactsSearcher.IContactsSearcher"></endpoint>
    <endpoint address="mex"
         binding="mexHttpBindin

How to call Sharepoint web service from client app?

  

I would like to create a public web application, which reads Sharepoint data, which is in an internal network. Is this possible?

I was told that i could call a web service of Sharepoint through an authentication and just serves data vice versa.... Does anyone know how to do that?


Usage of Client Access Policy and crossdomain xml for sharepoint 2010>?

  

Hi Folks,

1.What is Clientaccesspolicy.xml in sharepoint ?

2.What is Crossdomain.xml ?

What is usage of wcf service deploy in sharepoint 2010?

Kindly give me some valuable comments ?

 

Thank you

Regards

Immanuel c

 


Client Object Model Resource Center | SharePoint 2010

  
Are you creating client applications that access SharePoint data remotely? Find overviews, guidelines, and programming tasks for all three flavors of the SharePoint Foundation client object model: .NET managed, Silverlight, and ECMAScript.

Quick Note: Building WPF Applications by Using the SharePoint 2010 Client Object Model

  
Learn how to create a Windows Presentation Foundation (WPF) application that uses the SharePoint 2010 client object model to retrieve data from a SharePoint Web site.

Using the SharePoint Foundation 2010 Managed Client Object Model with the Open XML SDK 2.0

  
Write client-side applications that work with Open XML documents that are stored in document libraries by using these two technologies together.

Using the SharePoint Foundation 2010 Managed Client Object Model

  
Write applications that are based on the .NET Framework and access SharePoint content from clients without installing code on the server that runs SharePoint Foundation 2010.

Video: Office Client Workflow: Visual Studio 2010 SharePoint Workflow

  
Learn how project templates for SharePoint 2010 in Visual Studio 2010 allow developers to build sequential and state machine workflows for SharePoint and import reusable workflows created in SharePoint Designer. (Length: 10:36)

Video: Overview of the SharePoint 2010 Client Object Model

  
In SharePoint 2010 there are a number of object models that can be used by developers to access the server. For example, the Client Object Model (Client OM) can be accessed via Web services, via a client (JavaScript) API, and via REST. (Length: 12:22)

Video: SharePoint 2010: Silverlight Client Object Model

  
In this video you will learn how to use the SharePoint client object model to program a Silverlight application against SharePoint data. (Length: 9:03)

Video: SharePoint 2010: ECMAScript Client Object Model

  
In this video you will learn how to use the SharePoint client object model to program a ECMAScript application against SharePoint data. (Length: 8:20)

Video: SharePoint 2010: Creating Custom Service Applications

  
Do you need more than the services provided by SharePoint? In this advanced session targeted at high-end developers, you will learn how to create a custom SharePoint service. (Length: 36:31)

Module 5: Accessing SharePoint 2010 Data with Client-Side APIs

  
SharePoint 2010 provides a new client object model that enables you to create SharePoint solutions that run remotely from the SharePoint server farm.

Video: Developing .NET Applications by Using the SharePoint 2010 Client Object Model

  
This demonstration shows how to use the client object model from a console application. (Length: 8:47)

Video: Developing Silverlight Applications by Using the SharePoint 2010 Client Object Model

  
This demonstration shows how to use the client object model from a Silverlight application. (Length: 11:15)

Video: SharePoint 2010 Data and the Client Object Model

  
This video provides an overview of how to use the client object model from a Windows Presentation Foundation application. (Length: 5:38)
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend