UTILIZING GO DADDY AND CONNECTION STRINGS

Topics: Help
May 15, 2007 at 11:11 AM
Hello All - This is a newbie question: I have utilized the starter kit and made simple customizations and everything works fine locally. I uploaded the site to go daddy (ASP 2.O activated and SQL Server 2005 Activated)

These are the connection strings that are given:

The following is a list of database connection strings to use with various Sql Server data providers. Cut and paste the connection string to use within your application. For connection strings that require a password, update the password field to the designated password for the database.

ODBC
Driver={SQL Server}; Server=whsql-v21.prod.mesa1.secureserver.net; Database=DB_xxxxxx; Uid=nbhfc; Pwd='your password';
OLE DB, OleDbConnection (.NET)
Provider=sqloledb; Data Source=whsql-v21.prod.mesa1.secureserver.net; Initial Catalog=DB_xxxxxx; User ID=nbhfc; Password='your password';
SqlConnection (.NET)
Data Source=whsql-v21.prod.mesa1.secureserver.net; Initial Catalog=DB_xxxxxx; User ID=nbhfc; Password='your password';

I have run the database publishing wizard after upload. I run a local copy and everything works OK, I get the following error message when trying to hit http://www.nbhfc.org

Line 56: catch ex as Exception
Line 57: if ex.Message = "Invalid object name 'WebContent'." then
Line 58: throw new Exception("The database does not appear to contain WebContent table, this is a feature of the extended ClubSite, please ensure you have run WebContent.SQL against the database")
Line 59: end if
Line 60:


Source File: d:\hosting\huntingfishing\UserControls\WebContent.ascx Line: 58

Stack Trace:


Exception: The database does not appear to contain WebContent table, this is a feature of the extended ClubSite, please ensure you have run WebContent.SQL against the database
ASP.WebContent.Page_Load(Object sender, EventArgs e) in d:\hosting\huntingfishing\UserControls\WebContent.ascx:58
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061


Appreciate any help you could provide this newbie

nonprofit


Coordinator
May 15, 2007 at 6:56 PM
What connection string are you using? You can only use 1 and it HAS to be called ClubDB in the web.config.

Go ahead and put the whole ConnectionString settings here.
May 15, 2007 at 11:22 PM
{quote}
z2bass wrote:
What connection string are you using? You can only use 1 and it HAS to be called ClubDB in the web.config.

Go ahead and put the whole ConnectionString settings here.

The commented out string was the original which works fine locally. Appreciate your input and assistance
{<connectionStrings>
<!--
<add name="ClubSiteDB" connectionString="Data Source=.\SQLExpress;Integrated Security=true;AttachDBFileName=|DataDirectory|ClubDB.mdf;User Instance=True" providerName="System.Data.SqlClient"/>
-->
<add name="ClubSiteDB" connectionString="Data Source=whsql-v21.prod.mesa1.secureserver.net; Initial Catalog=DB_143035; User ID=nbhfc; Password='**********'"/>
</connectionStrings>}
May 18, 2007 at 3:02 PM
Edited May 18, 2007 at 3:03 PM
Here is a sample web.config for reference. Fill in the ######'s with your info. Make sure the password has single quotes around it (they are hard to see). It looks, based on your earlier post, like you are using Go Daddy, so this should work.

<connectionStrings>
<add name="ClubSiteDB" connectionString="Data Source=#####;Initial Catalog=DB####;User ID=#####;Password='#####';TrustedConnection=False" providerName="System.Data.SqlClient"/>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=#####;Initial Catalog=DB#####;User ID=#####;Password='#####';TrustedConnection=False" providerName="System.Data.SqlClient"/>
</connectionStrings>
May 19, 2007 at 10:30 AM
Edited May 19, 2007 at 2:10 PM
I was able to get the connection string to work. The site loads, now the problem is with Admin rights that I have been reviewing from other posts. I realize go daddy is terrible, but could anyone outline the process. You do not have the ability to utilize the asp.net configuration tool when you upload. Would I need to start from scratch assign admin user/s locally then upload and run sql script and setup database or has anyone found a way to add a admin account when site is uploaded and up and running?? Again, I appreciate your help - this site is a great resource

