godaddy help

Last post 06-23-2007 1:51 PM by zakman411. 3 replies.

Sort Posts:

  • Confused [8-)] godaddy help

    06-23-2007, 12:23 AM
    • Loading...
    • zakman411
    • Joined on 06-21-2007, 9:23 PM
    • California
    • Posts 52

    hey everyone,

    I've been trying to get a modified club site starter kit to run on godaddy web hosting, but so far no luck. I have read a few other posts on this forum, as well as other forums, and im a little lost. I have tried creating my own from scratch, and it works until I try to use database interaction. I tried putting a modified MySql.Data.dll file in my bin folder (read that this will help with medium trust problems on Godaddy hosting), but no luck. I have the deluxe hosting on Godaddy, so I know the club site is supposed to work (its on the features list on GD), so Im obviously doing something wrong. I have created an SQL server on my account (through GD), and I have the information, but i was told I shouldnt have to create a server, it would be made for me by ASP.NET 2005 Express (says godaddy rep). As of right now, my site wont even go to the default page, it says that there is an application error. I have called godaddy atleast 6 times regarding this, and they dont know whats going on, so I have no idea what to do. Any help!?

    Thanks in advance 

     -----EDIT----

    Ok, I got debugging to work and I figured out the exact error. Here it is:

    Server Error in '/ClubWebSite1' 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    Source Error:

    Line 4:  
    Line 5: Sub Application_Start(ByVal sender As [Object], ByVal e As EventArgs)
    Line 6: If (Roles.RoleExists("Administrators") = False) Then
    Line 7: Roles.CreateRole("Administrators")
    Line 8: End If

     Now I'm still stuck. This error must have happened because my the club site cant connect to the DB, right? Here is my web.config file:

     

    <?xml version="1.0"?>
    <configuration>
      <location path="events_edit.aspx">
        <system.web>
          <authorization>
            <allow roles="Administrators"/>
            <deny users="*"/>
          </authorization>
        </system.web>
      </location>
      <location path="locations_edit.aspx">
        <system.web>
          <authorization>
            <allow roles="Administrators"/>
            <deny users="*"/>
          </authorization>
        </system.web>
      </location>
      <location path="news_edit.aspx">
        <system.web>
          <authorization>
            <allow roles="Administrators"/>
            <deny users="*"/>
          </authorization>
        </system.web>
      </location>
      <location path="photoalbum_new.aspx">
        <system.web>
          <authorization>
            <allow roles="Administrators"/>
            <deny users="*"/>
          </authorization>
        </system.web>
      </location>
      <location path="member_list.aspx">
        <system.web>
          <authorization>
            <deny users="?"/>
          </authorization>
        </system.web>
      </location>
      <location path="member_details.aspx">
        <system.web>
          <authorization>
            <deny users="?"/>
          </authorization>
        </system.web>
      </location>
      <connectionStrings>
        <add name="ClubSiteDB" connectionString="Data Source=XXXXXXXX.shr.phx3.secureserver.net;Initial Catalog=DB_1014278;User ID=tyson;Password='XXXXXXX';Trusted_Connection=False" providerName="System.Data.SqlClient"/>

        <remove name="LocalSqlServer"/>
        <add name="LocalSqlServer" connectionString="Data Source=XXXXXXXX.shr.phx3.secureserver.net;Initial Catalog=DB_1014278;User ID=tyson;Password='XXXXXXX';Trusted_Connection=False" providerName="System.Data.SqlClient"/>

      </connectionStrings>
      <system.web>
        <roleManager enabled="true"/>
        <authentication mode="Forms"/>
        <compilation debug="true" strict="true">
          <assemblies>
            <add assembly="System.Xml, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Messaging, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
          </assemblies>
        </compilation>
        <membership defaultProvider="AspNetSqlMembershipProvider"/>
        <siteMap defaultProvider="AspNetXmlSiteMapProvider" enabled="true">
          <providers>
            <remove name="AspNetXmlSiteMapProvider"/>
            <add name="AspNetXmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider" securityTrimmingEnabled="true" siteMapFile="Web.sitemap"/>
          </providers>
        </siteMap>
            <customErrors mode="Off" defaultRedirect="ErrorPage.htm"/>
            <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
        </system.web>
    </configuration>

     

    -Zach Spitulski-
  • Re: godaddy help

    06-23-2007, 6:12 AM
    • Loading...
    • TATWORTH
    • Joined on 02-04-2003, 1:34 PM
    • England
    • Posts 6,474

    Your posting has just appeared with a tick against it - have you solved the problem on your own? 

    Don't forget to click "Mark as Answer" on the post that helped you.
    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
  • Re: godaddy help

    06-23-2007, 6:36 AM
    • Loading...
    • Pegasus82
    • Joined on 03-26-2007, 2:34 PM
    • Posts 3

    You probably need to do the following steps. You might have trouble if you did not create any administrator accounts on the local version of your website before you uploaded it to GoDaddy. I just sent you a walkthrough which explains this in more detail.

     

    1. Copy the following T-SQL statement into the Query Analyser window:

    SELECT RoleId FROM aspnet_Roles WHERE RoleName = 'Administrators'

    Click Submit and save the return value for use in step 3.

    Click Reset.

    2. Copy the following T-SQL statement into the Query Analyser window:

    SELECT UserId FROM aspnet_Users WHERE UserName=’username’

    Replace <username> with the user name of the account to which administrator privileges will be granted.

    Retain the single quotation marks around this case-sensitive value.

    Click Submit and save the return value for use in step 3.

    Click Reset.

    3. Copy the following T-SQL statement into the Query Analyser window:

    INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES ('<roleID>', '<userID>')

    EXAMPLE: INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES ('7321ED9B-64FB-47C2-B139-2AF810678D59', 'E421C366-2905-40FC-8543-0AA618FEE17E')

     

    Replace <roleID> with the return value from step 1.

    Replace <userID> with the return value from step 2.

    Retain the single quotation marks around these values.

    Click Submit.


     

  • Re: godaddy help

    06-23-2007, 1:51 PM
    Answer
    • Loading...
    • zakman411
    • Joined on 06-21-2007, 9:23 PM
    • California
    • Posts 52

    Pegasus82:

    You probably need to do the following steps. You might have trouble if you did not create any administrator accounts on the local version of your website before you uploaded it to GoDaddy. I just sent you a walkthrough which explains this in more detail.

     

    1. Copy the following T-SQL statement into the Query Analyser window:

    SELECT RoleId FROM aspnet_Roles WHERE RoleName = 'Administrators'

    Click Submit and save the return value for use in step 3.

    Click Reset.

    2. Copy the following T-SQL statement into the Query Analyser window:

    SELECT UserId FROM aspnet_Users WHERE UserName=’username’

    Replace <username> with the user name of the account to which administrator privileges will be granted.

    Retain the single quotation marks around this case-sensitive value.

    Click Submit and save the return value for use in step 3.

    Click Reset.

    3. Copy the following T-SQL statement into the Query Analyser window:

    INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES ('<roleID>', '<userID>')

    EXAMPLE: INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES ('7321ED9B-64FB-47C2-B139-2AF810678D59', 'E421C366-2905-40FC-8543-0AA618FEE17E')

     

    Replace <roleID> with the return value from step 1.

    Replace <userID> with the return value from step 2.

    Retain the single quotation marks around these values.

    Click Submit.


     

     

     

    Yes, this was the case actually. Someone emailed me and told me the exact steps to doing this. I will post it below, in case anyone else needs to see it.

     

     

    1. Create your site locally.  Include AT LEAST 1 local admin account.
       2. Run site using CTRL-F5.
       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)
       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

     

      14. Click Submit (you should see many "command(s) completed successfully" below)

      15. Go back to VWD and edit default.aspx
      16. Go to Edit > Find & Replace > Quick Replace
             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
      19. Open web.config
             1. Replace original text
                   1.

                      <add name="ClubSiteDB" connectionString="Data Source=.\SQLExpress;

                            Integrated Security=true;

                            AttachDBFileName=|DataDirectory|Club.mdf;

                            User Instance=True" providerName="System.Data.SqlClient"/>
             2.

                With new text
                   1.

                      <add name="ClubSiteDB" providerName="System.Data.SqlClient"

                            connectionString="server=whsql-v04.prod.mesa1.secureserver.net;

                            database=DB_12345;

                            uid=myusername;

                            pwd=mypassword"/>

                      <remove name="LocalSqlServer"/>

                      <add name="LocalSqlServer" providerName="System.Data.SqlClient"

                            connectionString="server=whsql-v04.prod.mesa1.secureserver.net;

                            database=DB_12345;

                            uid=myusername;

                            pwd=mypassword"/>
      20.

          Change <customErrors mode="Off" /> (optional)
      21.

          Save!!!
      22.

          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")
      23.

          Click Website > Copy Web Site > Connect
      24.

          Input your hosting username and password (NOT you database uid and pwd)
      25.

          Highlight all files from the left side and click right arrow to transfer.
      26.

       *   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!!!)
      27.

          Log back into Query Analyzer
      28. To Grant Administrator Privileges to an ASP.NET 2.0 User Account

       1. Log in to your Account Manager.
       2. Under the Hosting & Email section, select Hosting Account List.
       3. Next to the hosting account you want to modify, click Open.
       4. Under the Databases section of the Hosting Manager, click the SQL Server icon.
       5. Next to the name of your SQL Server database, click Open Manager. The SQL Server Web Admin tool displays.
       6. In the tree on the left, expand the Connection folder and select Connection.
       7. Enter the User Name and Password for your database. You created your user name and password when you set up your SQL server database.
       8. Expand the Tools folder on the left and select Query Analyser.
       9. Copy the following T-SQL statement into the Query Analyser window:

          SELECT RoleId FROM aspnet_Roles WHERE RoleName = 'Administrators'

          Click Submit and save the return value for use in step 11. Click Reset.
      10. Copy the following T-SQL statement into the Query Analyser window:

          SELECT UserId FROM aspnet_Users WHERE UserName=’username’

          Replace <username> with the user name of the account to which administrator privileges will be granted. Retain the single quotation marks around this case-sensitive value. Click Submit and save the return value for use in step 11. Click Reset.
      11. Copy the following T-SQL statement into the Query Analyser window:

          INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES ('<roleID>', '<userID>')
    EXAMPLE: INSERT INTO aspnet_UsersInRoles (RoleId, UserId) VALUES ('7321ED9B-64FB-47C2-B139-2AF810678D59', 'E421C366-2905-40FC-8543-0AA618FEE17E')

          Replace <roleID> with the return value from step 9. Replace <userID> with the return value from step 10. Retain the single quotation marks around these values. Click Submit.

     

    Doing these steps did get the club site to work properly on godaddy. At step 16, I kept having like 75 critical errors, but when i manually deleted dbo., it worked. So if anyone had this problem, try using the find tool, and delete it yourself. Thank you to everyone in this forum for their help! Especially Geoff 

     

    -Zach Spitulski-
Page 1 of 1 (4 items)
Microsoft Communities
Page view counter