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

The Archive Base Latest Questions

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

My code is still in development so when I run it it is on

  • 0

My code is still in development so when I run it it is on my local computer, but the database I am using is on an instance in EC2. I am having issues connecting to the data base. I am unsure of what the server name should be, i think. Does anyone know how to connect to a SQL server on EC2, or how to configure the connection string in the App.config file.

<connectionStrings>
<add name ="ConnectionString"
     connectionString="server=000.000.000.000\EC2SQLEXPRESS;UID=UserID;PWD=xxxxxxxxxx;database=DBName"/>

  • 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-28T17:39:34+00:00Added an answer on May 28, 2026 at 5:39 pm

    In order to access the DB from EC2 you will need to use it’s public DNS name. You can find this on the Instance details page.

    Bear in mind that if you Stop the instance and restart it that public DNS name will change. So you really should use an Elastic IP, associate it with your instance and have a normal public DNS name that points to the elastic IP. This way you won’t have to change your configuration info if you have to stop the instance.

    Also, you will need to make sure the security group the database server is in has the desired port open. For SQL server the standard port is 1433.


    FYI – It is generally considered bad practice for a database server to be directly accessible on the Internet. Instead you should have at least a web services layer in between you and the database that exposes ONLY the functionality you need.

    However, if that isn’t feasible, then at bare minimum you should move SQL server to a different port and expose that through your security group settings. This doesn’t actually increase your security (it’s just obscuring the port) however most script attacks only target the standard SQL server ports like 1433. So, it would help reduce the number of attacks you’ll see.

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

Sidebar

Related Questions

I'm having a hard time using std::string::iterators in C++. This code compiles fine (still
I'm still new to code igniter and I'm having problems getting the login system
I'm still relatively new to iPhone development but I know this warning is usually
My below mentioned code still submits form on special character in name field. Validation
I noticed when I have [Serializable] instead of [Serializable()] , the code still compiles.
Edit: The code here still has some bugs in it, and it could do
I'm trying to use the following code and it still strips out all the
I've gone through most of the example code and I still need some help.
I'm still learning ASP.NET and I often see code like this throughout parts of
Sometimes I still get stuck trying to translate procedural code into functional code. Is

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.