PDA

نسخه کامل مشاهده نسخه کامل : مشکل فایل web.config



coder1984
21-05-2011, 12:35
تنظیمات زیر مربوط به تنظیمات فایل web.config وب سایتم هست
قبلا بدون مشکل کار میکرد اما الان به خاطر تعویض هاستم با مشکل مواجه شدم
متاسفانه برنامه نویس وب سایتم در دسترس نیست تا سوالام رو بپرسم این بود که مزاحم شما شدم
برنامه نویسی vb و asp و پایگاه داده sql است ، دیتا بیس رو رو هاست پلسک رستور کردم
نام و تنظیمات پایگاه داده
database name: mitbg_mydb
databaseuser: mitbg_myuser
passsword: 12345678
اما متاسفانه هنوز مشکل داره
کسی میتونه کمکم کنه ، مشکل از کجاست
خودم حدس میزنم از تنظیمات فایل web.config باشه


<?xml version="1.0" encoding="UTF-8"?>
<!--
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>
<appSettings />
<connectionStrings>

<add name="portal_spcoConnectionString" connectionString="Data Source=windows;Initial Catalog=mitbg_mydb;User ID=mitbg_myuser;Password=123456789" providerName="System.Data.SqlClient" />
<add connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspn etdb.mdf;User Instance=true" name="LocalSqlServer" 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.
-->
<compilation debug="true" strict="false" explicit="true">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /></assemblies></compilation>
<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="Windows" />
<!--
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>
-->
</system.web>
</configuration>

*Batman*
22-05-2011, 11:20
سـلام.
یه Backup از web.config بگیرید و قسمت authentication mode=Windows رو حذف کنید. ببینید تغییری میکنه؟

اگر سوال خودتون رو در انجمن ASP.Net مطرح کنید خیلی سریع تر به جواب میرسید. چون ربط چندانی به بانک اطلاعاتی نداره.

برنامه نویسی ASP.NET

برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید

coder1984
22-05-2011, 23:02
با تشکر اونجا هم اعلام میکنم ، امیدوارم حل بشه

anvar.net
24-05-2011, 19:45
اگه پس از تغییر هاست هیچ گونه تغییری در فابل Config ندادی (یعنی تنظیمات مربوط به هاست قبلی هست)

باید Data Source=windows که نام سرور میشه رو واسه هاست جدیدت عوض کنی

در ضمن در بالا گفته بودی پسورد 12345678 هست اما تو فایلت 123456789 هست (احتمالا 9 اضافیه یا جاانداخته شده)