Closed aknuds1 closed 12 years ago
@Arve - the DefaultConnection generally points to the default SQLExpress connection that usually doesn't point to your database, so MvcInstaller removes that connection and creates a new connection (or two) for your specific application and then it updates the Membership elements with that connection information.
Look at the Profiles, Roles and Membership elements and they should now be updated with the working connection string name. The Application name is also changed for all those elements. MvcInstaller does that all for you.
What dangling reference are you referring to?
The dangling references are <profile>
'DefaultProfileProvider', <membership>
'DefaultMembershipProvider' and <sessionState>
'DefaultSessionProvider'. I'm not quite sure how they got added in the first place, although I suspect it was by the MVC 4 project scaffolding.
@aknuds1 - yes the MVC 4 project scaffolding put them there in the first place. As long as the defaultProvider name doesn't point to them, it's not a problem for them to be there.
But what problems does it cause to leave DefaultConnection be? You're assuming it's useless, but you have no guarantee that this holds. Also, Visual Studio (2012) reports the dangling references as errors, so they're not unproblematic.
@aknuds1 - I've never seen MvcInstaller leave the DefaultConnection after it configures the application. Can you try it with a new blank application? I'm sure that it will remove the default connection and replace it with the working one.
Not sure if I follow; yes, MvcInstaller removes DefaultConnection, the question is what do we gain from this?
It has the negative consequence of leading to dangling references in Web.config, which Visual Studio flags as errors.
Arve
On Mon, Aug 6, 2012 at 5:55 PM, King Wilder < reply@reply.github.com
wrote:
@aknuds1 - I've never seen MvcInstaller leave the DefaultConnection after it configures the application. Can you try it with a new blank application? I'm sure that it will remove the default connection and replace it with the working one.
Reply to this email directly or view it on GitHub: https://github.com/kahanu/MvcInstaller/issues/3#issuecomment-7527359
Arve,
There shouldn't been any other DefaultConnection references in the web.config after MvcInstaller has done its thing. It changes all the references in the Membership providers, so DefaultConnection should be gone. If it's not, you can just remove it.
But you should try a clean MVC application and try MvcInstaller again. It should remove all references to the DefaultConnection.
Thanks,
King Wilder Gizmo Beach http://www.gizmobeach.com info@gizmobeach.com 626 351-4334
-----Original Message----- From: Arve Knudsen [mailto:reply@reply.github.com] Sent: Monday, August 06, 2012 10:46 AM To: King Wilder Subject: Re: [MvcInstaller] MvcInstaller 2.0 removes connection string DefaultConnection from Web.config, why? (#3)
Not sure if I follow; yes, MvcInstaller removes DefaultConnection, the question is what do we gain from this?
It has the negative consequence of leading to dangling references in Web.config, which Visual Studio flags as errors.
Arve
On Mon, Aug 6, 2012 at 5:55 PM, King Wilder < reply@reply.github.com
wrote:
@aknuds1 - I've never seen MvcInstaller leave the DefaultConnection after it configures the application. Can you try it with a new blank application? I'm sure that it will remove the default connection and replace it with the working one.
Reply to this email directly or view it on GitHub: https://github.com/kahanu/MvcInstaller/issues/3#issuecomment-7527359
Reply to this email directly or view it on GitHub: https://github.com/kahanu/MvcInstaller/issues/3#issuecomment-7530214
Using MvcInstaller 2.0 in conjunction with my ASP.NET MVC 4 project I find that when clicking MvcInstaller's 'Install' button, it removes the connection string 'DefaultConnection' from Web.config, why is this? It leaves several Web.config elements with a dangling reference to this connection string.