"Add Web Reference" -vs- "Add Service Reference"

I've noticed that in VS 2008 I can add a reference to a web service through "Add Service Reference..." or "Add Web Reference". 

It appears that either of these approaches works but there are some differences in the naming of the client-side proxy that's generated..

Does "Add Service Reference" take advantage of the 3.5 framework?  Does this approach gain any efficiencies if I'm still adding the reference for an asmx web service rather than a WCF service?  Or does "Add Service Reference" for an asmx web service just provide some kind of semi-consistent implementation with WCF services but without any real advantages (performance or otherwise)???

0
dotnetterAMG123
4/28/2009 12:17:20 AM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

3 Replies
732 Views

Similar Articles

[PageSpeed] 5

Add Service Refrence more useful in case of WCF Services. You can use the same in case of Web Services. Service Reference generates proxy in more detail that web ref.. If describes InputType, OutPut type, and facilitates to execute methods asynchronously.

In case of performance there is no difference. Service Reference gives more options than web reference in proxy.

 

thank you,

-nm reddy


***Hope this helps you***
thank you,
-nm reddy
0
nmreddy83
4/28/2009 3:33:54 AM

"Add Service Reference" creates a WCF proxy class, and can take advantage of WCF features. "Add Web Reference" creates an old-style ASMX proxy class, which can only use a tiny subset of the features used by web services, and in particular, by WCF.

You should use "Add Service Reference" if at all possible.


John Saunders | MVP – Connected System Developer
0
johnwsaunders3
5/3/2009 1:37:19 AM

johnwsaunders3:
"Add Service Reference" creates a WCF proxy class, and can take advantage of WCF features.

Will you please give me a few examples of some of the WCF features that asmx web services can take advantage of if it's added as a Service Reference?

0
dotnetterAMG123
5/4/2009 5:59:04 PM
Reply:

Similar Artilces:

Can "Add Web Reference" if web service deployed to new web site, Can't add ref if deployed to Virt Server under Default web site (Sharepoint)
I have created a web service wich I can deploy successfully to a new IIS Web, but of course I have to set the port to something other than 80 (and I'd rather just use a virtual server under the Default web). If I try to deploy my web service under the Default Web as a new virtual server, and then try to "Add a web Reference" to the service, it fails with a 404: not found error. Notes: WServer 2003 My IIS server is running Sharepoint Portal Server (SPPS)sp2.  VS2005 Any ideas? /Bob C in GRR In Sharepoint Portal Admin I had to add a Path Exclusion.  Took me a whi...

Please compare "web service" and "remote services"
Somebody, please tell me the different beetween "web services" and "remote services". So, "web services" and "remote services" which one is better? Please tell me This might provide some insight. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/dotnetremotearch.asp The really question at hand is what kind of project? Frank ...

adding web reference, remote web service. "unable to download service.asmx?wsdl"
Hello having a problem with this web service. VS [2005]  The message we get when we try and add the web reference is "unable download following files http://10.0.1.7/codered/service.asmx?wsdl". Which is using the internal ip address of the web server. We have check the IIS where the web service has been published to. But could not see why it is using the internal ip and not the external ip address. The actual url is http://83.100.199.125/codered/service.asmx Here is the service description sample, maybe someone can check this, as this has the internal ip address at the bottom. ...

"Dynamic" Web Services, "Dynamic" Parameters
This is a follow-up discussion from http://forums.asp.net/t/1332722.aspx?PageIndex=2. I noticed we stopped talking about Peter's problem some time ago. The discussion had become one of passing "XML strings" to a web service in order to permit optional parameters, a dynamic web service, and things like that. My contention is that this is a solution without a requirement. It is something that we can do, which does not imply that anyone needs us to do it. First of all, if you need to send XML, then send XML. Do not send a string that happens to have XML embedded in it. ASM...

"Add Service Reference" in dropdown
Hi, I have installed, .net 3.0 vs2005 extensions as well as the sdk and still don't have the "add service reference" as an option in the IDE. What do I need to do to have it show up? Thanks,Olja ...

"reference to" and "procedure of"
Hi, What is the difference between these two definitions: TThreadMethod = procedure of object; TThreadProcedure = reference to procedure; Please can you try to explain simply :) Thank you, BP. "Mehmet Fide" <off@b.net> wrote in message news:426398@forums.embarcadero.com... > > What is the difference between these two definitions: > > TThreadMethod = procedure of object; Defines a procedure or function signature that must be a member of a class, do for example: type TMyClass = class private MyMethod: ThreadMetho...

