Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8393267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:44:15+00:00 2026-06-09T19:44:15+00:00

I have developed a .Net 3.5 windows forms application. I also want to design

  • 0

I have developed a .Net 3.5 windows forms application. I also want to design a website that has a webservice with multiple Webmethods to query the database on the host machine. I want the webservice to be called ONLY through my winapp and my website! And I don’t want any other people to be able to call and use my webservice but only some people who have access to the windows application that I have developed.

I need a good security scenario for this! I truly appreciate anyone who can help me because this is my first experience of developing a webservice and I really need it to be as secure as I mentioned!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:44:17+00:00Added an answer on June 9, 2026 at 7:44 pm

    What you’re talking about is going to be difficult to do for several reasons, but primarily this:

    If you put anything in code on your WinForms app, it can be decompiled very easily. You can obfuscate the code all you like, but it can be de-compiled.

    Because of that, any code that you have in your app can be read by anyone with access to the code. You should always treat any WinForms app as if it’s completely compromised, and ensure that the security at the server end compensates.

    Because of this, you can’t simply store usernames and passwords in configuration files or in code. You have to come up with something else. You CAN use authentication and prompt the user to enter a username/password on program launch, and use that. However, people tend to share these things, so you may want to go for extra protection.

    You can put the connection info, or secrets into the app.config and encrypt it, but anyone who can de-compile the code, can recompile it, and add code to decrypt it at will.

    You can provide signed keys with your app, and use that in an authentication mechanism, but that can be bypassed.

    You can restrict your IP address to specific IP addresses, but those can be spoofed.

    However…

    By layering all of the above techniques, you can make it difficult for an attacker to bypass your precautions. We did the following in one of our apps where we had a similar requirement:

    • We set up a database that holds a GUID record for each authorized customer, and IP addresses allowed for that customer.
    • Every web method expects a CustomerKey parameter. (the guid mentioned above) Each call to a web service checks the key against the IP address.
      • If it matches, valid data is returned.
      • If it fails, valid looking data is returned. We actually return what looks like good data, but it’s really not. This makes it harder for an attacker to know if they’ve actually broken through the defenses.
    • In the WinForms app, the key is stored in the app.config, which is encrypted in the main() event (the entry point for WinForms apps). This is to prevent the casual reader from accessing it.
    • The program is launched automatically on install, so that the encryption happens at startup, to minimize the chance someone can read the file before it’s encrypted.
    • Also, the code is obfuscated.

    Layering the defenses, hopefully, will discourage the average attacker.

    Microsoft has some guidelines as well: http://msdn.microsoft.com/en-us/library/ff648643.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On Windows 7, VB.NET Express, I have developed a simple Forms application. I don't
I am working on windows forms application using c#.net. i have developed an application
I am working on windows forms application using c#.net. i have developed an application(3-tier)
I have a Windows Forms application developed using C# in .NET framework 3.5, Service
I have a very simple windows Service that is developed in vb.net 2008. When
I have developed a Windows application in .NET which uses a SQL Server database
I am working with a vb.net Windows Forms application which has Application Settings, running
I have following situation in a C# Windows Forms (.NET 4.0) application: I have
I have to port a smaller windows forms application (product configurator) to an asp.net
I have a .net Windows Service developed in VB.net. I have a settings file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.