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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Create Multiple datafields in a Web Service

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :SharePoint
I have been working on this for awhile.  What I am trying to do is to retrieve the telephonenumber, mail and physicalDeliveryOfficeName from active directory  I have debugged it and it seems to work but when I connect to the data source in Infopath, there is no value.  Also, the data source has a group field called "choice."  I have no idea what that is.  I am using a contact select to fill out and the value of the AccountId will populate another field.  I use this field to choose the LoginName on the query and then run the query on the data source.  This should pupulate the email, phone, and location fields on the main data source.  Here is a sample of my code: Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.ComponentModel Imports System.Net Imports Microsoft.sharepoint Imports Microsoft.SharePoint.WebControls Imports System.DirectoryServices Imports System.Data ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. ' <System.Web.Script.Services.ScriptService()> _ <System.Web.Services.WebService(Namespace:="http://microsoft.com/webservices/")> _ <System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ <ToolboxItem(False)> _ Public Class GetADProperty     Inherits System

View Complete Post

More Related Resource Links

Multiple services in REST Collection WCF Service?


After I create a "REST Collection WCF Service" project, it contains one service "service.svc". Can I add multiple services to this project? There must be a way to do so. Otherwise, it does not make sense to create one project for each service.


My question is how to add a new service to an existing "REST Collection WCF Service" project?


Thanks a lot.

How do you create a custom BDC data field that allows for multiple selected values?

I need help creating a custom data field using the BDC column as a base.  We need to allow for multiple selected values instead of just a single one.  I can't find anything on the net which shows how to do this.

WCF Needs? How to Communicate Multiple Contract via Single Service?

why it needs.   i have many business objects how could i serve to my web application via single service.   i have nearly 500 different business objects. how could contract implement into client web applicatoin.    

How to create an activity that allows multiple exit paths similar to FlowSwitch and FlowDecision

There have been several threads around this type of request but none have provided a definitive outcome for my requirements:I am looking to emulate the FlowSwitch or FlowDecision in a custom activity so as to simplify end user workflow authoring in a rehosted environment.Currenty I am limited to linking my custom activity to a FlowSwitch or FlowDecision to allow for simple logic to be visually composed. This creates additional complexity that I am trying to avoid.I understand that these are sealed types and even the abstract FlowNode base class of these types does not have any overridable types by design as WF 4.0 favours composition over inheritance.What options do I have to accomplish my objective?If activity composition is the response to my question then could I kindly request that some samples or links to samples are provided?

How to create SharePoint workflow[Visual studio] with Infopath multiple views?

Hi Every body,I have Travel Request infopath form with 3 views(Requester/Manager/Traveldesk).Ones the user submitt the data then workflow will be start. In manager view he will select next level approver also. Ones manager approve/reject then pass to Traveldesk and they will forward travel inforamtion to user.I am new to workflow so How to approach my requirment any ideas and examples.Thanks in advance  

How to create simple web service in VS2010, NOT WCF service

How to create simple web service in VS2010 Professional (trial version). There is no template to do this.  I am not trying to create WCF service here.

How to create single wsp for multiple projects sharepoint 2010 solution

We have multiple projects (4 projects) in single sharepoint 2010 solution. We want to create single wsp deployment for this. But when I right click on any project, it creates package means wsp on its own. How to create single wsp for multiple projects sharepoint 2010 solution? Is wsp builder which we are using for sharepoint 2007 project (works really great) also works in sharepoint 2010?

Get the error 'The Workstation service has not been started' when trying to create a new content d

I am running SharePoint on a standalone machine, and the workstation service is up and running. Restarting the service makes no difference. Rebooting the machine hasn't helped either. No errors are being written to the event log.

What are my options when I need to create a report with data from multiple sources?

Hello all,  What are my options when I want to create a report that will get records from multiple data sources based on data from a parameter? The user will enter the customer ID, I have to check that ID against 5 different data sources. Have you guys done anything similar? Should I leverage SSIS on this request, adding an extra layer of complexity? Should I do this all from SSRS? What are my options?

Exposing WCF Service for multiple clients with the feature of multiple database support

i have ceated a WCF service and hosted it properly. now i want to Exposing this Service for multiple clients with the feature of multiple database support.In this functionality how could i do the proper multiple database management. what i am doing now:1. i am taking database string from the client.2. Then setting the refference of above provided database to the all functions call.ISSUE: if the mulitple clients calling the service at the same time and both are giving different database string then the database string provided by the clients is overlapping.....

How to create WEB SERVICE

HI ALL, I have to create web service from which i do want to call SSIS package ,Kindly suggest.   Amit 

Cannot create email alerts for multiple users