Programatically accessing "Add Service Reference"
 I need to add service(WCF) reference programatically in the code. ie whenever I recieve a new version of the service, I should not add the service reference manually. It should happen automatically in my application. Please guide. Well, many references are backward compatible  Many thanks for your inputs. I would also like to know how can I add a service reference(WCF) programmatically using C#. Also how to delete the added service reference through code.   Thanks...

Cann't add the reference ' System.Web.UI' from ".NET"
Cann't add the reference ' System.Web.UI' from ".NET",and i can n't find the file "System.web.UI.dll" from the "C:\WINDOWS\Microsoft.NET\Framework",so anyone can help me solve it thanks there is a no-footbird.the wind is its nest.it never stops flying until it dies... System.Web.UI is namespace, not an assembly. Add "System.Web.dll" and that will include System.Web.UI.Cheers,       Kevin JonesMy Blog Is your project a web project? To me, it looks like missing system.web.dll in your reference I think you need to reference system.web in the References...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

"Add Web Reference" is missing in VS2008 SP1
Hi,  I just created a class library meant to access a web service, and I can't seem to be able to create an old fashioned web reference anymore. I do see the option for createing a "service reference" in WCF, but that doesn't seem to work the same way. The old web reference created a proxy class from the WSDL called RateService like this:RateService rs = new RateService(); rs.Url = "https://gateway.fedex.com:443/web-services";RateRequest rq = CreateRateRequest(); RateReply rr = rs.getRates(rq); In the new console app I can see proxy classes for all of ...

"Visual Web Developer Web Server" and Web Services
I like the new "Visual Web Developer Web Server" (Do you want suggestions for a longer name!) but I have an issue with using it to host a Web Service. Whenever the Web Service is recompiled and run it ends up with a different port number. Therefore, it seems that any references to that WS in other applications are invalidated and need to be re-established when it's run again. Is there a way of pinning the port number, or am I missing something? CheersNick Grattan, MSDN Regional Director, Ireland. Software Paths Limited. Hi Nick, the internal server is used for local...

"Add" and "Add Another" LinkButtons with a PostBackURL and a Redirect
I have a page that allows a user to add a record.  It is a FormView and it has 3 LinkButtons at the bottom.  I would like the "Add" LinkButton to add the record and redirect to a list of records page.  I would like the "Add Another" LinkButton to add the record and stay on the same insert a record page so the user can add another record.  I would like the "Cancel" LinkButton to send the user back to the list of records page.I have the "Cancel" working using a PostBackURL.I have the "Add Another" working because it automati...

Are there different between ViewState.Add("key","Word"); and ViewState["key"] = "Word";
I think the 1 and 2 are complete same, is it correct? 1. ViewState.Add("key","Word"); 2. ViewState["key"] = "Word";SuperCool Multiple ZIP - A utility to unzip multiple files and work with multiple zip filesSuperCool Random Number Generator You are correct, option 2 is short hand for option 1.Philip Beadle (MVP, MCAD, MCT DotNetNuke Core Team)...

"Is" and "as" operators with class references
Hi, In Delphi 7 the "is" operator may be used as in the expression {code} if ObjectRefA is ClassRefB then {code} which means (I think) {code} if ObjectRefA.Classtype.InheritsFrom(ClassRefB) then {code} The checked typecast operator "as" may be used as in the expression {code} (ObjectRefA as ClassRefB).SomeMethodOfClassRefB {code} to mean {code} if ObjectRefA is ClassRefB then {Class compatibility check} ClassRefB(ObjectRebA)).SomeMethodOfClassRefB {Typecast} {code} By analogy I would like to be able to use the "is"...

Web resources about - "Add Web Reference" -vs- "Add Service Reference" - asp.net.xml-web-services

Resources last updated: 2/4/2016 12:53:02 PM