Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

CryptAcquireContext - Fails from IIS/Asp-Vbscript

 
   Web Hosting and Web Master Forums (Home) -> IIS RSS
Next:  Help! Apache Logs Problem - Access.log stopped ru..  
Author Message
stein

External


Since: Sep 28, 2005
Posts: 1



(Msg. 1) Posted: Wed Sep 28, 2005 3:58 am
Post subject: CryptAcquireContext - Fails from IIS/Asp-Vbscript
Archived from groups: microsoft>public>inetserver>iis (more info?)

I have a VB-ActiveX used for encryption/validating password in a applicaton.
When used from ordinary client-programs/scripts it functions, not able to
obtain Context when running from web.

Any hints why this is happening would be appreciated.

' Parts of source is
' constant declaration
Private Const PROV_RSA_FULL As Long = 1
Private Const CRYPT_NEWKEYSET As Long = 8
Private Const CRYPT_MACHINE_KEYSET As Long = 32
Private Const SERVICE_PROVIDER As String = "Microsoft Base Cryptographic
Provider v1.0"


hCryptProv = 0
iErr = CryptAcquireContext(hCryptProv, sContainer & "1",
SERVICE_PROVIDER, PROV_RSA_FULL, CRYPT_NEWKEYSET)
If hCryptProv = 0 Then
iErr = CryptAcquireContext(hCryptProv, sContainer & "3",
SERVICE_PROVIDER, PROV_RSA_FULL, CRYPT_MACHINE_KEYSET)
If hCryptProv = 0 Then
iErr = CryptAcquireContext(hCryptProv, sContainer & "2",
SERVICE_PROVIDER, PROV_RSA_FULL, 0)
Err.Description = "ERROR:" & CStr(GetLastError) & vbCrLf & _
" - Container: " & sContainer & vbCrLf & _
" - Error during CryptAcquireContext for a new
key container." & vbCrLf & _
"A container with this name probably already
exists."
Err.Number = ERROR_APPLICATION_KEYS_NOT_FOUND + 1
Err.Raise Err.Number, "tfmutility.cryptoapi.InitCrypt",
Err.Description
End If
End If

 >> Stay informed about: CryptAcquireContext - Fails from IIS/Asp-Vbscript 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
IIS and vbscript - I am writing a vbscript program to query IIS 5.0 servers for security attribute information among other things. I would like to run this program from a Windows NT or Windows 2000 workstation. Do I have to have IIS installed on the workstation in order....

VBScript under IIS6.0 - Hi everyone! I've been browsing Web Server Talk for an answer to my problem, but I've only found some hints, not sure if they apply to my problem. I've been running an IIS5.0 with an ASP page that executes a VBScript like this: Set..

Vbscript IIS Properties - Hello I am a Vb,(5\6\net\Vbwscript), person, but new to IIS. If I go into the Internet Services Manager MMC, and I right click on one of the virtual directories, and then select properties, I can see, and modify the properties. How to access, and..

VBscript parsing in IIS - I have the ASP page <%@ Language=VBScript %> <% Option Explicit Response.End A = b %> On some servers I get parsing error on some I don't Error says that variable A is not defined. This is understandable but the script is not even suppos...

IIS metabase via vbscript - I have written a vb script to extend the IIS metabase to add some classes and properties to store web site specific info about each site. I don't want to use the .net config file for reasons I won't go into. the problem I have , is I can a two classess....
   Web Hosting and Web Master Forums (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]