Improve company productivity with a Business Account.Sign Up


web security

Posted on 2002-03-07
Medium Priority
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 600 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As a person who answers a lot of questions, I often see code that could be simplified, made easier to read, and perhaps most importantly made easier to maintain if the code was modified to use the Select Case statement. This article explains how to…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

580 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