Hello, I created an email alert for a document in a library. In the "Send Alerts To" box, I added multiple user names separated by semicolons and saved the alert. However, when I open the alert again, only my user name appears and the additional user names are gone. Why is this happening and how do I fix this problem?  Thank you in advance.

Create a new process in web service using delegated impersonation context

Hi, I've written an ASP.NET 2.0 web service which is consumed by a web application which goes out and gets configuration data back from newly built win2k3 servers in a large enterprise. I am using kerberos delegation and impersonation to pass through the users domain admin rights to interrogate the server which has just been built. The web pool identity (IIS 6.0) runs under a low priviledge service account. I have all the delegation part working ok. The problem I am having is that I want to programmatically kick off a process which executes a cmd line executable and redirects the output, all under the context of the user who's being impersonated. I understand that the process will be external to the impersonated thread, so will end up running under the worker process identity, which is why I'm getting an "access is denied" message. I've been reading about the CreateProcessAsUser and createprocesswithlogonw API functions but all I've seen is examples where people specifically state the username and password in their code. This is not something I can do as the environment is very secure, so what I need to do is seamlessly get the identity of the impersonated user, and some how feed that into a function which will create the process under the correct domain admins identity and feed back out the StdOuput. Is this something that can be achieved, and if so, how? Man

create multiple columsn based on a passed in variable

Hi, I am clueless as to how the following would be done. Would appreciate imputs: i would be passed in a StartDate and EndDate along with a Period(Week,Month,Quarter,Year).  this would be an INT which is calculated in the following way -- Suppose he selects StartDate = 2010-01-01, EndDate = 2010-02-28, and Period = Weeks ---> Which would mean my resultset would have a additional 9 columns (9 weeks using DateDiff(Week,@startdate,@enddate) The number of fixed columns always will be 4 Total # of records that would always come back is > 10 something like this CategoryTypeId(int),ParentCategory(uniqueidentifier),Id(uniqueidentifier),Name nvarchar(50),Wk1,Wk2.....Wk9 1,xxxx,xxxx,'Shopping',650,300,1275....1000   (i dont't need to total the wk,month,qurter or yearly.This would be taken care on the front end) Thanks!

how to create a doc library item using web service

Hi, I think this is a common question, but I coulnd't come up with anything at this point. I'd like to create an item in a document library using SP web service. - no uploading a file. I have created an item using ../copy.asmx web service. Using the WS function(copyWebService.CopyIntoItems function), it seems suitable to create an item AND at the same time to upload a file. I don't think I can just create an item with this function. How do i just create an item? any reply is appreciated.  

Incorrect hostname in EndPoint location in WSDL for a service with multiple bindings and with multip

We have a WCF web service that is exposed through multiple bindings.  The site is  accessed through multiple IP Addresses/Hostnames (internet/intranet).  Some of the bindings use http transport while others use https transport. The web application is configured to use .NET 4.0 with multipleSiteBindingsEnabled="true" so that we shouldn't have problems with multiple ip addresses/hostnames. What we see is that when the WSDL is accessed using a http based URL (external), the hostnames in the endpoint addresses for http transport based bindings in WSDL are correct (ie, they use the hostname header from the request) while the hostnames in the endpoint addresses for https transport based bindings in the WSDL are incorrect (ie, they do not use the hostname header in the request - they seem to use the hostname from the first available binding in IIS for that scheme and end up with the local machine names/ip addresses in the URL).   We could work around by setting the external hostname/ip in the first binding in IIS for the respective scheme, but then WSDLs accessed from intranet clients would have wrong URLS now. This happens the other way around as well, ie, when the WSDL is accessed using https, the https based addresses are fine, but http addresses in the WSDL are not correct. It looks like hostname header is used only for WSDL endpoint addre

How to use single windows service to host multiple WCF Services instances (Each instance of WCF is i

How to use single windows service to host multiple WCF Services. I have a mutiple instance of same WCF service in different folder, each instance has unique service name and port. WCFService has reference to Reg-Free COM Reference, i have Native.WCFService.manifest in each folder. Ex: WCFService1 is in "C:\WCFService01\WCFService.dll, Native.OCWCFService.manifest, OCWCFService.dll.config WCFService2 is in "C:\WCFService02\WCFService.dll, Native.OCWCFService.manifest, OCWCFService.dll.config Now i need host above services from single Windows Service. I am trying to create AppDomain for each above WCFService Instance from Windows Service and then host. Its working if i register COM dll in the server using regsvr32, but when i un register COM dll, i am getting unable to load COM component .... This looks like AppDomain is not loading COM DLL and Manifest files. Its looks strange but we need it in this way because we have production and test environment in the same server. Everything works fine if create a seperate Windows Service for each WCFService Instance, but my manager wants single Windows Service :). Any help whould be really appreciated.  ravi kumar reddy
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