Visual Web Developer Express -> Discount ASP (How do you host a website using SQL Express?)

Discussion in 'ASP.NET 2.0' started by vvsharma, Mar 12, 2007.

  1. Have you web application refer your live MS SQL database instead.You can modify the connection string in your web.config to make this change.
    i.e

    Replace:
    <add name='XXXX' connectionString='Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\classifiedsdb.mdf;Integrated Security=True;User Instance=True' providerName='System.Data.SqlClient' />
    By
    <add name='XXXX' connectionString='Data Source=<sql server name>.discountasp.net;Initial Catalog=<DB_Name>;User ID=<db_user>;Password=<DB_password>' />
    in your web.config.

    Before your membership feature can work correctly,you need to have the membership schema on your MS SQL database.

    See: http://kb.discountasp.net/article.aspx?id=10413 for more info.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  2. Hi there,

    I would like to host my website online. I built it using the built in membership features using SQL Express. I understand this is not going to work when I try and host this in the live environment. What steps do I need to take for it to work?

    Many thanks,
    Will
     
  3. We do have a 'Attach MDF' functionality within our SQL Tool Suite (MS SQL 2005) which lets you attach your MDF file to our MS SQL database.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. Does the 'Automated Attach MDF File Tool' come into any use?
     
  5. I tried using that tool. I attached the database but how do I know if it works? Will the roles and access levels be copied over too? Does that mean all I have to do is change the database connection string in the web.config file and it will work?
     
  6. Bruce

    Bruce DiscountASP.NET Staff

  7. So if I follow this article first, then use the Attach MDF File Tool, it will work?
     
  8. The kb article is useful if you are starting from scratch. It creates the users/roles directly on your DiscountASP SQL 2005 database. This is the recommended way.

    If you attach your existing membership database then all you need is to change the connection string as indicated in the kb article.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page