Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > Visual Studio 2005
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 3rd, 2006, 07:49 PM
Registered User
Join Date: Sep 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default VWD 2005 Expr - Go Daddy SQL Server problem

I have been at this for days, truly, calling Go Daddy, researching in Microsoft's ASP.NET forum and now this one.

I built my Web site using Visual Web Developer 2005 Express Edition. It included a SQL database. Go Daddy is my host. I successfully transferred my Web pages to Go Daddy and built a SQL Server in my host account but now cannot create users or log in online on the public site.

Per all of my research, this seems like an incredibly common problem, but all of the solutions are only for people who used one of the kits to buld their site in VWD. I did not use a kit, because the templates did not fit my needs. Therefore, I have no .sql file (that I can find) to copy script into Go Daddy's query analyzer and magically have it work. I am at a brick wall.

Here is my history - is there anyone who can figure out what I've done wrong or have not yet done? Thanks so much for any guidance! dma

1) Per the detailed posts at ASP.NET Forums, this is what I've done so far:
    1. Create your site locally. Include AT LEAST 1 local admin account. **did this and created 2 admins.
   2. Run site using CTRL-F5. **successful build
   3. Log into your GoDaddy hosting account and open the control panel.
   4. Click on ASP.Net runtime and select 2.0
   5. Click Databases > SQL Server > Create New Database.
   6. Select
         1. Check DSN (optional?)
         2. Enter UserName (this will become the database name NOT your hosting login)
         3. Enter Password (again, database password NOT hosting password)
         4. Check "Install Schema Features"
   7. Click Continue > Create Database (it WILL take some time for the database to create itself, you can refresh by clicking the SQL button in the left menu) **successfuly created
   8. Once setup finishes, Click Pencil icon under actions > print this page.
   9. Click Computer icon under actions > record the SQL Connection (.NET) strings
  10. Click Open Manager
  11. Click Connection > Enter the Username and Password from 6 above.
  12. Once connected, expand Tools menu > Click Query Analyzer
  13. Cut & Paste all text from club-add.sql into the Query Analyzer window **have no .sql files to copy text from

**I did this next:
 exec aspnet_Roles_CreateRole '/', 'Admin'
**Admin is the role I created locally - this was successful

Step 2

exec aspnet_UsersInRoles_AddUsersToRoles '/', 'UserNameGoesHere', 'Admin','CurrentDateGoesHere'

  14. Click Submit (you should see many "command(s) completed successfully" below)
**I did this with both Admin usernames previously created locally. Both appear in my Go Daddy SQL Server table, with the proper role assigned.

  15. Go back to VWD and edit default.aspx

  16. Go to Edit > Find & Replace > Quick Replace
**dbo did not exist in any of my files. I see that dbo is listed as the owner of all of the components of the SQL server when I go into my control panel in Go Daddy. I do not know if this is where I'm getting hung up. I tried to do the management at http://weblogs.asp.net/scottgu/archi...25/423703.aspx. The first problem was it did not list ANY SQL dbs in the drop down list, just "default." I proceeded, and it supplied aspnetdb as the database. But when I tried to proceed, I got an error message saying it could not connect to my server.

         1. Find dbo. (NOT Dbo. big difference)
         2. Replace with <blank> (nothing, nada, zip, zero)
         3. Look in: Current Document
  17. Click Replace All (should be 12 or more) > Save default.aspx
  18. Repeat steps 16 & 17 for:
         1. Events_Edit.aspx
         2. Events_View.aspx
**couldn't do any of this, no "dbo"

  19. Open web.config I began again here
         1. Replace original text
                   <add name="ClubSiteDB" connectionString="Data Source=.\SQLExpress;
                         Integrated Security=true;
                         User Instance=True" providerName="System.Data.SqlClient"/>
             With new text
                   <add name="ConnectionString" providerName="System.Data.SqlClient"
                   <remove name="LocalSqlServer"/>
                   <add name="LocalSqlServer" providerName="System.Data.SqlClient"
 **Fixed the connection string. This is what my web.config looks like now:
<?xml version="1.0"?>

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <add key="Failure Text" value="CustomFailText" />
    <add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\CallInFormDatabase.mdf;Integrated Security=True;User Instance=True"
    providerName="System.Data.SqlClient" />
    <add name="NewbieDatabase" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\NewbieDatabase.mdf;Integrated Security=True;User Instance=True"
     providerName="System.Data.SqlClient" />
<add name="ConnectionString" connectionString="
User ID=myuserid;
Trusted_Connection=False" providerName="System.Data.SqlClient" />
<remove name="LocalSqlServer"/>

