problems connecting to SQL Server 2005

Last post 06-10-2009 6:52 AM by shahu. 18 replies.

Sort Posts:

  • Re: problems connecting to SQL Server 2005

    07-04-2008, 8:12 AM
    • Star
      7,705 point Star
    • jeremyh
    • Member since 01-23-2003, 12:14 PM
    • York, England
    • Posts 1,379

    Ok what you need todo is add the membership tables to your new database at your hosting site, If you have remote access to your sql server then you can use aspnet_regsql.exe which is covered in the link I gave you before, but if you do not have access to the sql server from your pc then follow the steps in this http://weblogs.asp.net/scottgu/archive/2006/12/22/recipe-deploying-a-sql-database-to-a-remote-hosting-environment-part-1.aspx

    Hope it helps, if you need more ask.

    Regards
    Jeremy
    If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
    That way future readers will know which post solved your issue.
  • Re: problems connecting to SQL Server 2005

    07-15-2008, 12:37 PM
    • Member
      6 point Member
    • markcus2117
    • Member since 07-04-2008, 8:27 AM
    • Posts 5

    Hi Jeremy, - I follow the instruction and it all started to work after my provider eventually let the server know my username and password. I then had to play around with my Web.config a few times but eventually go that to work but when publishing the database "personal" i get an error as follows.

     

    Database Publishing Progress

    - Gathering list of objects to script (Success)

    - Connecting to web service (Success)

    - Scripting objects (Success)

    - Creating table dbo.Photos (Error)
        Messages
        * Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
        The request failed with the error message:
        --
        <?xml version="1.0" ?>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" >
        <head>
           <title>Server Unavailable
        </title>
           </head>
           <body>
              <h1><span style="font-family:Verdana;color: #ff3300">Server Application Unavailable
        </span></h1>
              <p>
               <span style="font-family:Verdana;">
                The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.
        </span></p>
           <p>
           <b>Administrator Note:
        </b> An error message detailing the cause of this specific request failure can be found in the application event log of the web server.  Please review this log entry to discover what caused this error to occur.
         </p>
           </body>
        </html>
       
        --. (System.Web.Services)
       



    and on the website the error 

     

    Could not find stored procedure 'GetNonEmptyAlbums'.

    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 'GetNonEmptyAlbums'.

    Source Error:

    Line 196:				connection.Open()
    Line 197: Dim list As New Generic.List(Of Album)()
    Line 198: Using reader As SqlDataReader = command.ExecuteReader
    Line 199: Do While reader.Read
    Line 200: Dim temp As New Album(CType(reader("AlbumID"), Integer), 0, "", False)

    Source File: \\WEBSHARE4\Webshare4\Users\markeu\webroot\App_Code\PhotoManager.vb    Line: 198
     

  • Re: problems connecting to SQL Server 2005

    07-15-2008, 1:29 PM
    • Star
      7,705 point Star
    • jeremyh
    • Member since 01-23-2003, 12:14 PM
    • York, England
    • Posts 1,379

    Hello,

    Great news that you got a connectionstring working. I have to say I have never seen that first error before
    Have you tried to run the script again?
    Did you check to see if you have a Photos table in the database?
    Also check to see if the stored procedure is in the database?

    Let me know what you find and I will try to help more.

    Regards
    Jeremy
    If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
    That way future readers will know which post solved your issue.
  • Re: problems connecting to SQL Server 2005

    06-10-2009, 6:52 AM
    • Member
      5 point Member
    • shahu
    • Member since 05-18-2009, 1:46 AM
    • Posts 15

    ya its work properly.but still my probleam remain same...i.e

     

    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 connectio

    here my connection string as follow.

     

    <add name="ProjectConnectionString" connectionString="Server=67.228.220.1;Database=agrasenp_agrasenpariwar;User=agrasenP_netinx;Password=agra2009sen#2;Pooling=false; Connect Timeout=60" providerName="System.Data.SqlClient"/>

    <add name="LoggerConnectionString" connectionString="Server=67.228.220.1;Database=agrasenp_agrasenpariwar;User=agrasenP_netinx;Password=agra2009sen#2;Pooling=false;Connect Timeout=60" providerName="System.Data.SqlClient"/>

    Filed under:
Page 2 of 2 (19 items) < Previous 1 2