Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8478465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:45:12+00:00 2026-06-10T18:45:12+00:00

Hi I’m trying to encrypt the zip using the GPG im able to do

  • 0

Hi I’m trying to encrypt the zip using the GPG im able to do that from a command line. When i integrated that in a C# application it worked well. But when i integrated it with a Windows service i got Error as gpg2.exe closed

Following are the exception details

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: gpg2.exe
  Application Version:  0.0.0.0
  Application Timestamp:    4fa14f63
  Fault Module Name:    StackHash_e51a
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   00000000
  Exception Code:   c0000005
  Exception Offset: 00000000
  OS Version:   6.0.6002.2.2.0.272.7
  Locale ID:    1033
  Additional Information 1: e51a
  Additional Information 2: 4c0d4d78887f76d971d5d00f1f20a433
  Additional Information 3: e51a
  Additional Information 4: 4c0d4d78887f76d971d5d00f1f20a433

Following is the code i’m using to encrypt

public bool Encrypt(string inRecipient, string sourceFile, string destinationFile)
{

/// File info
FileInfo fi = new FileInfo(sourceFile);

ProcessStartInfo s = new ProcessStartInfo("cmd.exe");
s.CreateNoWindow = true;
s.UseShellExecute = false;
s.RedirectStandardInput = true;
s.RedirectStandardOutput = true;
s.RedirectStandardError = true;
s.WorkingDirectory = new FileInfo(pgpPath).DirectoryName;

bool processExited = false;

using (Process p = Process.Start(s))
{

    string recipient = " --recipient \"" + inRecipient + "\"";
    string output = " --output \"" + destinationFile + "\"";
    string encrypt = " --encrypt \"" + sourceFile + "\"";
    string homedir = " --homedir \"" + HomeDirectory + "\"";
    string cmd = "\"" + PgpPath + "\" " + recipient + output + encrypt;

    p.StandardInput.WriteLine(cmd);
    p.StandardInput.Flush();
    p.StandardInput.Close();
    processExited = p.WaitForExit(3500);
    p.Close();
}
return processExited;

}

Im not able to find anything using the Problem signature. Please help

Thanks in advance!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:45:14+00:00Added an answer on June 10, 2026 at 6:45 pm

    This is most likely caused by a user context problem. Probably the user account the services is running under doesn’t have access to the file you are trying to encrypt.

    To test this theory, go to the service properties and in the ‘Log On’ tab enter an account that you know has access to the file. Preferably the same account/password that you are using to run the C# application

    You should also be sure that your code is using a full path to the file to encrypt and not a relative path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.