Began from scratch - made sure to add a couple of admin accounts locally I ran the schema.sql file in the query analyzer and received an error messages. It created the tables

Used the database publishing wizard to publish local "ClubDB.mdf" and received back "successful" went to go try the admin accounts with the following error message:

The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.

checked "install schema" on setup and still no luck

Anyone have a idea?
Coordinator
May 19, 2007 at 8:41 PM
Just register a user in your site. Then open the ASP.NET Configuration manager and assign the role "Administrators". That is the last time you have to do that b/c we have a nice role assigner in the admin section of the site.
May 19, 2007 at 11:23 PM
non prfoit,

Check the other posts here or in the asp.net forums for Go Daddy Walk Through. Basically you need to extract a local admin account information from your local development machine use that info to cerate an insert script and run that insert script against your go daddy database.

I posted all of the steps in another discussion item here so it shouldn't be too hard to find. If I recall correctly, step 26 is the key.

May 20, 2007 at 12:41 AM

z2bass wrote:
Just register a user in your site. Then open the ASP.NET Configuration manager and assign the role "Administrators". That is the last time you have to do that b/c we have a nice role assigner in the admin section of the site.

Another stupid question from the newbie - z2bass how do you access the configuration mananager, it is not there when i edit the files through ftp?? another terrible point of go daddy. If I do it locally (create user, and assign role) with the configuration manager; will it work when you post? If you run the schema.sql script, I get error 2147217900 "Incorrect syntax near 'addAttendance'.

I open the schema.sql with notepad edit select all, copy and paste into query analyzer and recieve that error.

I have version 1 up and running. the sql script was processed successful and was able to pull the ids out for my user name and assign administrators rights. I have not had luck with version 2, but i certainly will keep trying. I want to thank you for your comments and suggestions (I will get version 2 with your help) I think its the schema.sql script (do you copy and paste the entire file into query analyzer?
Coordinator
May 20, 2007 at 11:31 AM
The ASP.NET configuration manager doesn't have to be moved. All you need it for is assigning the initial admin with the role "Administrators".

Something you can do is get a copy of the SQL Publishing Wizard. It generates some really nice scripts.

Everytime I used it, however, people complained that it was too big of a file. But they do a great job with generation.

Oh, an since you are using Go Daddy, you might want to generate a .bak file instead of the scripts.
May 25, 2007 at 1:21 PM
rhhanson:
I have followed the steps you mentioned above to get the SQL2005 Connection string to work:
connectionStrings>
<add name="ClubSiteDB" connectionString="Data Source=#####;Initial Catalog=DB####;User ID=#####;Password='#####';TrustedConnection=False" providerName="System.Data.SqlClient"/>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=#####;Initial Catalog=DB#####;User ID=#####;Password='#####';TrustedConnection=False" providerName="System.Data.SqlClient"/>
</connectionStrings> ..............................
Everything worked perfectly when I was working on a Windows 2000 Box..... Last nite I copied the project into my windowsXP and I still get the error ..."Web Content.SQL"..... after trying everything I still get the same error and cannot get the App to open in my browser....
Anything else that I should be trying?
I am sort of new on programming so dont know where else to look in my code.
Thanks,
TCruz345
Jun 5, 2007 at 3:12 AM
tcruz345

Sorry for the delayed response. Took a little much needed vacation.

Not knowing your exact configurations of your boxes makes it hard to troubleshoot your issues. Is your win2k box a server install or a professional install. Do you have SQL2005 on your XP box or SQL express? I would guess the error is being caused by different configurations on the two boxes. The old saying "whats different" holds true.

The example config I provided was for SQL2000/2005.

rhhanson