PDA

View Full Version : مشکل در دیتا بیس ASPNETDB



jiljil
جمعه 16 فروردین 1387, 15:58 عصر
با تشکر از تمامی دوستان عزیز
من دو تا دیتابیس دارم یکی برای درج اطلاعات و یکی برای ورود مدیر به سایت
دیتابیس اولی را در Web.config را بصورت زیر قرار دادم و دیتابیسی را که در Cpanel ساخته بودم در Enterprise Manager برایش جدول تعریف کردم و حالا می توانم اطلاعات را وارد سایت کنم.
اما مشکلی که دارم اینست که مدیر سایت نمی تواند در سایت Login کند.
اول اینکه من نمی توانم مثل بالا در Cpanel دیتابیسی بنام ASPNETDB بسازم (با نام های دیگر می شود اما با این نام نه) و خطای زیر را می گیرد:

Unable to add database as it already exists. Please enter a new database name and try again.

من در wwwroot پوشه ای به نام App_Data دارم که ASPNETDB_LOG و ASPNETDB.MDF در آنجا قرار دارند.
حال به نظر شما من چیکار کنم تا مدیر بتواند Login کند.




<?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>
<add name="ConnectionString" connectionString="server = localhost;user id = dbkhorasan;database = mashhaddb; pwd=1255864"
providerName="System.Data.SqlClient" />
<add name="ConnectionString2" connectionString="server = localhost;user id = dbkhorasan;database = mashhaddb; pwd=1255864"
providerName="System.Data.SqlClient" />
<add name="ConnectionString3" connectionString="server = localhost;user id = dbkhorasan;database = servicedb; pwd=1255864"
providerName="System.Data.SqlClient" />
</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.
-->
<roleManager enabled="true" />
<compilation debug="true" strict="false" explicit="true"/>
<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>
-->
<customErrors mode="Off"/>
</system.web>
</configuration>

m.hamidreza
جمعه 16 فروردین 1387, 23:47 عصر
اصلا چرا دو تا دیتابیس ؟! یعنی چی؟
تو یه دونه مگه نمی شد ؟ فکرکنم بد توضیح دادی یا من نفهمیدم منظورتو ....
شما الان 3 تا ConnectionString داری دو تا DataBase ؛ سرورتم localhost !