Question

I am using the variables to configure the same "connection string" between two applications, since the two do access the same database of users.

Can I set the same SQL Server (Nano 10GB) in more than one application to use transformation for web.config?

Was it helpful?

Solution

It is possible, but requires some legwork. Basically you need to have one app with a known location (URL is fine) that the others can ask for the Connection String. The hard part is doing it securely enough. I'm partway there...

I've rigged up a system where you have a password that both of your Apps know in AppSettings, and then have the Secondary Website send a Public Key to the Primary Website with the password. Who then encodes the connection string, and sends it back.

The password CAN be injected by Appharbor when it does a deploy. And the connection string is also setup on the deploy. Ideally you'd use SSL but I don't have that setup and it makes life hard when working locally.

Proof Of Concept: https://bitbucket.org/Rangoric/database-coordination/overview

It does work, just start both of the website projects in there, and go to http://localhost:4002/Database and you will see what is in the connection String of the Primary website.

EDIT: I just realized that since you can piggyback the SSL Cert of appharbor with the free subdomain they give you, you can use that URL for added security if you don't have your own SSL cert.

OTHER TIPS

This is not currently possible since there is no way to have the connectionsstring injected into other applications than the one that has the add-on provisioned. Feel free to add this as a feedback suggestion.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top