barnacle.m
barnacle.m

Reputation: 2200

Cannot connect to AWS EC2 instance in Visual Studio

I have an AWS server (MS SQL SERVER EXPRESS 2008 R2 with IIS), with an elastic IP of 54.214.8.111, security groups configured with HTTP, MS SQL and FTP, and I can connect to the remote virtual machine using the rdp file that amazon gives you in the console.

However when I try to connect via visual studio to test if the database is working, it gives me a "Login failed for user 'dbuser' error. I have a user called dbuser on my SQL Server (on the server side of course) with full access permissions etc. I also cannot connect to an ftp on the server, despite all guides and help doc. Something seems to be simply blocking my connection. I have tried the same thing on multiple computers.

Everything seems to be configured correctly except I suspect the server instance.

Can anyone help? PS I'm fairly new to web development, this is my first AWS EC2 server.

[UPDATE] I just tried to create a new instance in a different location, same thing, maybe I don't know how to configure the SQL Server on the EC2?

Upvotes: 0

Views: 1014

Answers (2)

user3363025
user3363025

Reputation: 11

It appears that by default EC2 SQL instances have SQL authentication disabled.

In SQL Management Studio, connect as the built in Administrator account, then go to

Server Properties>Security>

Under Server Authentication, change to "SQL Server and Windows Authentication Mode"

Restart SQL

Your local accounts should now work

Upvotes: 1

dellyjm
dellyjm

Reputation: 426

Try running in elevated mode (right click Visual studio and run as Administrator), solved some issues I was having recently.

Upvotes: 0

Related Questions