|
-
Feb 8th, 2012, 06:37 AM
#1
Thread Starter
Junior Member
Security in vb.net project
How can you implement ip address security in vb project.
I am into a project which should check users ip address and then allow access only if the ip address is present in the dump(authentic ip addresses).
Please do help me with the code.
-
Feb 12th, 2012, 10:33 PM
#2
Re: Security in vb.net project
I'm afraid that you're being a bit optimistic expecting code for such a vague question. You've basically provided the general answer yourself: get the user's IP address, check whether it's in the list of valid values and allow access only if it is. If you want specific details of the implementation then you're going to have to provide some specific details about the application. For a start, we don't even know whether it's a web site or web service.
-
Feb 14th, 2012, 01:23 AM
#3
Thread Starter
Junior Member
Re: Security in vb.net project
 Originally Posted by jmcilhinney
I'm afraid that you're being a bit optimistic expecting code for such a vague question. You've basically provided the general answer yourself: get the user's IP address, check whether it's in the list of valid values and allow access only if it is. If you want specific details of the implementation then you're going to have to provide some specific details about the application. For a start, we don't even know whether it's a web site or web service.
Hi,
Lets say that this ip address 192.168.1.1 is authentic and is in the list. How do I include the group of all authentic ip addresses in my project. If found authentic, can I use a if condition with the ip address(192.168.1.1 in the example)as the condition. What should be the CONDITION in the IF STATEMENT.
Thanks in advance.
Regards,
Asaad
-
Feb 14th, 2012, 01:40 AM
#4
Re: Security in vb.net project
Are you potentially going to want to change the list after deployment without having to rebuild the application?
-
Feb 15th, 2012, 12:22 AM
#5
Thread Starter
Junior Member
Re: Security in vb.net project
 Originally Posted by jmcilhinney
Are you potentially going to want to change the list after deployment without having to rebuild the application?
Hi,
No, I was just giving the example, as you asked for it. Please do tell me how to store a list of authentic ip addresses in vb.net project and check for a ip address to be authentic (present in the list).
Thanks in advance.
Asaad
-
Feb 15th, 2012, 12:53 AM
#6
Re: Security in vb.net project
I didn't ask for an example. I asked for specific information about the application. See here:
If you want specific details of the implementation then you're going to have to provide some specific details about the application. For a start, we don't even know whether it's a web site or web service.
I'm not going to waste my time providing a solution that could easily be completely irrelevant to your actual scenario. There are lots of different ways it could be done but the best way depends on various factors, the first among them being what type of application it is. When you hold back information and fail to answer specific questions asked by those trying to help you, you seriously reduce your chances of getting the help you want.
-
Feb 15th, 2012, 01:07 AM
#7
Thread Starter
Junior Member
Re: Security in vb.net project
 Originally Posted by jmcilhinney
I didn't ask for an example. I asked for specific information about the application. See here:I'm not going to waste my time providing a solution that could easily be completely irrelevant to your actual scenario. There are lots of different ways it could be done but the best way depends on various factors, the first among them being what type of application it is. When you hold back information and fail to answer specific questions asked by those trying to help you, you seriously reduce your chances of getting the help you want.
Hi,
My application is a vb.net windows form application which does record management. The project is almost complete but the ip security aspect of it is not. I have a list of authentic ip addresses in excel sheet (the computer ip addresses who will be using the application from office). I want only these ip addresses be allowed access and other users from home or somewhere else should not be allowed access. Ca this be implemented in vb.net. Please do help with code.
Thanks in advance.
Asaad
-
Feb 15th, 2012, 01:26 AM
#8
Re: Security in vb.net project
Thank you for providing a clear explanation of the problem. Please do so up front in future.
You'll want the data somewhere that the user can't tamper with it. That would mean either an external location with encryption or else embedding as a resource. The second option is easier. Add a String on the Resources page of the project properties containing a delimited list of valid IP addresses. You can then get that String from My.Resources at run time and Split it into an array. You can get the current IP address using the Dns class and then simply check whether the array Contains that address.
-
Feb 15th, 2012, 02:16 AM
#9
Thread Starter
Junior Member
Re: Security in vb.net project
 Originally Posted by jmcilhinney
Thank you for providing a clear explanation of the problem. Please do so up front in future.
You'll want the data somewhere that the user can't tamper with it. That would mean either an external location with encryption or else embedding as a resource. The second option is easier. Add a String on the Resources page of the project properties containing a delimited list of valid IP addresses. You can then get that String from My.Resources at run time and Split it into an array. You can get the current IP address using the Dns class and then simply check whether the array Contains that address.
Hi,
Thanks for the solution. This is what I needed. In future, I will do it in the beginning. As I am new to vb.net, I was not able to understand what was mentioned in the reply with respect to the coding. Please do mention what to include where in step,please, or please do help with the complete code. That will be extremely useful.
Thanks in advance.
Asaad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|