source code of an ASP program


I m running ASP programs on my website. Will anybody be able to view the source code of an ASP program on the website?

How can we make it even more secure?

yes everyone can see your source code, If u want to hide it,use javascript and disable source code view

It is not possible to see the ASP code.

U r right Dolbz,it is Not possible to see the ASP code, but if your IIS configuration is incorrect or your hosting provider takes the right to run ASP on your domain then it’s possible

As long as you instruct the server to parse those files (as is by default), the source will never be available to regular visitors.

code to query active directory


Does anyone have any code to query active directory via an ASP classic application. Basically, I want the application to verify that the user is logged into the network, and simply return the username they are using. This is done on a single signon network, so there is no interaction with the end user.

if you were using .NET 2.0 and Visual Studio 2005 you could generate a managed class from the Active Directory WMI provider to easily access the AD schema.

asp code for footer link


Hi all,

I m newbie in ASP.
I just wanted to add my main page link at the footer of every internal page of the site but couldnt understand the asp code and am stuck in it.
kindly help me

you will either have to edit every page, or put This include code at the bottom of every page.

Code:
<!--#include virtual="pagenamehere.asp"-->
Then create the pagenamehere.asp page with the footer content you require.

modify an XML file in ASP.net


Hey,

Is there any way to modify an XML file in ASP.net?

Sure, look at the XmlDocument class (it is very helpful for modifying XML files).

Namely all the .NET Framework XML classes include innovations that offer convenience, better performance, and a more familiar programming model etc. than the older industry standards such as DOM, XPath, XSD, and XSLT.

picture path into the database


how do i upload a picture path into the databae and display it out ??? pls help me. .

when uploading it you are presumably storing them in a predefined folder and therefore simply store the path relative to the root in the db with the file name or alternatively if they are all in a single location then there is only a need to store the filename as the path will be the same in all cases.

so you need to insert into db pictdure path or actually upload a picture via a form ?

download/read xml files from another website using asp


Is there any way to download/read xml files from another website using asp??

can be done client-side now with the ever-popular AJAX…

Or you can also write a COM obj to scrape another page/download file, etc..

look up the XMLHTTPRequest Object

Sends the email feedback to a Distribution List in his Outlook


one of my client has requested a form that sends the email feedback to a Distribution List in his Outlook Contacts. So…is there a way to code a form to pull the emial addresses from an Outlook Contact distribution list?

This looks like an attempt to steal email addresses from an address book and spam the heck out of them. Is that what you are trying to do?

You can save the contacts as a text file and input them all to a database which is stored on the web server.Then when the form sends an email it can send it to all the addresses.

If your outlook uses exchange server on active directory. I believe you can then query the server using ldap to get what you want.

Zip a directory on hosted server


I’m moving hosts and one of my directories is huge, so I’m wondering if there’s a way to zip it up before I transfer it to the new server. this is on a windows server and I can only run classic ASP on this account.

any suggestion

There wasn’t a way to do it with that host. However, If the new host uses cpanel and there is a way to zip and unzip via the file manager utility.

Contact your host and ask them to do it.

Upload images to send as an email attachment using ASP


Does anyone know how to upload images to send as an email attachment using ASP?

Thanks in advance

here is a scrip that attaches the file from your server

<HTML>
<BODY BGCOLOR="white">

<H1>aspSmartMail : Sample 5</H1>
<HR>
<%

    On error resume next

    Dim mySmartMail
    Set mySmartMail = Server.CreateObject("aspSmartMail.SmartMail")

'   Mail Server
'   ***********
    mySmartMail.Server = "mail.yourdomain.com"
    mySmartMail.ServerPort = 25
    mySmartMail.ServerTimeOut = 35

'   From
'   ****
    mySmartMail.SenderName = "Your Name"
    mySmartMail.SenderAddress = "youremail@yourdomain.com"

'   To
'   **
    mySmartMail.Recipients.Add "yourfriend0@anydomain.com", "Friend0's name"
    mySmartMail.Recipients.Add "yourfriend1@anydomain.com", "Friend1's name"

'   Carbon copy
'   ***********
    mySmartMail.CCs.Add "yourfriend2@anydomain.com", "Friend2's name"

'   Blind carbon copy
'   *****************
    mySmartMail.BCCs.Add "yourfriend3@anydomain.com", "Friend3's name"

'   Reply To
'   ********
    mySmartMail.ReplyTos.Add "yourfriend4@anydomain.com", "Friend4's name"

'   Message
'   *******
    mySmartMail.Subject = "aspSmartMail Sample 5"
    mySmartMail.Body = "This mail which has been sent with aspSmartMail."

'   Parameters
'   **********
    mySmartMail.DateTime = "Wed, 23 febr 2000 12:00 +0600"
    mySmartMail.Organization = "your Society Inc."
    mySmartMail.XMailer = "Your Web Application"
    mySmartMail.Priority = 1
    mySmartMail.ReturnReceipt = false
    mySmartMail.ConfirmRead = true
    mySmartMail.ContentType = "text/plain"
    mySmartMail.Charset = "us-ascii"
    mySmartMail.Encoding = "base64"

'   Attached file
'   *************
    mySmartMail.Attachments.Add Server.MapPath("aspSmartMailsample.txt"), false

'   Send the message
'   ****************
    mySmartMail.SendMail

    if err.number <> 0 then

        response.write("Error n° " &  err.number - vbobjecterror & " = " & err.description  & "<br>")

    else

        Response.Write "aspSmartMail has sent your message with this file as attachment : <br>"
        Response.Write mySmartMail.Attachments.Item(1).FilePathName

    end if

    set mySmartMail = nothing

%>
</body>
</html>

Protect the username & password fields against brute force attack


Hi,
How can I protect the username & password fields against brute force attack in ASP page?

The best way to prevent brute force attacks on your login screen is to do an account lockout after x failed attempts. You can block on IP or on account.