|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Sep 2007
Messaggi: 312
|
[ASP .NET] Aruba e web.config + connessione sql
Ciao a tutti.
Come sempre quando ho dei problemi vengo qua a riempirvi di domande! he he Ok senza tanti complimenti vengo subito al sodo: ho acquistato uno spazio web (hosting windows) su aruba, e sto impazzendo sul file web.config in un applicazione asp .net (che su un altro provider free funzionava perfettamente). 1) Questa e' la connection string nel web.config: Codice:
<connectionStrings>
<add name= "sqlserver" connectionString="Data Source=62.xxx.xxx.xxx;database=Sqlxxxxxxx_1;uid=Sxxxxxxx;pwd=xxxxx;"/>
</connectionStrings>
Codice:
Dim strConnString As String = ConfigurationManager.ConnectionStrings("sqlserver").ConnectionString
Dim SQLConn As New SqlConnection() 'The SQL Connection
Dim SQLCmd As New SqlCommand("SELECT * FROM Utenti", SQLConn) 'The SQL Command
Dim SQLobjreader As SqlDataReader 'The Local Data Store
SQLConn.ConnectionString = strConnString 'Set the Connection String
SQLConn.Open() 'Open the connection
SQLCmd.Connection = SQLConn
'SQLCmd.CommandText = "SELECT * FROM Utenti" 'Sets the SQL String
SQLobjreader = SQLCmd.ExecuteReader() 'Gets Data
Do While SQLobjreader.Read
If SQLobjreader.GetString(0) = txtUserID.Text And SQLobjreader.GetString(1) = txtPassW.Text Then
Session.Timeout = "500000"
Session("username") = txtUserID.Text
SQLConn.Close()
SQLConn.Dispose()
Response.Redirect("xxxxxxx.aspx")
End If
Loop
Codice:
Si è verificato un errore di rete o specifico dell'istanza mentre si cercava di stabilire una connessione con il server SQL. Il server non è stato trovato o non è accessibile. Verificare che il nome dell'istanza sia corretto e che il server SQL sia configurato in modo da consentire connessioni remote. (provider: Provider Named Pipes, error: 40 - Impossibile aprire una connessione a SQL Server) Sicuramente sto facendo uno dei miei soliti errori stupidissimi e banali, ma dopo mille ricerce su google, manuali, help desk aruba etc non ci sono ancora arrivato. Grazie in anticipo per l'aiuto che saprete darmi. Ultima modifica di Diablo-IT : 14-10-2009 alle 18:25. |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 16:20.


















