PDA

View Full Version : مشکل در عدم نمایش خطای اصلی



jiljil
سه شنبه 13 فروردین 1387, 16:07 عصر
من یک سایت با ASP.net 2.0 طراحی کردم و تما فایل های اون رو در wwwroot هاستم گذاشتم.سایت لود می شود و هیچ مشکلی نیست اما در زمانیکه می خواهم داده ای را وارد کنم و داده ای را insert کنم خطا می گیره والا نمیدونم چکار کنم.
تمام فورام را گشتم و تمام راه هایی را که کفتند انجام دادم اما باز هم نشد من کدهای Web.config را می گذارم اگر کسی می تونه کمک کنه.ثواب داره!
در ضمن به فرض Database Name :servssdb و Username:rezasdei و password : 120156 می باشد
در ضمن من فایل App_Data را هم در همان wwwroot گذاشته ام


<?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="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\Servicedb.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
<add name="ConnectionString2" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\Servicedb.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
<add name="ConnectionString3" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\Servicedb.mdf;Integrated Security=True;User Instance=True"
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>
-->
</system.web>
</configuration>

nazaninam
سه شنبه 13 فروردین 1387, 16:20 عصر
سلام
دوست عزیز پیشنها می کنم اول اون مشخصاتی که گذاشتید رو حذف کنید !
در ضمن اصلا شما نگفتید که با چه خطایی مواجه شدید ولی حدس میزنم مشکل از پرمیشن هاتون باشه
لطفا بفرمایید متن خطا چیه؟

jiljil
سه شنبه 13 فروردین 1387, 16:42 عصر
من چطوری می تونم به پرمیشن ها دسترسی داشته باشم.
Cpanel من هلم می باشد .
نمی دونم چطوری می توانم به پرمیشن ها دسترسی داشته باشم. و خطایی که می ده اینه

Server Error in '/' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>

KavoshGar_ir
سه شنبه 13 فروردین 1387, 19:36 عصر
من چطوری می تونم به پرمیشن ها دسترسی داشته باشم.
Cpanel من هلم می باشد .
نمی دونم چطوری می توانم به پرمیشن ها دسترسی داشته باشم. و خطایی که می ده اینه

Server Error in '/' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>
من هم زمانی با این مشکل روبرو بودم که از هر کسی هم پرسیدم نتونست دقیقا مشکل من را بفهمه تا بعد از یک هفته خودم مشکلم را فهمیدم! شاید جواب شما باشد :

زمانی که می خواهید پروژه تان را بر روی اف تی پی آپلود کنید دقیقا تمام صفحات و فولدرها باید داخل روت قرار بگیره به عبارتی خودتان یک فولدر مجزا با نرم افزارهای اف تی پی منیجر نسازید و فایلها را آپلود کنید.
اگر می خواهید فولدرهای درون روت شما پرمیشن داشته باشند فولدرها باید در پروژتان ایجاد شده باشند به طور مثال اگر پروژه شما شامل صفحه دیفالت و چهار فولدر باشه باید
defaul.aspx / images / forum / admin / bin

با اف تی پی منیجر صفحه و فولدرها را دراگ کنید داخل روت که خود برنامه اف تی پی منیجر فولدرها را میسازه و نیز به ادد کردن دستی فولدر نیست...

درضمن هاستیگ شما از اکسپرس پشتیبانی می کنه؟!!:متفکر:
معمولا باید دیتابیس را بسازید بر روی هاستیگ! کمتر هاستینگی را دیدم از اکسپرس پشتیبانی کنه ...

امیدوارم مفید بوده باشه پاسخ من!
موفق باشید.

mehrpars
سه شنبه 13 فروردین 1387, 19:43 عصر
اگر موقع Upload کردن خطا میگیره ایراد از permission هست که می تونی توی CPanel از یک گزینه (شاید ) Acl Manager استفاده کنی و پرمیشنتو Full control برای فولدر مورد نظرت قرار بدی ......

