connection string works on local but not on webserver(ASP.NET)

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default connection string works on local but not on webserver(ASP.NET)

    I'm trying to get some data out of SQLServer on our Webserver.
    It wasn't working so I built the database on my local machine.
    The code pages are on my C: drive and the virtual folders are in IIS
    running on my local machine.

    The following connection string works fine (TRHXP210 is my maching
    name):-

    Private Const m_strConnection As String = "Password=;Persist
    Security Info=True;" & _
    "User ID=sa;Initial
    Catalog=Committee;" & _
    "Data Source=TRHXP210;" &
    _
    "Network Library=dbmssocn"

    The problem is if I change the Data Source to =TRDCLGA6 (our webserver
    name) and run the page I get the following Error:-
    System.Data.SqlClient.SqlException: SQL Server does not exist or
    access denied.

    The code files are on my local machine - could it be that I have to
    build everything locally then disconnect the database, deploy the app
    on the server, then re-attach the db on the remote instance of
    SQLServer?
    Should I be able to pull data from the remote server? It works with my
    ASP pages!??
    Can anyone help please.
    TIA
    Hitcher Guest

  2. Similar Questions and Discussions

    1. GD demo cgi script works on command line but not on webserver.
      Hi all, I recently installed GD version 2.34. The installation process went well, except that it said, it cannot find -liconv library. It also said...
    2. Need HELP on Configuration for access freeBSD webserver from Local LAN...
      Need help on config. to access freesbsd webserver configuration lay out: 2 DSL router , one freebsd WK running bsd web. port 8080. here is the...
    3. SQUID - redirect to local webserver
      Hi, i had no success with google and ansking a german newsgroup :-( Scenario: FreeBSD 4.10 Router (IPF, SQUID, BIND) - 2 Interfaces (PPPoE...
    4. Forms cache to local drive, not webserver?
      We solved this problem, originally with Acrobat 4 as follows: After the form is submitted to the server, return to the client an FDF file with the...
    5. SQL Server connection string works with IIS 5.1 but not IIS 6 in ASP.NET
      Hello, I have a very simple aspx file that runs on WinXP Pro IIS 5.1 and connects to a SQL Server 2k DB running on a Win2003 Server box. It works...
  3. #2

    Default Re: connection string works on local but not on webserver(ASP.NET)

    [url]http://www.aspfaq.com/5002[/url]


    > System.Data.SqlClient.SqlException: SQL Server does not exist or
    > access denied.

    Aaron Bertrand - MVP Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139