الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

مشكلة عن تشغيل الموقع Error Locating Server/instan

بدأه OEA_73 في 23 سبتمبر 2008 · 8 رد · 2,961 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله وبركاته

المشكلة التى اعنى منها هى انى قمت بتحميل كل الملفات الى السريفر بشكل منظم كل ملف

فى مكانه ،ولكن عند التنفذ خرجة لى هذا الرسالة

<!-- Web.Config Configuration File -->

<configuration>

<system.web>

<customErrors mode="Off"/>

</system.web>

</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>

<system.web>

<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>

</system.web>

</configuration>

عنده قمت بتغيير ملف الكونيفك وأضافة العبارة التالية

<customErrors mode="Off"/>

وذلك لقراءة الخطاء ..؟؟

وعند التفيذ وكتابة اسم المستخدم وكلمة السر ظاهرة لى الرسالة الجديدة التالية ...

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)

الرجاء مساعدتى ....وبارك الله فيكم مقدماً وجزاكم الله خيراً

#2

و عليكم السلام ورحمة الله وبركاته

انا نفس الشي حدث لي و تقريبا نفس الخطا

لكني لم ارفع اي ملف ، اللهم اني قمت بمسح نسخة الفيجوال ويب ديفيلوبر 2008 و قمت بتثبيت النسخة الجديدة مع SP1

و الان كل موقع افتحه و فيه قاعدة بيانات SQL يظهر لي هذا الخطأ:

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)

فقد يكون الخطا في النسخة الحديثة من فيجوال ويب ديفيلوبر والله اعلم..قمت بمسح الاس كيو ال من الكمبيوتر بالكامل وثبته وحدث نفس الخطا

و قمت بمسح الفيجوال بالكامل و ثبته ونفس الشي يحدث

فالي عنده حل يسعفنا فيه بارك الله فيكم.

#3

هذه المشكلة تظهر فقط مع ال Named Instances و ليس مع ال default instance

لو انك تتصل ب remote instance و متاكد من ال connection string و بتعمل ping علي السرفر

احتمال تكون المشكلة في ال firewall

انت محتاج تضيف البورت 1434 UDP في ال firewall exceptions الخاص بالسرفر

و ايضا تأكد ان ال SQL Browser Service يعمل علي ال remote server

بالتوفيق

#4

السلام علبكم

عزيزى AhmedElbaz

بارك الله فيك

لكن الموقع يعمل داخل الجهاز المحلي ، ولكنه لايعمل عند رفعه على السريفر الخارجي اقصد الهوست

فى انتظر ردك

#5

انا العكس

لا يعمل على الجهاز المحلي و يظهر لي الخطا الذي وضعته في المشاركة السابقة

#6
اقتباس
لا يعمل على الجهاز المحلي و يظهر لي الخطا الذي وضعته في المشاركة السابقة

جرب تنفذ الكلام السابق

#7

جربت اخي و مانفع ، اذا كان ممكن تنزل هذا الاستارتر كت بنفسك و تجرب تعمل صفحة وحدة به و تحاول تشغلها اذا كان عندك فيجوال ويب ديفيلوبر 2008 سيرفس باك 1:

http://www.asp.net/downloads/starter-kits/classifieds/

وهذه هي رسالة الخطا كاملة:

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)

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.

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance using a database location within the applications App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:

If the applications App_Data directory does not already exist, the web server account must have read and write access to the applications directory. This is necessary because the web server account will automatically create the App_Data directory if it does not already exist.

If the applications App_Data directory already exists, the web server account only requires read and write access to the applications App_Data directory. This is necessary because the web server account will attempt to verify that the Sql Server Express database already exists within the applications App_Data directory. Revoking read access on the App_Data directory from the web server account will prevent the provider from correctly determining if the Sql Server Express database already exists. This will cause an error when the provider attempts to create a duplicate of an already existing database. Write access is required because the web server accounts credentials are used when creating the new database.

Sql Server Express must be installed on the machine.

The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[sqlException (0x80131904): 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)]

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844759

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194

System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +4858065

System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +90

System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +376

System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221

System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189

System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +4859187

System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnect

ion owningConnection, DbConnectionPoolGroup poolGroup) +29

System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +4861516

System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117

System.Data.SqlClient.SqlConnection.Open() +122

System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +82

[HttpException (0x80004005): Unable to connect to SQL Server database.]

System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +137

System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) +94

System.Web.Management.SqlServices.Install(String database, String dbFileName, String connectionString) +25

