0
votes

I've developed, 2 years ago, a little web app with the .Net project template hot towel angular breeze. It used to work perfectly at this time. I've decided to make it work recently but it doesn't work anymore. In this application there are these technologies :

hot towel angular breeze.

  • an entity framework ado .Net 6 (with camelcase name of entities / tables)
  • a custom membership provider
  • web api 2 ApiController
  • an EFContextProvider Breeze.ContextProvider.EF6 Breeze.WebApi2.

So 2 years ago it used to work.

No I've aborts on the membershiprovider at the Login to the application (The underlying provider failed on Open).

Why doesn't this web app work anymore ?

Any idea ?

I've well seen some posts on this problem, but it doesn't work. I'll show you some code if necessary.

Thanx in advance for your help.

Regards.

PS : I have changed of environment between since the first time, it used to work on windows 7 professional 64 bits, and now it doesn't work on windows 10 professional 64bits. That's the reason ?

1
You are not able to connect to your database. This is most likely not an angularjs problem.Troels Larsen
I suppose it's this. But why did it work 2 years ago ? Is there a problem of compatibility between a membershipprovider and a web api ?fguigui
This exception occrs solely when connecting to the database. Even if you had made this a Console application, it would fail. Add your connection string to the question, and change to tags to sql-server and/or entity framework, and you are more likely to get an answer. It may be something as simple as a missing .mdf file or local installation of SQL Server, but without any code, I cannot made a qualified guess.Troels Larsen
the connectionstring in the web.config is : <add name="CVIntegreEntities" connectionString="metadata=res://*/Models.CoproModel.csdl|res://*/Models.CoproModel.ssdl|res://*/Models.CoproModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.\sqlexpress;initial catalog=CVIntegre;persist security info=True;user id=xxxxx;password=yyyyy;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />fguigui
Really, you should update your question to reflect the fact that you are now asking a completely difference question, but do you have SQL Server installed and an instance called sqlexpress? And is there a database called CVIntegre on that? Can you connect using SQL Server Management Studio?Troels Larsen

1 Answers

0
votes

So apparently it's a known problem, and no problem with the connectionString (that is correct).

There is a problem with the membershipProvider, when a Login action is called from the client that is called too soon (use of Webmatrix.Data and Webmatrix.WebData). See this : Attempt by security transparent method 'WebMatrix.WebData.PreApplicationStartCode.Start()'

Then after you have to use Microsoft.AspNet.WebHelpers (another nugget to install) so there will be a problem of compatibility between webmatrix and WebHelpers and do what is explained in this stackoverflow post. And it should be working.