There is already an object named 'Applications' in the database


#1

Whenever I run MiniProfiler I get a SQL error thrown “There is already an object named ‘Applications’ in the database.” It seems to be related to using System Web Providers ASP.NET Universal Providers.

There is an issue here http://stackoverflow.com/questions/9130147/how-do-i-use-universal-membership-provider-ef-and-miniprofiler-together but never got any really understanding of why it occurs. Happens on all our projects.

Does anyone have any idea what it causing it? Is it a bug with MiniProfiler. Is there anyway I can stop it occurring?

Thanks


#2
  1. Create an MVC3 project (ASP.Net 4 with EF5, but seen it in others setups)
  2. Install WebActivator
  3. Add MiniProfiler, MiniProfiler.EF, MiniProfiler.MVC3
  4. Install Microsft ASP.Net Universal Providers Core Libaries
  5. Add Authorize Attribute on home page
  6. Create context (one entity e.g. Person) give it base constructor connection string of empty database
  7. Enable EF Profiling
  8. Set
    Configure Default Connection factory to use your DB - Database.DefaultConnectionFactory = new SqlConnectionFactory(@“Data Source=.\SQLEXPRESS IntegratedSecurity=True;MultipleActiveResultSets=True”);
  9. Set DefaultConnection of Membership
    connection to your context database
  10. Start
    application, Register, Login, Logoff, Stop Application, Run Application, Login
  11. Receive Exception (There
    is already an object named
    ’Applications’ in the database.)

#3

Hey, were you able to find a workaround for this? I’m getting the same exception =D