ورود

View Full Version : Server Error in '/' Application.



hepyanlizm
دوشنبه 08 اردیبهشت 1393, 03:43 صبح
سلام دوستان من اسمم سمیرا هست و هیچی از برنامه نویسی نمیدونم وب سایتم صفحاتی که با ای اس پی ساخته شده باز نمی کنه خطای وب کانفینگ میده نمیدونم چجوری درستش کنم دیتابیس من در این مسیر قرار داره wwwroot/app_data_/database.mdfچند روزه سایتم رو هواست لطفا کمکم کنید مرسیhttp://barnamenevis.org/images/smilies/yahoo/123.gifServer Error in '/' Application.Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.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: Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.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): Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.] System.Data.ProviderBase.DbConnectionPool.TryGetCo nnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +414 System.Data.ProviderBase.DbConnectionPool.TryGetCo nnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78 System.Data.ProviderBase.DbConnectionFactory.TryGe tConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +196 System.Data.ProviderBase.DbConnectionInternal.TryO penConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +146 System.Data.ProviderBase.DbConnectionClosed.TryOpe nConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +16 System.Data.SqlClient.SqlConnection.TryOpenInner(T askCompletionSource`1 retry) +94 System.Data.SqlClient.SqlConnection.TryOpen(TaskCo mpletionSource`1 retry) +110 System.Data.SqlClient.SqlConnection.Open() +96 System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +316 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +86 System.Web.UI.WebControls.SqlDataSourceView.Execut eSelect(DataSourceSelectArguments arguments) +1481 System.Web.UI.WebControls.BaseDataList.GetData() +56 System.Web.UI.WebControls.DataList.CreateControlHi erarchy(Boolean useDataSource) +173 System.Web.UI.WebControls.BaseDataList.OnDataBindi ng(EventArgs e) +63 System.Web.UI.WebControls.BaseDataList.DataBind() +54 System.Web.UI.WebControls.BaseDataList.EnsureDataB ound() +74 System.Web.UI.WebControls.BaseDataList.CreateChild Controls() +72 System.Web.UI.Control.EnsureChildControls() +83 System.Web.UI.Control.PreRenderRecursiveInternal() +42 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408

esteghamat
دوشنبه 08 اردیبهشت 1393, 08:40 صبح
ارتباط با Sql server اصلا نياز به مسير نداره .
از اين چيزي نمي شه فهميد.حداقل Connection String رو بذار.

hepyanlizm
دوشنبه 08 اردیبهشت 1393, 10:46 صبح
ارتباط با Sql server اصلا نياز به مسير نداره .
از اين چيزي نمي شه فهميد.حداقل Connection String رو بذار.
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0">
</compilation>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>"/></system.web>
</configuration>
اسم سایتم هم iranturkiye.ir لطفا کمکم کنید

esteghamat
چهارشنبه 10 اردیبهشت 1393, 08:40 صبح
سلام
درسته چون sqlexpress هست، نياز به آدرس فايل داره، در مجموع Connection string هم درسته فقط دو تا اشكال كوچك در زمان آدرس دهي فايل داشتي كه رفع شده تست كن ببين درست شده :

<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient” />