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. Webservice question

Webservice question

Scheduled Pinned Locked Moved C#
questiondatabasesysadminhelptutorial
8 Posts 2 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
    johland
    wrote on last edited by
    #1

    For some reason it seems that I've got difficulties to understand the logic of the web service: I need that a webpage or an application on client side will validate user's details (username, password). Validation is through db that seats on a server application. I want that the procedure will be: calling a validation method through web service that will use the server's db. I understand how to connect the client or the website to the web service but don't understand how the web service connects to the server to use his db (or to call a function on the server that will do that). Can someone help please? thanks y

    C 2 Replies Last reply
    0
    • J johland

      For some reason it seems that I've got difficulties to understand the logic of the web service: I need that a webpage or an application on client side will validate user's details (username, password). Validation is through db that seats on a server application. I want that the procedure will be: calling a validation method through web service that will use the server's db. I understand how to connect the client or the website to the web service but don't understand how the web service connects to the server to use his db (or to call a function on the server that will do that). Can someone help please? thanks y

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      IF it's a webpage, use AJAX, you can't call a webservice from the client. Unless you want to do it from the server, of course. The webservice uses a standard mechanism to make requests via HTTP. It's all hidden from you, that's kind of the point.

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      J 1 Reply Last reply
      0
      • J johland

        For some reason it seems that I've got difficulties to understand the logic of the web service: I need that a webpage or an application on client side will validate user's details (username, password). Validation is through db that seats on a server application. I want that the procedure will be: calling a validation method through web service that will use the server's db. I understand how to connect the client or the website to the web service but don't understand how the web service connects to the server to use his db (or to call a function on the server that will do that). Can someone help please? thanks y

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        If you don't like my answer, ask more questions so I understand where the problem is.

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        J 1 Reply Last reply
        0
        • C Christian Graus

          IF it's a webpage, use AJAX, you can't call a webservice from the client. Unless you want to do it from the server, of course. The webservice uses a standard mechanism to make requests via HTTP. It's all hidden from you, that's kind of the point.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          J Offline
          J Offline
          johland
          wrote on last edited by
          #4

          thanks Christian, but to sharpen my misunderstanding : if i want to use a function that on my server with an application that seats in the client computer : 1.i need a webrefference to the webservice in my client's application to create an instance of it right? 2. the webservice shld have a method that invokes method on the server so how do i connect to the method on the server with the webservice (using a dll?) sorry if i'm all upside down ...

          C 1 Reply Last reply
          0
          • J johland

            thanks Christian, but to sharpen my misunderstanding : if i want to use a function that on my server with an application that seats in the client computer : 1.i need a webrefference to the webservice in my client's application to create an instance of it right? 2. the webservice shld have a method that invokes method on the server so how do i connect to the method on the server with the webservice (using a dll?) sorry if i'm all upside down ...

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            johland wrote:

            need a webrefference to the webservice in my client's application to create an instance of it right?

            Correct.

            johland wrote:

            the webservice shld have a method that invokes method on the server

            Well, every method that is marked as such in the webservice, invokes a method on the server. Automatically. .NET hides those details from you, so you call the method and create class instances as if they were local, and the framework handles the job of making calls to the webservice and getting the result. The only difference is you need to anticipate exceptions that can occur if the framework cannot find the webservice to call.

            Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

            1 Reply Last reply
            0
            • C Christian Graus

              If you don't like my answer, ask more questions so I understand where the problem is.

              Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              J Offline
              J Offline
              johland
              wrote on last edited by
              #6

              i think my first problem is phrasing :) do these steps are right? 1.i want to use a method that seats on my server with another application 2.so i'm creating a webservice that call that method this webservice will be part of the server solution so it will have access to the server db. 3.i want the client app to use this webservice so i add webreference to the client app and create instance of it and use its methods. did i get it? .

              C 1 Reply Last reply
              0
              • J johland

                i think my first problem is phrasing :) do these steps are right? 1.i want to use a method that seats on my server with another application 2.so i'm creating a webservice that call that method this webservice will be part of the server solution so it will have access to the server db. 3.i want the client app to use this webservice so i add webreference to the client app and create instance of it and use its methods. did i get it? .

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #7

                I was commenting on how my response got a 1/bad answer vote. If it wasn't you, then fair enough, but it seemed likely to me that it was. Yes, you got it right. The framework handles all the messy stuff for you.

                Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                J 1 Reply Last reply
                0
                • C Christian Graus

                  I was commenting on how my response got a 1/bad answer vote. If it wasn't you, then fair enough, but it seemed likely to me that it was. Yes, you got it right. The framework handles all the messy stuff for you.

                  Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                  J Offline
                  J Offline
                  johland
                  wrote on last edited by
                  #8

                  sorry...didnt even noticed this feature exsits

                  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