Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How do I create a web service with Framework 4.0?

How do I create a web service with Framework 4.0?

Scheduled Pinned Locked Moved C#
questioncsharpdotnetwcfdesign
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JChrisCompton
    wrote on last edited by
    #1

    I have my web site ready for my UI person to pretty it up. All I have left to do is write the web service for it so other web sites can use it. I didn't think it would be this puzzling since I had seen that option before as a project template and I understand (at a high level at least) what SOAP is. I've already coded using the web site with Entity Framework (which requires the .NET Framework 4.0) and the only web service examples I have been able to dig up say 'pick Framework 3.5' in the instructions. As many articles as I've looked at I must be missing something. There has to be a way to do this without rewriting my search in Framework 3.5, right? All I want to do is either return 0 or more records which have four strings (each) based on search criteria, or return a detail record if an id is passed. So, it looks like EF4 is my brick wall. Any hints how to go through/around it? TIA, -Chris C.

    R 1 Reply Last reply
    0
    • J JChrisCompton

      I have my web site ready for my UI person to pretty it up. All I have left to do is write the web service for it so other web sites can use it. I didn't think it would be this puzzling since I had seen that option before as a project template and I understand (at a high level at least) what SOAP is. I've already coded using the web site with Entity Framework (which requires the .NET Framework 4.0) and the only web service examples I have been able to dig up say 'pick Framework 3.5' in the instructions. As many articles as I've looked at I must be missing something. There has to be a way to do this without rewriting my search in Framework 3.5, right? All I want to do is either return 0 or more records which have four strings (each) based on search criteria, or return a detail record if an id is passed. So, it looks like EF4 is my brick wall. Any hints how to go through/around it? TIA, -Chris C.

      R Offline
      R Offline
      Ravi Sant
      wrote on last edited by
      #2

      To create webservice in .Net 4.0, you need to create an asp.net web application project and then add a "web service" new item. With WCF in hand, do you really want to do that? WCF can do much more than web service and faster.

      // ♫ 99 little bugs in the code, // 99 bugs in the code // We fix a bug, compile it again // 101 little bugs in the code ♫

      Tell your manager, while you code: "good, cheap or fast: pick two. "

      J 1 Reply Last reply
      0
      • R Ravi Sant

        To create webservice in .Net 4.0, you need to create an asp.net web application project and then add a "web service" new item. With WCF in hand, do you really want to do that? WCF can do much more than web service and faster.

        // ♫ 99 little bugs in the code, // 99 bugs in the code // We fix a bug, compile it again // 101 little bugs in the code ♫

        Tell your manager, while you code: "good, cheap or fast: pick two. "

        J Offline
        J Offline
        JChrisCompton
        wrote on last edited by
        #3

        I'll start with that thanks! > With WCF in hand, do you really want to do that? And... I can take a hint, so I've done some quick reading about how WCF is a 'service framework' and why that's superior to a web service (don't need a web server). But one (possibly stupid) question: Can it act as a Web Service? (I know it can run on a web server but that might not be the same thing) This is only a critical question because the specification (written by a contractor that is no longer here) calls for a web service. TIA, -Chris C.

        P L 2 Replies Last reply
        0
        • J JChrisCompton

          I'll start with that thanks! > With WCF in hand, do you really want to do that? And... I can take a hint, so I've done some quick reading about how WCF is a 'service framework' and why that's superior to a web service (don't need a web server). But one (possibly stupid) question: Can it act as a Web Service? (I know it can run on a web server but that might not be the same thing) This is only a critical question because the specification (written by a contractor that is no longer here) calls for a web service. TIA, -Chris C.

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          jccompton43 wrote:

          Can it act as a Web Service? (

          Yes. WCF is largely transport agnostic. The same code can serve up different transport types, merely by changing configuration, so you could have the same code simultaneously serving up via named pipes, TCP and HTTP without changing a single line of code.

          *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

          "Mind bleach! Send me mind bleach!" - Nagy Vilmos

          CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

          1 Reply Last reply
          0
          • J JChrisCompton

            I'll start with that thanks! > With WCF in hand, do you really want to do that? And... I can take a hint, so I've done some quick reading about how WCF is a 'service framework' and why that's superior to a web service (don't need a web server). But one (possibly stupid) question: Can it act as a Web Service? (I know it can run on a web server but that might not be the same thing) This is only a critical question because the specification (written by a contractor that is no longer here) calls for a web service. TIA, -Chris C.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            See exactly what you want, if you have applications in other operating system using this service, better go ahead with webservice, otherwise, go with WCF, as in terms of performance, the webservice can't beat. You also have lot of flexibility in WCF :|

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups