PDA

View Full Version : سوال: مشکل در راه اندازی سایت با asp.net



kh1387
پنج شنبه 11 مهر 1387, 12:31 عصر
با سلام
مشکلی که دارم اینه که تمامی فایلهای wwwroot ویندوز رو به wwwroot سرور انتقال دادم و با خطای زیر مواجهم.
در ضمن: در تمامی سایت جستجو کردم. اما از asp.net چیزی پیدا نکردم.
اگه امکان داره دوستان راهنمایی کنند.
ممنونم
http://i35.tinypic.com/25a66us.jpg

merlin_vista
پنج شنبه 11 مهر 1387, 12:52 عصر
تگ مشخص شده را در فايل وبكانفيگ بگزار تا خطاي اصلي نشون داده بشه .
بعد اون خطا را بگزار .
اگر جستجو ميكردي بود .

kh1387
پنج شنبه 11 مهر 1387, 12:56 عصر
تگ مشخص شده را در فايل وبكانفيگ بگزار تا خطاي اصلي نشون داده بشه .
بعد اون خطا را بگزار .
اگر جستجو ميكردي بود .


من web.config رو هم عوض کردم، طبق پیغام خطا، اما بازم همون Error رو می ده!

milade
پنج شنبه 11 مهر 1387, 13:36 عصر
الان شما برای خطا در web.config از چی استفاده می کنی؟

kh1387
پنج شنبه 11 مهر 1387, 13:48 عصر
الان شما برای خطا در web.config از چی استفاده می کنی؟



<?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>
<appSettings/>
<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.
-->
<compilation debug="true"/>
<!--
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>

این محتویات کامل web.config من هستش

kezack
پنج شنبه 11 مهر 1387, 14:10 عصر
خوب همون تگ كه بالا هست رو توش بزار تا درست بشه
<CustomsError mode="Of">

milade
پنج شنبه 11 مهر 1387, 14:35 عصر
این رو بزار:

<?xmlversion="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>
<appSettings/>
<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.
-->
<compilationdebug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authenticationmode="Windows"/>
<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
</customErrors>
</system.web>
</configuration>

kh1387
جمعه 12 مهر 1387, 00:31 صبح
بچه ها من همه این کارها رو انجام دادم ولی بدرد نخورد.
ببینید من در wwwroot سرورم یک فولدر و دو فایل دارم که عبارتند از : default.aspx و web.config همین!
حالا شاید مشکل از اینهاست.:متفکر:

kh1387
جمعه 12 مهر 1387, 11:02 صبح
کسی نیست راهنمایی کنه؟:عصبانی++:

merlin_vista
جمعه 12 مهر 1387, 11:46 صبح
بچه ها من همه این کارها رو انجام دادم ولی بدرد نخورد.
ببینید من در wwwroot سرورم یک فولدر و دو فایل دارم که عبارتند از : default.aspx و web.config همین!
حالا شاید مشکل از اینهاست.:متفکر:

يعني چي به درد نخورد ...
شما با تگ ياد شده در بالا :

<CustomsError mode="Of">
به كامپايلر asp.net ميگوييد كه خطاي اصلي را بر روي صفحه نمايش بده .
حال براي رفع اين خطا بايد آن را در اينجا قرار دهي ...
در حقيقت اين خطاي نمايش داده شده كه عكس آن را در پست اول گزاشتيد خطاي اصلي نيست . براي مشاهده خطاي اصلي بايد تگ ياد شده را در قرار دهيد ...

kezack
جمعه 12 مهر 1387, 11:49 صبح
ميشه يكبار ديكه webconfig كه تغيير دادي رو اينجا بزاري؟ اخه من هم همجين مشكلي داشتم و با تغييري كه دادم مشكلم حل شد

kh1387
جمعه 12 مهر 1387, 15:05 عصر
يعني چي به درد نخورد ...
شما با تگ ياد شده در بالا :

به كامپايلر asp.net ميگوييد كه خطاي اصلي را بر روي صفحه نمايش بده .
حال براي رفع اين خطا بايد آن را در اينجا قرار دهي ...
در حقيقت اين خطاي نمايش داده شده كه عكس آن را در پست اول گزاشتيد خطاي اصلي نيست . براي مشاهده خطاي اصلي بايد تگ ياد شده را در قرار دهيد ...

خب منم همینکار رو کردم ولی بازم همون خطا رو میده!:ناراحت:

kh1387
جمعه 12 مهر 1387, 15:11 عصر
تازه بدتر از اینها:
من یک صفحه htm با notepad ساختم که فقط یه خط متن داره.
حالا اینو داخل wwwroot که کپی می کنم جواب نمی ده باید حتما بعد از اسم سایتم ، اسم صفحه رو هم بنویسم!!!
نمی دونم چشه!!!

اگه داخل روت باشه این پیغام رو می ده:
You are not authorized to view this page

kezack
جمعه 12 مهر 1387, 17:10 عصر
نه ميشه يكم واضحتر توضيح بدين؟
اكر فايلتو در هاست در جاش copy كرده باشين لازم نيست اسم صفحتون رو بنويسيد
اين خطا اخري هم كه اجازه نميده...
شما يك صفحه ساده مثل default.aspx رو توي هاست بزارين ببينيد باز خطا ميده؟

kh1387
جمعه 12 مهر 1387, 19:00 عصر
نه ميشه يكم واضحتر توضيح بدين؟
اكر فايلتو در هاست در جاش copy كرده باشين لازم نيست اسم صفحتون رو بنويسيد
اين خطا اخري هم كه اجازه نميده...
شما يك صفحه ساده مثل default.aspx رو توي هاست بزارين ببينيد باز خطا ميده؟

اینهم طبق فرمایش شما :
و این هم خطاش!:


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>

kh1387
جمعه 12 مهر 1387, 19:02 عصر
در ضمن ذکر این نکته هم ضروری است که من فقط و فقط Default.aspx رو کپی کردم و مشکلم با html , غیره حل شد.

اینهم از محتوای فایل web.config


<?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>
<appSettings/>
<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.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
</customErrors>
</system.web>
</configuration>

kh1387
جمعه 12 مهر 1387, 19:04 عصر
مشکل من با صفحات html , ... حل شده ولی
محتوای فایل web.config:


<?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>
<appSettings/>
<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.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
</customErrors>
</system.web>
</configuration>

بعدش کسی نیست بگه که این وب کانفیگ چه ربطی به صفحه ای اس پی داره؟
آخه فقط صفحات ای اس پی رو کپی می کنیم...!

kh1387
جمعه 12 مهر 1387, 22:57 عصر
خوشبختانه حل شد

ممنون از عزیزانی که پاسخگو بودند.
:بوس:

Developer Programmer
یک شنبه 20 بهمن 1387, 19:33 عصر
خوشبختانه حل شد
چطوری حل شد؟ می شه توضیح کامل بدی؟

kh1387
دوشنبه 21 بهمن 1387, 21:04 عصر
چطوری حل شد؟ می شه توضیح کامل بدی؟
بله
من در سایتم صفحه default.aspx تعریف نشده بود.
اصلا ربطی به طراحی وبم نداشت:قهقهه: