Click here to Skip to main content
12,949,601 members (67,515 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi I'm new here and I'm new too MVC4.

For a project I want to connect to a SQL Server thats not local.
I'm using Visual studio 2010 and SQL Server 2008 R2 Developer.
The project is MVC4 and C#.

I've created a Database with SQL Server Management Studio but without tables.
Now, I figured out that I have to use an connectionString in web.config in Visual Studio. But I don't know what to fill in.. I've looked at under SQL Server 2008. But I don't know wish one is good and what to do with an external/ remote SQL server 2008 R2!

And is the connectionstring the only thing to do to connect to a database?

Thanks in advance!
Posted 13-Nov-12 0:16am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Yes, your connection string must point to the SQL Server instance, it makes no difference if it's local, so long as the web server can see it
Marcus Kramer 13-Nov-12 16:30pm
+5. Not sure who the dumba** univoter is, but compensated. (I see you haven't taken long to get back into having your own personal troll. Cheers)
Nelek 13-Nov-12 19:09pm
Im countering as well, ir is a quite persistent one. Seems to be looking for him the whole time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,489
CHill60 3,380
Maciej Los 2,913
Jochen Arndt 1,935
ppolymorphe 1,820

Advertise | Privacy | Mobile
Web02 | 2.8.170524.1 | Last Updated 13 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100