Discussion in 'Site Programming, Development and Design' started by Kraphics, Apr 26, 2010.

  1. My local development website uses the database file located in the applications APP_Code folder.
    My wish is to continue this practice now that I've published my web site.
    Is this practical ?
    The instructions that I find are convoluted, or incomplete in describing how to use the remote IIS management studio, and I don't have SQL Server installed on the local development computer so how would SQL Server Management studio Express help?

    Please Help,

  2. Ray


    Last edited by a moderator: Oct 14, 2015
  3. I was in the same boat at you were a week ago when I tried to setup my very first Web app. Winhost and most other companies out there won't let you run the DB in SQLExpress/file attachment.
    Here is what you need to do
    -In your development PC you can continues to use file attachment method to access your Database. Because Winhost basic plan will only allow you to have 1 SQL Database so if you use the Membership (ASPNETDB) then you must combine this into your main Database search on google for the steps.
    -Whe you are ready, from VS you create script to create your Database to be used to upload to Winhost this is where you will need to download the SQL Mgmt Studio to connect to the Winhost SQL Server. Follow the instructions provided by Winhost it works for me.
    -If you get errors trying to connect to the remote SQL server, then most likely your firewall block it, I have to lower my router firewall from medium to low temporary so I can connect to Winhost SQL Server to upload my Database after it completed I turn my security level back up to Med-High.

    btw, SQL Express 2008 is free, I use it too just to make sure my DB works before I move it to the real SQL Server.

    Good luck.
    Last edited by a moderator: Oct 14, 2015
  4. Ray


    Last edited by a moderator: Oct 14, 2015
  5. Microsoft does not license SQL Express for use in shared hosting so it's not an option we could offer.

    It's odd, considering so many of their development tools use SQL Express, but it's their game, so they make the rules.
  6. well, actually, it's only matter of changing connection string

    using dedicated SQL server has a lot of advantages, while attached file has a lot of disadvantes

    Thanks to Winhost for providing direct access to SQL server, you can even develop against Winhost's SQL server in the first place, so publishing process will be really smooth and effortless.

    So I would personally recommend giving up on practice of using attached sql datafiles.

    remember, that sql-queries against attached datafile utilize CPU on the same server (which is shared web server), that will make your site slower. when you go live you have a chance of overwriting your live database file with development file, with no backup chance. and many reasons more.
    Last edited by a moderator: Oct 14, 2015
  7. Role manager not working...

    OK...OK... I've scripted my development database and all of the stored procedures that are built to aid in the User and Roles maagement.

    I've used SQL Server Management Studio to run the above mentioned scripts on my Winhost account. Things seems to have went well, but when I attempt to use my web site to Register a new user I get the following error message:

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
    Last edited by a moderator: Oct 14, 2015
  8. Ray


    The error means that some where in your application it is looking for a SQL Express database. Most .Net applications by default is setup like this. You will need to go through your coding and make sure all your connection strings are setup to point to our SQL server and not a SQL Express server.

Share This Page