2

couple of questions regarding the connection strings section for websites in the windows azure portal:

do the settings in the portal take precedence over what's in web.config? If so, should I not include connection strings in the web.config file? Are the settings in the portal sometimes referred to as app.config?

can i set connection strings for ado.net entities in the windows azure portal? This does not seem to work for this specific type of connection string.

in the portal i included the following connection string and gave it the same name as what is in my web.config:

metadata=res:///Models.TABLENAME.csdl|res:///Models.TABLENAME.ssdl|res://*/Models.TABLENAME.msl;provider=System.Data.SqlClient;provider connection string="Server=tcp:SERVERNAME.database.windows.net;Database=DATABASENAME;User ID=USER;Password=PASSWORD;Trusted_Connection=False;Encrypt=True;

The connection string in my web.config file works in my dev environment, but i think i have something typed wrong on the azure portal.

2

1 Answer 1

3

"do the settings in the portal take precedence over what's in web.config?" Yes.

"If so, should I not include connection strings in the web.config file? " Use the connectionstring found in Azure portal and insert it in your web.config. This, of course, does not apply to if you are using a local database. Then you should use the local connectionsstring.

"Are the settings in the portal sometimes referred to as app.config?" No. Not if you are stil on the subject of connectionstrings.

"can i set connection strings for ado.net entities in the windows azure portal? This does not seem to work for this specific type of connection string" Check my blog post on basic set up for this here under step 2(2. Now, go to the Management portal and Create a new db.) http://geekswithblogs.net/MagnusKarlsson/archive/2012/10/31/add-sql-azure-database-to-azure-web-role-and-persist.aspx

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

1 Comment

thanks mate. very helpful information. i'm new to mvc and most of its parts.

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.