In my ASP application I created a function that created a unique password that was automatically generated for the customer. Here was my code:

Public Function GetNewPassword() As String

Dim fs
Dim intPos
Dim strChar
Dim strPassword

fs = CreateObject("Scripting.FileSystemObject")

strPassword = fs.GetBaseName(fs.GetTempName)
strPassword = Right(strPassword, Len(strPassword) - 3)
intPos = Weekday(Now())
If intPos <> 5 Then
intPos = intPos Mod 5
End If
strChar = Mid(strPassword, intPos, 1)
If IsNumeric(strPassword) Then
strChar = int(strChar)
strPassword = Chr(65 + strChar) & strPassword & Chr(90 - strChar)
Else
strPassword = strPassword & Asc(strChar)
End If

fs = Nothing

GetNewPassword = strPassword

End Function


I know that I can't use the FileSystem object in ASP.Net, but cannot find an equivelent to "GetBaseName" and "GetTempName" in the System.IO. Does anyone have a suggestion as to how I can create a unique password at runtime? Or what namespace I should be using for GetBaseName?

Thanks!