مرجع تخصصی برنامه نویسان

انجمن تخصصی برنامه نویسان فارسی زبان

کاربر سایت

elaheh.nabipour

عضویت از 1395/04/10

خطای رشته اتصال بعد از پابلیش پروژه

  • سه شنبه 7 دی 1395
  • 08:43
تشکر میکنم

رشته اتصال پروژه به صورت

        <add name="x_DBEntities" connectionString="metadata=res://*/Models.MyModel.csdl|res://*/Models.MyModel.ssdl|res://*/Models.MyModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=0.0.0.0;initial catalog=x_db;User ID=x;Password=x;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

اما بعد از پابلیش خطای

The system cannot find the file 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.ComponentModel.Win32Exception: The system cannot find the file specified

Source Error:


 
Line 14: <!-- Wrapper for slides --> Line 15: <div class="carousel-inner" role="listbox"> Line 16: @foreach (var item in Model) Line 17: { Line 18:


Source File: c:\hostingspaces\baafoamc\baafoam.com\wwwroot\Views\Home\ShowSlider.cshtml    Line: 16

Stack Trace:


 
[Win32Exception (0x80004005): The system cannot find the file specified] [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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +6569310 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +717 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) +6595752 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) +219 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +6598102 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) +6598643 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) +942 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +1162

پاسخ های این پرسش

تعداد پاسخ ها : 7 پاسخ
کاربر سایت

ایمان مدائنی

عضویت از 1392/01/20

  • سه شنبه 7 دی 1395
  • 09:39

به شکل زیر بنویسید و تست کنید

    <add name="x_DBEntities" connectionString="metadata=res://*/Models.MyModel.csdl|res://*/Models.MyModel.ssdl|res://*/Models.MyModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=0.0.0.0;initial catalog=x_db;User ID=x;Password=x;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

کاربر سایت

elaheh.nabipour

عضویت از 1395/04/10

  • سه شنبه 7 دی 1395
  • 10:12

The system cannot find the file specified

همان خطای قبل

کاربر سایت

ایمان مدائنی

عضویت از 1392/01/20

  • سه شنبه 7 دی 1395
  • 10:15

به نظرم رشته اتصال درست هست

یه تیکت به پشتیبانی سرور بزنید و ازشون راهنمایی بخواهید

کاربر سایت

elaheh.nabipour

عضویت از 1395/04/10

  • سه شنبه 7 دی 1395
  • 10:24
کاربر سایت

ایمان مدائنی

عضویت از 1392/01/20

  • سه شنبه 7 دی 1395
  • 10:30

در DataSource باید این نام را قرار دهید

کاربر سایت

elaheh.nabipour

عضویت از 1395/04/10

  • سه شنبه 7 دی 1395
  • 10:33

بله دقیقا اصلاح که میکنم رشته اتصال رو خطای The network path was not found میده

کاربر سایت

ایمان مدائنی

عضویت از 1392/01/20

  • سه شنبه 7 دی 1395
  • 11:12

نمونه رشته اتصالتون رو براشون بفرستید تا بررسی کنند

متاسفانه من از تنظیمات سرور اطلاعی ندارم

کاربرانی که از این پست تشکر کرده اند

هیچ کاربری تا کنون از این پست تشکر نکرده است

اگر نیاز به یک مشاور در زمینه طراحی سایت ، برنامه نویسی و بازاریابی الکترونیکی دارید

با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)