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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:55:40+00:00 2026-06-17T17:55:40+00:00

I have a legacy ASP application that I need to release on a modern

  • 0

I have a legacy ASP application that I need to release on a modern server. It uses ADO with SQLOLEDB to talk to MS SQL Server. It’s logging on to SQL with username and password.

The app relies on a peculiar behavior of the ADO Connection object that seems to have changed. These days (in ADODB.Connection.6), when you provide a connection string to a Connection and then retrieve it back, you don’t get back an exact copy of the original string; specifically, the username and password are stripped from it, and some extra parameters are added.

It looks like older versions of ADO did not strip the credentials in this scenario; the application would never work if it did, and it works. Question – is this documented? Is there a way to enforce the legacy behavior in new ADO?

I really don’t want to downgrade ADO on a shared server.

EDIT: just isolated it to a minimal test case. Works on Connection.2.80 on Windows 2003 (msado15.dll v. 2.82.5011.0), fails on Connection.6 on Windows 2008 (dll v.6.1.7600.17036).

EDIT2: officially, the old MDAC 2.8, which ADO is a part of, is not supported on Vista and higher. So downgrade is not really an option.

  • 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-17T17:55:41+00:00Added an answer on June 17, 2026 at 5:55 pm

    What you’re looking for is probably the “Persist Security Info” property. The property is documented here and here (assuming you’re using the SQLOLEDB provider; but most providers I’ve dealt with behave the same in this regard). Basically, when this property is set to False, sensitive information, such as passwords, will be stripped from the connection string when it is read. Conversely, when the property is set to True, the connection string will be returned exactly as it was supplied (including any sensitive information).

    I have only found one blog post (but no official documentation) that states that the default value for this property changed from True to False at Windows Vista, which would correspond with Windows Server 2008. This matches your observations.

    It should be noted that the new default of False is considered more secure since there is less risk of accidentally revealing sensitive information. The recommended solution here is to re-engineer the application so that it doesn’t need to rely on getting the password back from the ConnectionString property.

    With that disclaimer out of the way, you can explicitly set the “Persist Security Info” property through the connection string by adding ;Persist Security Info=True. It may also be possible to set the property on the Connection object before opening it (in case you can’t change the connection string), but I’m not entirely sure if that would work (you may have to manually set the Provider property first).

    ' untested examples
    
    ' Method 1
    connString = "Provider=SQLOLEDB;"
    connString = connString & "Data Source=example;"
    connString = connString & "Initial Catalog=exampleDB;"
    connString = connString & "User Id=user;"
    connString = connString & "Password=1234;"
    connString = connString & "Persist Security Info=True"
    
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open connString
    
    ' Method 2
    connString = "Data Source=example;"
    connString = connString & "Initial Catalog=exampleDB;"
    connString = connString & "User Id=user;"
    connString = connString & "Password=1234;"
    
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Provider = "SQLOLEDB"
    conn.Properties("Persist Security Info").Value = True
    conn.Open connString
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a legacy application that uses the ASP.NET membership provider w/ SQL backend.
I have a Windows 2003 Server that uses IIS to host a legacy ASP.NET
I am working on a Silverlight application that uses WCF. I need to have
We have developed a vacation rental application in ASP.NET with SQL server as DB.
I have a rather complex legacy ASP.Net application that is under continuous development, and
I have a windows forms application that uses legacy vendor com objects. I've registered
We have an ASP.NET MVC 4 application that links to legacy native code. The
I have a legacy application at my hand which uses ASP.NET WebForms. My problem
I have a legacy ASP application that I support. By support I mean that
We have a legacy ASP.NET webforms application that we're engaged in stabilising and removing

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.