Hello,
I am new to App Harbor. I created a new project from the ASP .NET
MVC 3 Web Application template. I created a database and specified
the connection string name that I found in the web.config:
ApplicationServices. Alas, that is not working. Should I specify
the database connection string manually? Or should I start with a
different project template?
Thanks,
Jacob
ASP.NET MVC3 Web Application
Discussions are closed to public comments.
If you need help with AppHarbor please
start a new discussion.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
#1 Posted by friism Support staff on 13 Jul, 2011 02:33 AM
Please refer to the "Connectionstring Name" section of this article, and let us know if you have any questions.
friism closed this discussion on 13 Jul, 2011 02:33 AM.
jfoshee re-opened this discussion on 13 Jul, 2011 03:40 AM
#2 Posted by jfoshee on 13 Jul, 2011 03:40 AM
I did look at that, but I'm not sure it is enough information for me. That is in part because I am new to ASP .NET MVC.
The connection string in the web.config which was created by the project template looks like this:
I specified "ApplicationServices" as the connection string name when I created a SQL Server database.
I removed the EntityFramework reference from the project, and it still built and ran locally, so that doesn't seem to be the issue either.
If this is not enough information I'll continue to investigate. I will compare my project to some of the working projects you have on GitHub. I do want to reiterate, however, that this is a default MVC 3 template project... Seems like this should work out of the box for you guys.
Thanks,
Jacob
#3 Posted by popapps on 13 Jul, 2011 12:02 PM
Surely you have to change the name of your connection string from
name="ApplicationServices"toname="YourDbName". If you also want to use MembershipProvider you have to configure your db usingaspnet_regsqltool.#4 Posted by jfoshee on 13 Jul, 2011 01:53 PM
Thanks, Fabrizio! aspnet_regsql did the trick! I can now log on to the demo site. I did not have to change the name of the connection string.
I've used Rails and Heroku in the past, and the database is built automatically. I will have to learn how that is handled here...
For other readers, here's what I did:
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regsql.exe"
Click Next, then Finish. I think that's it.
Jacob
#5 Posted by rune Support staff on 13 Jul, 2011 04:06 PM
Hi Jacob,
Thanks for getting back with the solution, I'm sure it'll help other users. Also thanks to Fabrizio for helping out here :-)
Best,
Rune
rune closed this discussion on 13 Jul, 2011 04:06 PM.