.NET Framework - Fehlermeldung beim Aufruf einer Seite

Asked By Dirk Herwig
20-Nov-09 10:26 AM
Hallo,

wir haben auf einen Windows 2003 Server folgende Fehlermeldung, wenn wir
unser aspx Seiten aufrufen:

A network-related or instance-specific error occurred while establishing a
connection to SQL Server. The server was not found or was not accessible.
Verify that the instance name is correct and that SQL Server is configured
to allow remote connections. (provider: SQL Network Interfaces, error: 26 -
Error Locating Server/Instance Specified)

Was muss hier noch eingestellt werden? K?nnt Ihr mir hier weiterhelfen?

Dirk
SQL Server
(1)
Windows 2003 Server
(1)
SqlServices
(1)
ASP.NET
(1)
Parser
(1)
Visual
(1)
Fehlermeldung
(1)
Testsystem
(1)
  Thomas Bandt replied to Dirk Herwig
20-Nov-09 11:14 AM
Dirk Herwig schrieb:

Was willst du wissen - steht ja alles in der Fehlermeldung? Der SQL
Server wird nichtgefunden, also solltest du sehen, dass der richtig
konfiguriert ist und das auch der Connection-String zu ihm korrekt ist.

--
Gruss, Thomas [MVP ASP/ASP.NET]
http://www.69grad.de
  Dirk Herwig replied to Thomas Bandt
20-Nov-09 11:41 AM
Ich habe jetzt den connectionString SQLEXPRESS in SQLEXPRESSKW umbenannt,
jetzt kommt die Meldung:

Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: The entry 'SqlServices' has already been added.

Source Error:


Line 23:  </configSections>
Line 24:  <connectionStrings>
Line 25:   <add name="SqlServices" connectionString="Data
Source=.\SQLEXPRESSKW;AttachDbFilename=D:\gui\App_Data\ASPNETDB.MDF;Integrated
Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
Line 26:  </connectionStrings>
Line 27:  <system.web>

Es ist f?r mich noch Neuland und im Moment nicht einsehbar, wo der Fehler
liegt. Auf unserem Testsystem lief es ohne Probleme.

Dirk
  Stefan Falz [MVP] replied to Dirk Herwig
20-Nov-09 12:20 PM
Hallo Dirk,



warum? Hei?t die SQL Server Express Instanz so?


F?g mal vor <add name="..." das hier ein:



Das ist aber nicht euer Testsystem. Je nach Installation und Konfiguration
kann der ganze Connectionstring falsch sein.


lokale Maschine (also der Webserver), SQL Server Instanz muss SQLEXPRESSKW hei?en.


ganz schlechte idee auf einem Produktivsystem. Ihr solltet die Datenbank im SQL
Server einrichten und die dann direkt ansprechen.


Wird wahrscheinlich nicht funktionieren. Denn ich glaub nicht, dass euch den
SQL jemand so konfiguriert hat. Probier mal den hier:

SERVER=127.0.0.1\SQLEXPRESSKW;UID=<User>;PWD=<Passwort>;DATABASE=<Datenbankname>

Username und Passwort sind in dem Fall von einem SQL Benutzer. Die Datenbank muss
vorher im SQL Server eingerichtet sein (Datenbank anh?ngen)

--
Tschau, Stefan
Microsoft MVP - Visual Developer ASP/ASP.NET
http://www.asp-solutions.de/ - Consulting, Development
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
  Dirk Herwig replied to Stefan Falz [MVP]
20-Nov-09 01:56 PM
Ich bin am verzweifeln. Keine Chance.

Folgende Meldung:
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: The entry 'SqlServices' has already been added.

Source Error:


Line 24:  <connectionStrings>
Line 25:   <remove name="*"/>
Line 26:   <add name="SqlServices"
connectionString="SERVER=AAxxx1\SQLExpressKW;UID=sa;PWD=xxx;DATABASE=AASPNETDB.MDF"
providerName="System.Data.SqlClient"/>
Line 27:  </connectionStrings>
Line 28:  <system.web>


Source File: D:\gui\web.config    Line: 26

Dirk
  Thomas Bandt replied to Dirk Herwig
20-Nov-09 02:57 PM
Dirk Herwig schrieb:

Setze an Stelle von


mal


--
Gruss, Thomas [MVP ASP/ASP.NET]
http://www.69grad.de
  Stefan Falz [MVP] replied to Thomas Bandt
20-Nov-09 03:25 PM
Hallo Thomas,



mittlerweile denke ich eher, dass do wohl noch eine web.config existiert
ggfs. in einem ?bergeordneten Verzeichnis.

Aber so richtig einleuchten will mir das grad nicht.

@Dirk: Benenn doch SqlServices bitte in "AbcTest123" oder sowas um. Also
etwas, was definitiv nirgends anders vorkommen kann.

--
Tschau, Stefan
Microsoft MVP - Visual Developer ASP/ASP.NET
http://www.asp-solutions.de/ - Consulting, Development
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
  Dirk Herwig replied to Stefan Falz [MVP]
24-Nov-09 02:39 PM
Hallo,

Danke f?r die Hilfe. Ich habe alles umbenannt und jetzt klappt es.

Dirk
Create New Account
help
PowerShell and SQL Server .NET Framework Is there a way to list all SQL Server instances installed on a server? Powershell Discussions SQL Server 2008 (1) SQL Server 2005 (1) SQL Server 2000 (1) SQL Server (1) Windows Server (1) SqlServerProviderSnapin100 (1
Conectar sql Server 2000 a Windows Server 2008 .NET Framework Mi pregunta es saber si se puede Conectar sql Server 2000 a Windows Server 2008 desde visual basic ? cual seria el string para hacerlo ? El String que uso para
Using SMO for SQL Server 2008 Express AND SQL Server 2005 Express .NET Framework Hello, We have an application that uses SMO (SQL Server Management Objects) to interact with SQL Server. In the previous version of our product, we only supported connecting to SQL Server 2005
Visual Studio 2008 und SQL Server 2008 Express .NET Framework Habe seit einiger Zeit Visual Studio 2008 mit SQL Server 2005 auf meinem Rechner. Habe nun nachträglich noch SQL Server 2008 Express installiert. Wenn ich jetzt versuche, im Server-Explorer von Visual Studio eine neue SQL-Server Datenbank zu erstellen, bekomme ich die Fehlermeldung 'Diese Serverversion wird nicht unterstützt. Es werden
Error while connecting remote SQL server .NET Framework hi all, I trying to connect remote sql server from my machine. but it giving me some errors Here are few errors listed, = EF error has occurred while establishing a connection to the serve = r = 2E 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 connection