System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString) +395

#8

حاولت البحث عن الخطا في منتديات مايكروسوفت الرسمية للاي اس بي دت نت و وجدت هذا الحل:

http://support.microsoft.com/default.aspx/kb/914277

و لما حاولت اتباع الحل اكتشفت ان SQL جزء منه مختفي او خربان في كمبيوتري الشخصي ، فكيف إخواني أنزل النسخة الموافقة للفيجوال ويب ديفيلوبر فقط وليس النسخة الكاملة؟ مع العلم اني مسحته و ثبته اكثر من مرة

تم تعديل هذه المشاركة بواسطة ..محمْد.. في 25 سبتمبر 2008 في 03:45

#9

السلام عليكم اخى العزيز

شكراً فى البداية على الاهتمام

اولاً :يدعم الموقع التالي:-

sqlServer 2005

asp.net Version 2.0.50727.0

وقد قمت فعلاً بعمل Restore لقاعدة البيانات على السيرفر . بعد تاريخ ردك مباشرة

كما انى متأكد 100 فى 100 ان قاعدة البيانات موجودة وتعمل

كما انى عدلت فى ConnectionString

عندها عمل الموقع عادى لكن المشكلة هى انى لااعرف كيف اتعامل مع ملف aspnetdb الخاص بasp.net مافعلته انى غيرة فى اسمه الى lfbankaspnetdbكما انى عدلت فى ConnectionString

فاكانت النتيجة هذا الخطاء

Server Error in '/' Application.

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: Unrecognized attribute 'xmlns'. Note that attribute names are case-sensitive.

Source Error:

Line 11: <appSettings />

Line 12: <connectionStrings>

Line 13: <remove name="LocalSqlServer" xmlns="" />

Line 14: <add name="Con_sing" connectionString="Data Source=.;Initial Catalog=sig;User ID=sig;Password=123456" xmlns="" />

Line 15: <add name="LocalSqlServer " connectionString="Data Source=.;Initial Catalog=lfbankaspnetdb;User ID=lfbankdbusr;Password=Put5oG2zuluz3T" xmlns="" />

Source File: C:\Inetpub\vhosts\lfbank.info\httpdocs\web.config Line: 13

Ver

اما بنسبة لملف Web.config

فهو كاتالي

CODE PHP:

<?xml version="1.0"?>

<!--

Note: As an alternative to hand editing this file you can use the

web admin tool to configure settings for your application. Use

the Website->Asp.Net Configuration option in Visual Studio.

A full list of settings and comments can be found in

machine.config.comments usually located in

\Windows\Microsoft.Net\Framework\v2.x\Config

-->

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<appSettings />

<connectionStrings>

<remove name="LocalSqlServer" xmlns="" />

<add name="Con_sing" connectionString="Data Source=.;Initial Catalog=sig;User ID=sig;Password=123456" xmlns="" />

<add name="LocalSqlServer " connectionString="Data Source=.;Initial Catalog=lfbankaspnetdb;User ID=lfbankdbusr;Password=Put5oG2zuluz3T" xmlns="" />

</connectionStrings>

<system.web>

<!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

Visual Basic options:

Set strict="true" to disallow all data type conversions

where data loss can occur.

Set explicit="true" to force declaration of all variables.

-->

<customErrors mode="Off" />

<roleManager enabled="true" />

<compilation debug="true" strict="false" explicit="true">

<assemblies>

<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

</assemblies>

</compilation>

<pages>

<namespaces>

<clear />

<add namespace="System" />

<add namespace="System.Collections" />

<add namespace="System.Collections.Specialized" />

<add namespace="System.Configuration" />

<add namespace="System.Text" />

<add namespace="System.Text.RegularExpressions" />

<add namespace="System.Web" />

<add namespace="System.Web.Caching" />

<add namespace="System.Web.SessionState" />

<add namespace="System.Web.Security" />

<add namespace="System.Web.Profile" />

<add namespace="System.Web.UI" />

<add namespace="System.Web.UI.WebControls" />

<add namespace="System.Web.UI.WebControls.WebParts" />

<add namespace="System.Web.UI.HtmlControls" />

</namespaces>

</pages>

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

-->

<authentication mode="Forms" />

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm" />

<error statusCode="404" redirect="FileNotFound.htm" />

</customErrors>

-->

</system.web>

</configuration>

<!-- Web.Config Configuration File -->

ارجو مساعدتي وبارك الله فيك

مواضيع مشابهة