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

  • SEARCH
  • Home
  • 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 7926441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:46:24+00:00 2026-06-03T18:46:24+00:00

I checked this website and I didn’t find any solution. I was made a

  • 0

I checked this website and I didn’t find any solution.
I was made a website with mvc4. I wrote custom data entity.
However, that application works good on localhost but, I cannot use it on a remote server.

here my configurations
web.config connection string

<add name="DefaultConnection" connectionString="Data Source=ipaddress;Initial Catalog=DataContext;User ID=user;Password=pass" providerName="System.Data.SqlClient" />

Here is my DataContext.
That creates new db in local sql server. How I can use remote server with this settings?

public class DataContext : DbContext
{
    public DbSet<Sayfalar> sayfa { get; set; }
    public DbSet<Uyeler> uye { get; set; }
    public DbSet<Roller> rol { get; set; }
    public DbSet<Loglar> log { get; set; }
    public DbSet<Resimler> resim { get; set; }
}

class dbYenile : DropCreateDatabaseIfModelChanges<DataContext>
{
    protected override void Seed(DataContext context)
    {
        MembershipCreateStatus Durum = new MembershipCreateStatus();
        Membership.CreateUser("demo", "123456", "demo@demo.com", "soru", "cevap", true, out Durum);
        Durum = new MembershipCreateStatus();
        Membership.CreateUser("demo1", "123456", "demo1@demo.com", "soru", "cevap", true, out Durum);
        Roles.CreateRole("Yonetici");
        Roles.AddUsersToRoles(new string[] { "demo" }, new string[] { "Yonetici" });
        //Console.WriteLine(Hatalar.uyelikHatalari(Durum));
    }
}

And here Global.asax.cs’s application_start void.

Database.SetInitializer<DataContext>(new dbYenile());
        AreaRegistration.RegisterAllAreas();

        RegisterGlobalFilters(GlobalFilters.Filters);
        RegisterRoutes(RouteTable.Routes);

        BundleTable.Bundles.RegisterTemplateBundles();
  • 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-03T18:46:26+00:00Added an answer on June 3, 2026 at 6:46 pm

    EF uses a database connection by default that is named the same as the class derived from DbContext, which means your connection above should be named “DataContext”, not “DefaultConnection”. if you want to retain the connection name you can add this to your DataContext class:

    
    public DataContext: base("DefaultConnection") {}
    

    otherwise rename your connection string in the web.config to “DataContext”

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

Sidebar

Related Questions

jQuery(.single_writing).each(function(){ jQuery(this).click(function(){ jQuery(#thisTickets).val(); jQuery(#my_iframe).contents().find('.ticket_id').each(function(){ jQuery(this).click(function(){ if (jQuery(this).attr(checked)==true){ jQuery(#thisTickets).val(jQuery(#thisTickets).val()+jQuery(this).attr(id)+, ); } }); }); }) });
I've checked my website html validation in w3.org and got this error Bad value
I have a 2884765579 bytes file. This is double checked with this function, that
I am calling a WebMethod from this code: if($(this).attr(checked)) { .. MyWebMethod(variable1, variable2, onSuccessFunction);
I have the following code: function toggleChecked(status) { $(.checkbox).each( function() { $(this).attr(checked,status); }) }
When I bind a function to a checkbox element like: $(#myCheckbox).click( function() { alert($(this).is(:checked));
Here is my code: $(#myCheckBox).click(function () { if (!$(this).is(':checked')) { $('#txtDateFrom').attr('readonly', true); $('#txtDateTo').attr('readonly', true);
Why this works document.getElementById(myCheckbox).checked = false; whereas this doesn't with jquery: $(myCheckbox).attr(checked) = false;
This is my current scenario: I have checked in my grails app code +
I checked out the three20 source and was trying to follow this guide to

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.