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 7055113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:42:33+00:00 2026-05-28T03:42:33+00:00

I am developing a project with Asp.net , and have an encryption method. when

  • 0

I am developing a project with Asp.net , and have an encryption method. when i use it to encrypt a string ,it returns a string that contains some chars like ‘+’ and because i use its returned values in my querystring i need to remove these chars

ex :

http://localhost/Cpanel/CompanyInfo/Hotels/EditHotel/VKWbk+G9F6E=

Error : HTTP Error 404.11 – Not Found
The request filtering module is configured to deny a request that contains a double escape sequence.

http://localhost/Cpanel/CompanyInfo/Hotels/EditHotel/bprrmsZ6atI=

It works great

this is my encryption method :

 public static string EncryptString(string Message)
        {
            string Passphrase = System.Configuration.ConfigurationSettings.AppSettings["CryptographyKey"];

            byte[] Results;
            System.Text.UTF8Encoding UTF8 = new System.Text.UTF8Encoding();

            //Hash the passphrase using MD5            
            MD5CryptoServiceProvider HashProvider = new MD5CryptoServiceProvider();
            byte[] TDESKey = HashProvider.ComputeHash(UTF8.GetBytes(Passphrase));

            TripleDESCryptoServiceProvider TDESAlgorithm = new TripleDESCryptoServiceProvider();
            TDESAlgorithm.Key = TDESKey;
            TDESAlgorithm.Mode = CipherMode.ECB;
            TDESAlgorithm.Padding = PaddingMode.PKCS7;

            byte[] DataToEncrypt = UTF8.GetBytes(Message);

            try
            {
                ICryptoTransform Encryptor = TDESAlgorithm.CreateEncryptor();
                Results = Encryptor.TransformFinalBlock(DataToEncrypt, 0, DataToEncrypt.Length);
            }
            finally
            {
                TDESAlgorithm.Clear();
                HashProvider.Clear();
            }

            return HttpUtility.HtmlEncode(Convert.ToBase64String(Results));
        }

how i can do that ?

  • 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-05-28T03:42:33+00:00Added an answer on May 28, 2026 at 3:42 am

    When you prepare query string value, do as :

    Server.UrlEncode(Variable)
    

    and then pass it to query string.

    At time of reading query string use method for decode like:

    Server.UrlDecode("QuerySting"); 
    

    Let me know for any concerns.

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

Sidebar

Related Questions

I have a Sitecore/ASP.NET projects that I'm developing. Today at some point I inadvertently
I have a widget in an ASP.NET project that I'm developing for my job.
i have a problem i am developing an asp.net mvc project. Website is in
I have a project (Web Application) which I have been developing in C#/ASP.NET, and
I am developing a asp.net project and I dont have very long web.config file
I am developing an ASP.NET MVC project and want to use strongly-typed session objects.
I have an Asp.Net MVC Web Application that I am developing. I have TeamCity
I have been asked to develop some usercontrols in ASP.NET that will at a
I'm approaching the end of a C#/ASP.NET project I am developing, and I'll have
I have a reasonably large project at work that I've inherited. It's an ASP.NET

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.