Support forum for ASP.NET Zero (https://aspnetzero.com/).
By maharatha
#12163 Hi -

I am now in the phase where I am architecting my deployment strategy. This is what is happening :

I have hosted my application in AWS EC2 instance where I have one IIS server and two database server say "Host" and Client"

While deployingy the web config is "Trusted_Connection=True;" in the connection parameter. Also it's the same when I add the client database details while setting up the Tenant. When i do this everything works fine as they as these databases are accessed using IIS service account.

Everything is great till now.

Then comes the migrator tool. The Migrator tool will be using the connection string sepcified in the App.config.

As my build and deployment tool is outside the AWS so obviously i cannot use "Trusted_Connection=True;" in my connection string , in that case I have to use the sql authentication.

This works fine and it fails while updating the client database as in that case the connection string would be "Trusted_Connection=True;". I can fix this issue by programmatically changing the connection string.

My problem is _migrator.CreateOrMigrateForHost() doesn't takes any parameter, so I cannot override the connection string for the host. Which leaves me no choice than writing down my userid and password in my web config which I totally don't want it.

If you could provide a override method for _migrator.CreateOrMigrateForHost() which accepts a connection string that would solve a lot fo problem.

If you can think of any other way to hid the user id or password that would be great.

Thanks