Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8349413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:59:30+00:00 2026-06-09T07:59:30+00:00

I know the title looks somewhat confusing so let me explain. :) I have

  • 0

I know the title looks somewhat confusing so let me explain. 🙂

I have a MVC 3.0 Project for which I maintain a public repository @ github, and said Project utilizes the Entity Framework and the Membership Provider (so that’s two separate connectionStrings) .

The issue I am having is that the “Alias” attribute of Sequilizer for the MS SQL database, let’s me specify only one connectionString value to be replaced at build time. Because I can not modify web.config programmatically (and web.config transformations are not applicable because it will leave my sensitive data open to the World on the public github repo), I am left to choose which I want to use more -> Entity or Membership (the other solution would be leaving one of my connectionStrings vulnerable) .

Due to the need of MembershipProvider to know the connectionStringName at build time (everything is specified in web.config), I am kinda at a loss of how to go about all this.

Any help is appreciated!

Cheers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:59:31+00:00Added an answer on June 9, 2026 at 7:59 am

    Okay guys, I think I set up everything finally.

    What I did is, I used the Alias only for my normal connection string which will provide Membership stuff – while I overrode the ObjectContext default constructor (in “MyProjectEntities.Designer.cs”) to use Configuration Variable (named “EntityFramework”) that I set up on AppHarbor which holds the Entity Framework connectionString like so:

    public MyProjectEntities() : base(ConfigurationManager.AppSettings["EntityFramework"].ToString(), "eTestHubEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    

    Tested and works as I wanted it to work. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know the title is somewhat confusing, my problem is this: I want to
I don't know which title I should use for this question. I have a
I know the title makes this sound very easy, but I have a For
I know the title is a little off, but it's hard to explain the
I know the title of this question is a bit confusing, but here it
When a new class is generated in eclipse a title which may looks like
I have a record that looks similar to: type TNote = record Title :
So I know I butchered the title a bit but if someone looks here
anyone know how to do a listview which looks like this? i can't make
I have a class that looks like this : public partial class Defect {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.