1

When running an ASP.NET MVC 3 app (written in VS 2010, tested and working using SQL Server Express 2012, .NET 4.0, Windows 7 Pro) on an Amazon Web Services host (Windows Server 2008, ASP.NET 4.0 app pool, SQL Server Express 2008, IIS7), I am unable to connect to the local database on that machine, nor see any errors in connecting. I am using the following ConnectionString in Web.config:

name="DefaultConnection" connectionString="Data Source=.;Initial Catalog=aspnet-NewWebSite-20141030101548;Integrated Security=SSPI" providerName="System.Data.SqlClient"

Is there a modification I should make to this to make it work? I can't upgrade to SQL Server 2012 on this AWS instance. I can't even log to the Event Viewer or email errors to myself. I'm stumped.

1 Answer 1

0

Your connection string is pointing to a local db instance, and AWS probably doesn't support LocalDB. What you want to do is to get a DB instance that supports remote connection ( you can get one from AWS directly) and find out the connection string of that server, change yours accordingly.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I am in the process of doing that now. If I decide to stick with 2008, I'm guessing my best option would be to install 2008 on the development machine, build against that (using Entity Framework Code-First) and then deploy, adjusting the connect string accordingly. That's the backup plan at this point. I'd upvote but I'm new here and don't have enough reputation yet, but thanks again!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.