Smells like a permissions issue.  Could ASP.NET be using a diff user
account/priviliges to that of your DLL-calling program?  As permissions are
passed down through the Process.Start call, PGP might not be able to
read/write certain files/resources, in turn causing everyone's favourite
error: "something went wrong, hate to be you" aka "public key encryption
error".

Jade

From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] Behalf Of Micah Daniels
Sent: Thursday, 15 January 2004 12:23 AM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] pgp problem from ASP


Hi.I have been following these emails for a while purely for interest sake,
but now for the first time i need help. Please let there be someone out
there who has experience in solving a problem similar to mine.

I execute a command line PGP command lines tool (from Networks associates)
in the following segment of C# code:

string exportpath = ''path to some txt file';
string PGPUserName= "some pgp user registered on the current machine";

Process myProcess = Process.Start("C:\\Program Files\\Network
Associates\\PGPNT\\PGP", "+batchmode +force -e -w -t " + "\"" + exportPath +
"\"" + " " + this.PGPUserName);  //
while (!myProcess.HasExited)
{
    Thread.Sleep(10);
}

if (myProcess.ExitCode == 0)
{
    exportPath+=".pgp";
}
else
{
    failureReason = "PGP Encryption Failed : Return Code ("+
myProcess.ExitCode +")";
    return -1;
}

This code is compiled into a dll.

When the dll is accessed from a application, everyhting works fine.
However,..when it is acessed from an asp web page, an error code is
retured,.namely 21 known as 'public key encryption error'.

Anyone have some insight on this problem.

Thanks
Micah

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.


--
This message has been scanned for viruses and dangerous content by MailScanner, and is 
believed to be clean.

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to