ولی من فکر میکنم از database هست ایرادت , چون موقع کار با database با خطا مواجه می شی و به این دلیل هست که بانکتو Attach نکردی ...
برای تست اینکه ببینی table ها ,و Store procedure هات هستن با Sql enterprise manager , به بانکت وصل شو و چک کن (به احتمال زیاد مشکلت این باشه)

nazaninam
سه شنبه 13 فروردین 1387, 20:07 عصر
شما اول customErrors mode="Off" کن تا متوجه بشید خطا از کجاست

my_blithe
سه شنبه 13 فروردین 1387, 20:38 عصر
شما اول customErrors mode="Off" کن تا متوجه بشید خطا از کجاست

این فکر میکنم درست تر باشه تا پیشنهاد دیگر دوستان.
کدی که مخوایی وارد کنی اینه:


<system.web>
<customErrors mode="Off"/>
</system.web>


توی web.config احتمالا <system.web> داری و فقط کافی خط وسطی رو کپی کونی داخلش

jiljil
سه شنبه 13 فروردین 1387, 20:56 عصر
با تشکر از تمام دوستان که کمک کردن اما باز هم مشکل حل نشد.
من دوباره آپلود کردم ، درست نشد.
customErrors mode="Off کردم جواب نداد
نمیدانم چیکار کنم. واقعا گیچ شدم.

mehrpars
سه شنبه 13 فروردین 1387, 22:56 عصر
دوست عزیز !
منظورم از upload فرستادن فایل به سرور از طریق برنامت هست .
به هر حال خطا رو از روشی که دوستان ذکر کردند باید بزاری ببینیم دقیقا چی هست .

نا امید نشو .....................

nazaninam
چهارشنبه 14 فروردین 1387, 12:27 عصر
دوست عزیز اگر پس از Off کردن باز هم همان خطا را دریافت می کنید اولین کاری می کنید گوشی تلفن را بردارید و با پشتیبانی هاستتون تماس بگیرید و بگید که مشکل چیه تا مشکلتون رو حل کنند
موفق باشید

mehrpars
چهارشنبه 14 فروردین 1387, 13:42 عصر
اینکه خطا رو نشون نمیده , دوستمون هم اشاره کردن ایراد از هاستت هست که بعضی مواقع پیش میاد و خودشون در اصطلاح میگن App. واسه هاستت نصب نشده که با زدن mail یا تلفن 5 دقیقه ای حل می شه

mahdi_farhani
چهارشنبه 14 فروردین 1387, 15:08 عصر
اصلاً شاید ورژن فریم ورک درست تنظیم نشده ، که خطا رو نشون نمیده ، از مطابقت داشتن ورژن دات نت برنامه شما و اون چیزی که روی هاست تنظیم شده اطمینان پیدا کن .

jiljil
چهارشنبه 14 فروردین 1387, 16:31 عصر
با تشکر از تمامی دوستان عزیز
من تقریبا مشکلم حل شد
ابتدا همانطور که دوستم گفت در customErrors mode="Off کردم و در نهایت 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>

mehrpars
چهارشنبه 14 فروردین 1387, 20:26 عصر
تا اونجا که می دونم توی همه هاستا فقط یک دیتابیس sql server بصورت عادی داری و اگر بیشتر بخوای باید هزینشو بپردازی و درخواست بدی .
بعدشم اینکه شما بانکتو اشتباه upload کردی و واسه همینم اون مشکل اولی واست رخ داد .
شما باید بانکتو توی فولدر db جایی که wwwroot هست قرار بدی .
اگرم توی برنامت یک دیتابیس داری چه نیازی به ASPNETDB داری ؟؟؟؟؟

jiljil
پنج شنبه 15 فروردین 1387, 12:52 عصر
کسی پیدا نمی شه مشکل من را حل کند.
لطفا کمکم کنید.;کمک