<add name="LocalSqlServer" connectionString="
User ID=myuserid;
Trusted_Connection=False" providerName="System.Data.SqlClient" />
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.

            Visual Basic options:
            Set strict="true" to disallow all data type conversions
            where data loss can occur.
            Set explicit="true" to force declaration of all variables.
   <allow roles="Admin" />
  <roleManager enabled="true"/>
        <compilation debug="true" strict="false" explicit="true">
                <add assembly="System.Design, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
                <add namespace="System"/>
                <add namespace="System.Collections"/>
                <add namespace="System.Collections.Specialized"/>
                <add namespace="System.Configuration"/>
                <add namespace="System.Text"/>
                <add namespace="System.Text.RegularExpressions"/>
                <add namespace="System.Web"/>
                <add namespace="System.Web.Caching"/>
                <add namespace="System.Web.SessionState"/>
                <add namespace="System.Web.Security"/>
                <add namespace="System.Web.Profile"/>
                <add namespace="System.Web.UI"/>
                <add namespace="System.Web.UI.WebControls"/>
                <add namespace="System.Web.UI.WebControls.WebParts"/>
                <add namespace="System.Web.UI.HtmlControls"/>
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        <authentication mode="Forms" />
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors defaultRedirect="~/errors.aspx">

          <error statusCode="403" redirect="NoAccess.htm" />
               <error statusCode="404" redirect="FileNotFound.htm" />
               <customErrors mode="Off"/>
            <smtp from="Web Master">
    <network host="myhost" password="mypwd" userName="myusername" />

**For db name, I've tried both "aspnetdb" and "ConnectionString" (which is what my current application calls the db locally) in my web.config connection string fix. Neither works. For user identities, I've tried both my db log in id for Go Daddy's SQL Server, as well as the two admin identities I set up locally and at Go Daddy. Those two I have yet to be able to set up through my public site, which remains a missing part of this set up.

       Change <customErrors mode="Off" /> (optional)
       Run CTRL-F5 again. (it will bring up a window with a server error, what you want is to look in the lower left corner of the VWD window for "Build Successful") **yes it builds

       Click Website > Copy Web Site > Connect
       Input your hosting username and password (NOT you database uid and pwd)
       Highlight all files from the left side and click right arrow to transfer.
**all copied over and appear online.

       Go to your public website and create an account for each admin you created on your local database. (make sure the usernames and passwords are the same!!!)
** THIS IS WHERE I'M STUCK. The site will not let me create the account for either of the admins I created. The message seems to be log-in related, and the userid and password in my web.config absolutely match what I use to log into my SQL server db on Go Daddy:
Here is the error I get:

Server Error in '/' Application.
Login failed for user 'myGoDaddySQLServerUserID'.
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: Login failed for user myGoDaddySQLServerUserID.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Login failed for user 'myGoDaddySQLServerUserID'.]
   System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +735059
   System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +188
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
   System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean enlistOK) +33
   System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
   System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
   System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
   System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
   System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject) +496
   System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   System.Web.DataAccess.SqlConnectionHolder.Open(Htt pContext context, Boolean revertImpersonate) +84
   System.Web.DataAccess.SqlConnectionHelper.GetConne ction(String connectionString, Boolean revertImpersonation) +197
   System.Web.Security.SqlMembershipProvider.CreateUs er(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +3612
   System.Web.UI.WebControls.CreateUserWizard.Attempt CreateUser() +305
   System.Web.UI.WebControls.CreateUserWizard.OnNextB uttonClick(WizardNavigationEventArgs e) +105
   System.Web.UI.WebControls.Wizard.OnBubbleEvent(Obj ect source, EventArgs e) +453
   System.Web.UI.WebControls.CreateUserWizard.OnBubbl eEvent(Object source, EventArgs e) +149
   System.Web.UI.WebControls.WizardChildTable.OnBubbl eEvent(Object source, EventArgs args) +17
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) +115
   System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +163
   System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

Old September 5th, 2006, 08:40 PM
Registered User
Join Date: Sep 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

And the answer is...I had the wrong smtp information for Go Daddy in my Web config file.

Old January 2nd, 2007, 09:32 AM
Registered User
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

I assume from your reply above that it works now.

Would it be OK to ask for your website that uses this?

I also have a GoDaddy account (and thus have GoDaddy issues with authentication). I hope to soon be able claim success with this endeavor. Thank you so much for your detailed instructions. I read through everything up to the point where I got stuck and look forward to trying everyhing beyond that.

I would expect your post above to be quite popular for addressing a problem that I'm sure quite a few GoDaddy subscribers face.

Start with something simple that works...

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server 2005 : Query problem wkm1925 SQL Language 1 May 11th, 2008 08:30 AM
SQL Server 2005 Express Problem asped_man BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 November 29th, 2005 05:07 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.