PDA

View Full Version : سوال: اتصال بانک sqlExpress به IIS



teardrop
سه شنبه 24 اسفند 1389, 16:34 عصر
به نام خدا

با سلام
من در web.config اطلاعات زیر رو دادم:


<?xml version="1.0" encoding="UTF-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<authentication mode="Forms" />
<authorization>
<allow roles="Administrator" />
</authorization>
<roleManager enabled="true" />
<compilation debug="true" targetFramework="4.0" />
</system.web>
<connectionStrings>
<remove name="LocalSqlServer" />
<add connectionString="Data Source=HR-PC\SQLEXPRESS;Integrated Security=SSPI;AttachDbFilename=&quot;G:\inetpub\wwwroot \d\App_Data\ASPNETDB.MDF&quot;;User Instance=True" name="LocalSqlServer" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>


و وقتی صفحه ی وب رو با IIS اجرا میکنم خطای زیر رو میده :


Server 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:

لطفا اگر میتونید جواب من رو بدید؟!
با تشکر