Call webservice in windows application

前端 未结 1 1429
伪装坚强ぢ
伪装坚强ぢ 2021-01-19 16:51

I have a windows application and I require that the user logins in the application by the username and password which were provided to the user in the website. For this purp

相关标签:
1条回答
  • 2021-01-19 17:20

    Check this answer on SO Thread and Code project article - Webservice with Win Forms and Web Forms to move further.

    To consume web service in visual studio, check the steps below...

    Follow these steps

    1. Right click on the Project in Visual Studio
    2. Select Add Web Reference
    3. Enter URL & proceed

    When you don't see that option

    1. Right click on the Project in Visual Studio
    2. Select Add Service Reference
    3. Press "Advanced" Button
    4. Press "Add Web Reference" Button
    5. Enter URL & proceed

    Reference:
    Creating an ASP.NET web services and consuming it with a Win Form

    Edit: System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable() should get you what you want to check the internet etc..

    Refer :
    How do you determine if an Internet connection is available for your WinForms App?
    and
    What's the best way to detect an internet connection using .NET?

    0 讨论(0)
提交回复
热议问题