Sharepoint-custom webservice(_vti_bin folder)
Hi,
I've developed custom web service(using Visual Studio) and have deployed it by creating a wesite in IIS using this web service. Today my client told that the webservices in Sharepoint have to be deployed in _vti_bin folder. I got the procedure from internet for deploying it in _vti_bin folder. Not only its a tedious method ,but I don't understand whats the advantage of deploying it in _vti_bin folder.
I know the Sharepoint out of box web services are present in _vti_bin folder.
Please tell me whats the pros and cons of deploying web service in _vti_bin folder. Does it provide any special benefits while working with Sharepoint.
I need to explain it to the client as early as possible.
Thanking you in anticipation
NIthesh Erakkara
Answers
There are no pros and cons. You can deploy the web service anywhere. It's a matter of personal choice. Usually why people prefer to deploy it in vti folder is the same reason that you have mentioned. Because SharePoint web services are there, for the sake of consistency, people deploy their custom services in the same folder. If you configure spdisco.aspx file correctly, server will locate your web service itself when searched no matter where you installed it.
http://sharepointblogs.com/ssa
There is a long article in the SDK regarding adding web services to your SharePoint installation. I hate to do a shameless plug here but I threw together a little helper assembly to perform some of the low level file manipulation for you. So if you're going to be provisioning the web service you can use that project as a starting point. It's totally open source so feel free to use as you like:
http://www.codeplex.com/SPWebServiceDeploy
Hope that helps!
All Replies
There are no pros and cons. You can deploy the web service anywhere. It's a matter of personal choice. Usually why people prefer to deploy it in vti folder is the same reason that you have mentioned. Because SharePoint web services are there, for the sake of consistency, people deploy their custom services in the same folder. If you configure spdisco.aspx file correctly, server will locate your web service itself when searched no matter where you installed it.
http://sharepointblogs.com/ssa
- Thank you ahmed.................i'll pass on the information to my client..........let see what he says........
- Moving to the Programming forum.Please post web services questions there and not to the general forum.
There is a long article in the SDK regarding adding web services to your SharePoint installation. I hate to do a shameless plug here but I threw together a little helper assembly to perform some of the low level file manipulation for you. So if you're going to be provisioning the web service you can use that project as a starting point. It's totally open source so feel free to use as you like:
http://www.codeplex.com/SPWebServiceDeploy
Hope that helps!
Thank you rouge............i felt i just found what i was lookin for.....i just walked through the source code and i feel that the helper assembly is really great...........but can u provide some steps to use that assembly........i passed the HelloWorldWebService you created inSPWebServiceDeployment as the feature name to SPWebserviceDeployer class..........but it gave me a exception Array Index Out Of Range in installServicesToLayout() method...........if you can provide detailed steps regardin how to use it it would be a great help............
Thanking you again rouge............good work man
SSAhmed wrote: There are no pros and cons. You can deploy the web service anywhere. It's a matter of personal choice. Usually why people prefer to deploy it in vti folder is the same reason that you have mentioned. Because SharePoint web services are there, for the sake of consistency, people deploy their custom services in the same folder. If you configure spdisco.aspx file correctly, server will locate your web service itself when searched no matter where you installed it.
http://sharepointblogs.com/ssa
Actually, the advantage of deploying the web service in _vti_bin (or _layouts for that matter) is that the web service operates within the context of the SPWeb, i.e., SPContext.Current.Web.
If you want to avoid jumping through SharePoint's hoops just to deploy a web service in _vti_bin, you might try deploying it in _layouts.
.


