views:

1364

answers:

4

According to MSDN, for deploying custom web service, we need to create *wsdl.aspx and *disco.aspx files, and put them with .asmx together under _vti_bin folder (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\isapi). And put the dll under bin folder of the root of sharepoint virtual directory. It works correctly for me.

However, i also found that if i put .asmx file under the root virtual directory without creating those *wsdl.aspx and *disco.aspx files. It can work as well and much easier than the above way. So i'm wondering what's the potential issues in this way?

+1  A: 

I have created several web services in SharePoint 2007 that were simply deployed as http://.../_layouts/mySubFolder/service.asmx. It works! For SharePoint it does not matter whether the presentation layer is HTML or XML for a web service (in both cases security must be applied, can be addressed both as http://server/_layouts/mySubFolder/service.asmx and http://server/sites/subsite/_layouts/mySubFolder/service.asmx

Things that are wrong thing about it

  • the word "layouts" implies "something to do with how it looks like".. which is not the case when we speak about web services
  • when migrating to SPS2010 where WCF services come into play, it will be different. However, I have not yet played with SPS2010 and do not yet know, how different. (Somehting about it here - http://blog.mastykarz.nl/wcf-sharepoint-context/)
naivists
Thanks, the section "Once again it’s all about context" in your link answers my question.
leif
+1  A: 

Without the WSDL and DISCO files, folks' web service clients/consumers may have a hard time "discovering" your service's contract. If that's not a concern for you, don't worry about it.

Greg Hurlman
You can stll get the WSDL from the ASMX
Muhimbi
You can only get it if you try accessing it from the same host. From a client you will not be able to get the WSDL via the ASMX.
Hinek
A: 

naivists: How can I contact you? mi problem is that I created a sharepoint web service but I receive the 401 Unauthorized, the only way to consume this web service is when I use a Site Collect account.

My problem is that I want to develop my web service in _layouts and I dont receive the 401 Unauthorized error, but the web service doesnt do anything.

I would be pleased if you help me telling me the steps that you follow in your deplyment.

this is a question not an answer
Hinek
A: 

Hi can anyone help me..

I have successfully deployed custom web services at web application bin level with a CAS policy file in SharePoint 2007.

But now the problem is, I have upgraded the same solution and deployed that in SharePoint 2010. Everything works fine when the trust level in the web.config filw is set to "Full".

My CAS policy is not working in SharePoint 2010. I have changed all the references to 14.0 version and did necessary changes.

Can some one help me resolving my issue..

Thanks Carol

carol
this is a question not an answer
Hinek