I have searched the web and can't seem to find a direct, correct or current answer to this question.
"which connection string vs2013 and azure with EF and OAuth"
I am using Visual Studio 2013 Professional and creating a web forms application using SQL server. Existing DB's....
The question is I have 3 connection strings.....
1) The (DEFAULT) local database (*.mdf) that comes with a new project in VS2013. 2) The (AZURE_DB) actual AZURE connection string. 3) A tcp: connection string. Which is still local and ok for testing.....
* ALL 3 WORK and I can access all 3 without problem. *
Using the DEFAULT-LOCAL DB did copy up to Azure the table changes I made, adding and altering... Originally.
However in testing I am not getting on the AZURE SQL database the user data from a localhost login. So there doesn't seem to be a sync. Which is ok, I can point to any connection string as the default connection string. So just using the AZURE connection string would work. And it did until....
I introduced Entity Frameworks for user administration. After reviewing several MSDN demos and elsewhere, all that required a tweak or assumption using vs2013 with all the updates.
I got the "/" yellow screen application failure on my default aspx page where it references Hello, <%: Context.User.Identity.GetUserName() %> on the site master page for the user display in the menubar.
I have deleted, rebuilt my application several times and as soon as I get to implementing EF/OAuth, I get the yellow screen failure or a 404 error, depending on the many ways I have tried implementing this.
So I have 3 connection strings and I am assuming part of the error is the strings. But have read about issues with the Role Modeler.
So is there a definitive, use only 1 string as some have suggested to resolve the issue and if so which one, obviously the local db isn't going to help my application out in the real world.
It would seem the transport control protocol would be a logical upload path but not as fast and reliable as just connecting to the AZURE connection string and remove all other references.
I have an existing database. I want to use OAuth. I am using webforms but could move(learn) to MVC as most of the "current" demos show using MVC over webforms.
My Connection strings are as follows:
DEFAULT: Data Source=(LocalDb)\v11.0;Integrated Security=True;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False
AZURE: Server=tcp:********.database.windows.net,1433;Database=****_DB;User ID=*****@******;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30;
TCP: Data Source=tcp:*********.database.windows.net,1433;Initial Catalog=****_db;Integrated Security=False;User ID=****@****;Password=********;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False
FWIW: The "logical" choice appears to be to use the AZURE connection string and drop all the rest. Then delete the VS references in web.config to the local db's.....
But I have worked and reworked on this for too long and frustration with this seemingly simple issue is getting the better of me.
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire