Can't get my website to work except locally

Discussion in 'Databases' started by LorJay, Jun 9, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello,

    I am using visual studio express edition. I making a nice website that uses the ASPNETDB.MDF for all those cool asp 2.0 membership and roles stuff.. This uses a SQL express database. OK so far. I have tried and tried to get my website live so I can further test it, but I can't

    People have been helpful, escpecially Bruce from this forum. I need more than help I guess. I really need to get this website up. Can someone please tell me where I can go to hire someone who will talk me through this process. I am not a programmer, I am a hobbyist. I understand SQL to select and update my database, but I can't do the stuff I read in FAQ's. It seems to be written for professionals. I have tried 3 different hosting services none seem to work. Please someone send me a private msg. we can work out terms. I am sure with someone over the phone that knows sql express and visual web developer express will have me up and running in a jiffy. I can send payment via paypal.

    Jason

    PS I bought the add on sql 2005 thing, ran that complicated command line thing, and attached my mdf. I just want a frontpage type solution. Everything else is drag and drop in vwd express why not this?


    This is the error I get when I try to log in. I copied the connection string right from the website maybe I did this wrong

    Server Error in '/' Application.
    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)




    Here is the string

    <connectionStrings>
    <add name='ASPNETDBConnectionString1' connectionString='Data Source=tcp:sql2k508.discountasp.net;Initial Catalog=SQL2005_373924_rebate;User ID=SQL2005_373924_rebate_user;Password=******;'
    providerName='System.Data.SqlClient' />
    </connectionStrings>

    Thanks for looking

    Post Edited (LorJay) : 6/9/2007 5:07:28 AM GMT
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Your connection string is wrong. If you didn't change anything, the default connection name should be LocalSQLServer


    This is what you do,


    1) Make sure you upload / attach the MDF successfully using the control panel tool.


    2) Update your web.config with the following<connectionStrings>
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k508.discountasp.net;Initial Catalog=SQL2005_373924_rebate;User ID=SQL2005_373924_rebate_user;Password=******;" providerName="System.Data.SqlClient" />
    </connectionStrings>


    Make sure you change the password.

    3) Upload your web.config.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Dear Bruce,

    That did the trick. You now have made a happy customer. Thanks for the walkthrough. Now I will be bringing over the 2 other sites I have hosted at other places.

    Jason
     
  4. Bruce

    Bruce DiscountASP.NET Staff

  5. Hi - question that's probably been answered 50 times already but I can't find it..
    Am usingVisual Studio 2005 - not the express version.
    Ready for the 1st real publish :)


    My account with DASP right now has one SQL2005 database allocated.
    In my application I'll use a connection (and the MDF attach) to that SQL for my info and such.
    I've tested that, and it works.

    But - as far as the ASPNETDB - does that require another SQL2005 connection available from me,
    or do I overwrite all theexisting files somewhere that already exist in my accuont ?

    Hope thatmade sense...it all workshere - I just don't want to upload and publish until I know what I'm supposed to do.

    In summary - do I have what I need for my own database tables as well as the ASPNETDB tables or do I need yet another
    SQL DB to be purchased before I can use the app the way it's intended.

    Thanks so much in advance for any help.

    Dave
     
  6. Bruce

    Bruce DiscountASP.NET Staff

    In most cases, you can put your application database schema &amp; the aspnet DB schema on the same database. They usually do not conflict each other.


    In general, this is what you need to do


    1) Use the attach tool to attach your application's data


    2) Manually install the aspnet db. See http://kb.discountasp.net/article.aspx?id=10413


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  7. Almost there...

    Have this error...

    Parser Error Message: 'System.Data.SqlClient' is an unexpected token. Expecting white space. Line 16, position 202.

    Any Ideas ?

    Line 16: <add name="LocalSqlServer" connectionString="Data Source=tcp:sql2k508.discountasp.net;Initial Catalog=SQL2005_377707_******;User ID=SQL2005_377707_******_user;Password=******; providerName="System.Data.SqlClient" />

    LIne 16 was a cut and paste from the one above with my details plugged in...

    so close, yet so far :-(
     
  8. You forgot double quotes after the password and remove the ';' after the password,so the correct connectionstring would be as follows:

    <add name='LocalSqlServer' connectionString='Data Source=tcp:sql2k508.discountasp.net;Initial Catalog=SQL2005_377707_******;User ID=SQL2005_377707_******_user;Password=******' providerName='System.Data.SqlClient' />

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  9. Yes, thank you ! [​IMG]

    I found it and was just on my way back here to report that..

    But -

    Now I have this error, both locally and online, and it's AFTER I "corrected" the webconfig as above

    Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.


    A search on Google reveals this thread: http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx

    Are all those steps required to resolve my issue ??

    Thanks again ,
    Dave
     
  10. Nevermind - I dumped it all and will start over
    The test site I did when I 1st got the dasp account worked, but this one was much bigger and have many more functions, and somewhere along the way I must have messed up.

    No matter - I'll just step back, and just do it over again from scratch...

    Best way to be "best practices" anyway [​IMG]

    Thanks for your responces earlier
     
  11. Attaching another database would overwrite the existing ASPNETDB database.You could have attached the other database first and then created the ASPNETDB schema using the command line utility as specified here in step 2 (http://kb.discountasp.net/article.aspx?id=10413).This way you can have both your product catalog tables as well as ASPNETDB tables on the same database.So in general,any attachment would overwrite the exisiting database .Optionally ,you can create a Sql script,which can generate the product catalog tables without overwriting the ASPNETDB database schema.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  12. Ok, thanks very much-

    I'll go back and reconnect as you mentioned.
    I did read about this solution before but didn't understand it then.

    Thanks again !

    Dave
     
  13. Redid everthing, all works as expected.
    Roles and Permissions are good. ASPNETDBconnection string is correct.


    Question : Now that this is all working, do I need to purchase another DASP database, in order to lets say write a product catalog?


    As mentioned I have the ASPNETBD hooked in, do I need to buy another SQL2005 database to have the next database, or can I simply attach it like
    I did the ASPNETDB and change its connection string accordingly and it will live along with the other one ?


    In other words there would be two connection strings in the web.config.
    Or - do I add fields to one of the ASPNETDB tables and just use them?


    Thx in advance,


    Dave
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page