- Home
- Categorie
- Coding e Sistemistica
- Altri linguaggi per il web
- Problema pubblicazione sito
-
Problema pubblicazione sito
Dunque ho scaricato uno starter kit template dal sito microsoft e l'ho pubblicato tramite visual studio 2005 su uno spazio web aruba(con Db sql server 2005), nel seguente path /nomesito/public/test2/
Ovviamente in locale funziona correttamente. Nella cartella app_data sono presenti 2 files: ASPNETDB.MDF + il log e pubs.mdf + log.
Su sql sever 2005 di aruba ho ricreato le tabelle del db pubs.mdf (senza caricare dati pero').
Ho cercato in rete come settare la stringa di connessione verso il db nel file web.config che attualmente è cosi:<configuration <appSettings/> <connectionStrings> <add name="pubsConnectionString" connectionString="Data Source=xx.xxx.xxx.xx;Initial Catalog=nomeDatabase;User Id=user; Password=xxxxxx;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> </connectionStrings> <system.web> <customErrors mode="Off"/> <compilation debug="true"/> <authentication mode="Windows"/> <pages pageBaseType="PageBase" /> <anonymousIdentification enabled="true" /> <profile enabled="true"> <properties> <!-- Available values for the StyleSheetTheme attribute: "Green", "Brown", "Red".--> <add name="StylesheetTheme" defaultValue="Green" allowAnonymous="true" /> </properties> </profile> </system.web> </configuration>
ma quando tento di accedere al sito appare sempre la seguente pagina di errore:
Server Error in '/public/test2' 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Source Error: The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL: 1. Add a "Debug=true" directive at the top of the file that generated the error. Example: <%@ Page Language="C#" Debug="true" %> or: 2) Add the following section to the configuration file of your application: <configuration> <system.web> <compilation debug="true"/> </system.web> </configuration> Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode. Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario. Stack Trace: [SqlException (0x80131904): 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +685966 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +109 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +383 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197 System.Web.Profile.SqlProfileProvider.GetPropertyValuesFromDatabase(String userName, SettingsPropertyValueCollection svc) +766 System.Web.Profile.SqlProfileProvider.GetPropertyValues(SettingsContext sc, SettingsPropertyCollection properties) +428 System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider) +410 System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName) +117 System.Configuration.SettingsBase.get_Item(String propertyName) +89 System.Web.Profile.ProfileBase.GetInternal(String propertyName) +36 System.Web.Profile.ProfileBase.get_Item(String propertyName) +68 PageBase.get_StyleSheetTheme() +26 System.Web.UI.Page.InitializeStyleSheet() +36 System.Web.UI.Page.FrameworkInitialize() +16 ASP.default_aspx.FrameworkInitialize() +26 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +40 System.Web.UI.Page.ProcessRequest() +86 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.default_aspx.ProcessRequest(HttpContext context) +29 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
Non Riesco proprio a venirne a capo. Spero vivamente con il vostro aiuto di risolvere.
Grazie 1000
-
Ciao, su aruba la stringa di connessione dovrebbe fartela vedere da qualche parte, in particolare su connessioni informazioni di connessione.
-
@cali1981 said:
Ciao, su aruba la stringa di connessione dovrebbe fartela vedere da qualche parte, in particolare su connessioni informazioni di connessione.
Grazie per aver risposto, la stringa riportata su informazioni di connessione è la seguente:
**Stringa di Connessione : **Data Source=xx.xxx.xxx.xx;Network Library=;Connection Timeout=15;Packet Size=4096;Integrated Security=no;User ID=MSSql25007;Encrypt=no;Initial Catalog=;
Ho provato a sostituirla e in seguito anche aggiungendo Database=nomeDB ma l'errore 26 persiste
-
A quella stringa dfevi aggiungere anche la password del db
-
@cali1981 said:
A quella stringa dfevi aggiungere anche la password del db
Provando anche con la password del db da sempre lo stesso errore
-
Io uso
Data Source=xx;Network Library=dbmssocn;Connection Timeout=15;Packet Size=4096;Integrated Security=no;User ID=xx;Encrypt=no;Password=xx;
-
@cali1981 said:
Io uso
Data Source=xx;Network Library=dbmssocn;Connection Timeout=15;Packet Size=4096;Integrated Security=no;User ID=xx;Encrypt=no;Password=xx;
Sempre errore 26 ho provato ad usare questa:
<connectionStrings>
<addname="pubsConnectionString"connectionString="Data Source=xx;Network Library=dbmssocn;Connection Timeout=15;Packet Size=4096;Integrated Security=no;Database=nomeDB;User ID=xx;Encrypt=no;Password=xx;"providerName="System.Data.SqlClient" />Comunque nel pannello di admin su aruba su connessione riporta la seguente stringa:
(ho provato anche con questa aggiungendo il nome del db , senza esito positovo pero')**Stringa di Connessione : **Data Source=xx;Network Library=;Connection Timeout=15;Packet Size=4096;Integrated Security=no;User ID=xx;Encrypt=no;
**Timeout di Connessione : **15
**Database : **nomedb
**Sorgentedati : **xx
**Dimensione pacchetto rete : **4096
**Versione Server : **09.00.3054
**Id postazione di Lavoro : **MSSQL