PDA

View Full Version : آپلود سایتی که بانکش به صورت database File هست



saber4166
شنبه 21 تیر 1393, 11:33 صبح
سلام بر دوستان
>>بنده یه سایتی طراحی کردم که بانکش از نوع sql و نحوه فراخوانی و استفاده بانک به صورت database File و فایل sql رو هم در پوشه APP_Dat قرار دادم یعنی در sql بانک attach نمیکنم،
درستورات کانکشن و...



<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="myConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\dbtestS.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<sessionState mode="InProc" cookieless="UseCookies" timeout="60"></sessionState>
<httpCookies httpOnlyCookies="true"/>
<customErrors mode="Off"></customErrors>
<trace enabled="false" localOnly="true"/>
<compilation debug="false" targetFramework="4.0"/>
</system.web>
</configuration>



>>حالا برای آپلود کردنش توی سایت مشکل دارم البته آپلود میشه و صفحاتی که با بانک اطلاعات کاری ندارن اجرا میشن اما صفحاتی که با بانک کا دارن خطا میده
و خطاش

Server Error in '/' Application.

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)

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.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject) +1019
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +108
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection,
DbConnectionFactory connectionFactory) +126
System.Data.SqlClient.SqlConnection.Open() +125
System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset, DataTable[] datatables, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +123
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords,
String srcTable, IDbCommand command, CommandBehavior behavior) +319
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92
MasterPageView.Page_Load(Object sender, EventArgs e) +1471
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

rezaei_y
شنبه 21 تیر 1393, 14:32 عصر
دوست عزیز شما باید کانکشن استرینگ رو مطابق تنظیمات هاست تغییر بدین

داخل هاستتون یک یوزر و یک دیتابیس بسازید و بانکتون رو اونجا ایجاد کنید یا از طریق بکاپ یا هر روش دیگه

و اطلاعات اون بانک اطلاعاتی رو داخل کانکشن بنویسید البته Data Source هم تغییر میکنه اطلاعات رو باید از شرکتی بگیرید که هاست رو از اونجا خریدید