views:

486

answers:

1

So here is the scenario:

I have a MOSS 2007 box and I want my clients to be able to access a SharePoint site via the internet. I am told that I will be using an IPA and AD for authentication. However I have a DB outside of SharePoint that holds various business data and I want to use Web Services to access the data, manipulate it, and send it back to SharePoint via web parts.

The issue is that, from what I understand, I am going to have to authenticate the AD user every time a request to the Web Service happens. Obviously I dont want to do this every time because they have already authenticated to get onto the site, however I do want each call to have some form of security so its not open calls to my db. I do plan on having other applications access this service outside of SharePoint, so I dont want to have to reinstall the service for each application or even again.

Has anyone had to perform this task or something similar or do you have any suggestions on how to do this?

Thank you in advance and happy coding!

+1  A: 

Why not just deploy the webservice to Sharepoint using a Sharepoint solution and a Feature. That way it will be running under the sharepoint app pool and all authentication is done by sp.

Edit:

Seeing that SharePoint should not be in "control" (as stated in the comment), you should create the webservice, and run the application it's under in as using Windows Authentication. IMHO you should create a WCF Service. The, using the information found in this article you make the Service authenticate users against the AD usergroups they are in. see the "Security: Authentication" section of the article.

Then in Visual Studio you create a webpart and add a service reference to the project, pointing to your newly created Service. Have the webpart perform the needed logic (i.e. display data etc.) Deploy the webpart to SharePoint using a SharePoint solution (.wsp files, created with WSPBuilder). Google for SharePoint + wspbuilder + tutorials. The solution should contain 1 feature to deploy the webpart. WSPBuilder integrates with VS and allows for the creation of WSPBuilde project. add a webpart feature item to the project (it will create the xml (deployment related) and code file for the webpart.

Colin
Hi Colin, thanks for the prompt response. I should have mentioned that I am a brand new to SharePoint. Literally started last week by being thrown into the fire :) Can you expand on your solution a little? How do I deploy the web service to SharePoint and what do you mean by use a Feature? - again sorry for the noobie question :)
Steve Hayes
Also, just got confirmation, I dont want SharePoint to be in charge of security of the web service. I want to keep that outside the control of sharepoint.
Steve Hayes
Awesome, thank you again for your response. What happens when I want a application outside of SharePoint to access the same web service. Lets say I have a mobile app or something like that and I do not want to install the service again for each application I need to access it?
Steve Hayes
That's what web services are for, re-use :-D. As long as you can authenticate your users (i.e. through domain account) you can use it for as many apps as you want.
Colin
If this answers your question, pls mark it as answered. P.S. if you need an example project i could just send you one / upload it somewhere.
Colin