web security

Posted on 2002-03-07
Last Modified: 2010-05-02

I wrote a dll in  VB and i would like it to be secured once
i'm opening it from web page?
What do i need to do ?
Question by:shahak
LVL 17

Accepted Solution

inthedark earned 150 total points
ID: 6846756
Here is a simple way.

In your global.asa file place a list of allowed UserID's and Passwords.

Sub APplication_OnStart()

' you could load from a text file if you want.


End Sub

Or you could save the logins and passwords in a database.

Create a login.asp file:

User ID

In your login.asp detect if the opertor has clicked on submit and validate the Login ID and Password.

Send the login details as cookies to the client.


Do same for password.

In you DLL you can now call a function on every page which should be locked from the outside world:

If Not UserLoginOK() Then
   ' kick out the user
   response.redirect ""
   exit sub
end if

' now display your special page
response.write "<HTML><BODY>" ' etc....

Create a function

Public Function UserLoginOK() as Boolean


'now check that this combination is valid'

'look up in database

' or check in application object list of users


for c=0 to Ubound(IDS)
   UDets = Split(IDS(c),",")
   if ucase(udets(0))=UserID and ucase(Udets(1))=PW Then
      exit function
   end if
next c
End Function

Hope this helps.
LVL 17

Expert Comment

ID: 6847244
Id this the kind of security you meant?

In an ideal world you would make your login.asp run in https mode.  But to do this you need yo buy a key from a company like  Once the key is insatlled on your system you can then use https.


Author Comment

ID: 6854263
I would like that my dll will be safe to initialize
from HTML page.

Expert Comment

ID: 6896624
Hi, this item is current but many others still open quite old.

ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.

To view your locked questions, please click the following link(s) and evaluate the proposed answer.

------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
Thank you everyone.
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.

Expert Comment

ID: 6975364
Force-accepted by
CS Moderator

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question