ورود

View Full Version : سوال: مشکل در Publish سایت، خطای Runtime Error بر روی اینترنت



hdv212
یک شنبه 31 شهریور 1387, 13:53 عصر
سلام و خسته نباشد
سایتی رو Publish کردم و روی هاردم ذخیره کردم (به صورت PreCompiled)
سپس با برنامه های Ftp Manager (مثل Leap Ftp) سایت رو آپلود کردم، سایت بدون مشکل اجرا میشه منتها یکی دوتا Page اش رو زمانی که روش کلیک میکنم، خطای زیر رو میده :

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>

وقتی در ویژوال استودیو run میکنم، درست نشون میده، حتی یک Virtual Directory هم برای نسخه ی Publish شده ی سایت (PreCompiled) ساختم و از طریق IIS اجراش کردم، دیدم درست اجرا میشه، فقط روی وب مشکل داره.
یکبار دیگه اون Dlll مربوط به اون صفحه رو به شاخه ی Bin در اینترنت کپی کردم ولی مشکلم حل نشد، میشه بگید مشکلم کجاست ؟

اینم بگم که فقط 2 تا صفحه ام این مشکل رو داره، بقیه درست کار میکنن، نکته ی دیگه اینکه نمیدونم این کد کمکی میکنه یا نه :

<CustomErrors Mode="Off">

چون سایت درست کار میکنه، فقط 2 تا صفحه اش خطا میده.
مرسی

kezack
یک شنبه 31 شهریور 1387, 14:43 عصر
دوست عزيز در webconfig اين كد رو قرار بده



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

فكر كنم درست بشه

hdv212
دوشنبه 01 مهر 1387, 00:49 صبح
مرسی
این کار رو کردم، حالا این پیغام رو میده :

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Unexpected end of file looking for </asp:Content> tag.

Source Error:


Line 3: <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
Line 4: </asp:Content>
Line 5: <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
Line 6: <h3 class="serviceDetailsTitle">طراحی و کدنویسی صحیح دستورات اس کیو ال در برنامه های کاربردی</h3>
Line 7: <hr />


Source File: /dbDevelopment.aspx Line: 5

اون یکی صفحه ام این پیغام رو میده :

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load the assembly 'App_Web_recovery.aspx.cdcab7d2'. Make sure that it is compiled before accessing the page.

Source Error:


Line 1: <%@ page language="C#" masterpagefile="~/MasterPage.master" autoeventwireup="true" inherits="recovery, App_Web_recovery.aspx.cdcab7d2" title="(Disaster Recovery) بازیابی داده ها" %>
Line 2:
Line 3: <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">


Source File: /recovery.aspx Line: 1

آخه چرا اینطور میشه ؟ توی کامپیوتر که درسته، چه باید بکنم ؟

raravaice
دوشنبه 01 مهر 1387, 00:57 صبح
یه سوتی حرفه ای یه جا دادی!

احتمالا یه تگ رو نبستی یا بد بستی یا فایل بد آپلود شده، هر چی هست به این راحتی نمیشه ازش سر در آورد، چیزی که الان آپ کردی روی سرور عینا Down کن ببین هنوز هم درست کار میکنه؟

موفق باشید

mskarimi
دوشنبه 01 مهر 1387, 10:30 صبح
سلام .
منم يه مدتاين مشكل رو داشتم عاقبا فهميدم ظاهرا سرور براي استفاده از دات نت٢ تنظيم نشده بودن.
اگه از پنل استفاده مي كنين خودتون اينكاررو بكنين.
اگه از IIS‌استفاده مي كنين تو سربرگ ASP.NET اينكار رو بكنين. در ضمن فايل هاتون بايد داراي مجوز Read از كاربر Network service باشن.

hdv212
دوشنبه 01 مهر 1387, 11:45 صبح
سلام .
منم يه مدتاين مشكل رو داشتم عاقبا فهميدم ظاهرا سرور براي استفاده از دات نت٢ تنظيم نشده بودن.
اگه از پنل استفاده مي كنين خودتون اينكاررو بكنين.
اگه از IIS‌استفاده مي كنين تو سربرگ ASP.NET اينكار رو بكنين.
از Plesk استفاده میشه، من توی Configuration بررسی کردم، دیدم روی Asp.Net 2.0 تنظیم شده.


در ضمن فايل هاتون بايد داراي مجوز Read از كاربر Network service باشن.
خب احتمالا هستند، چون من در حالت استاندارد Publish کردم و هیچ تنظیمی رو دست نزدم، ثانیا WebPage های دیگه به خوبی اجرا میشن، فقط این دو تا Page هست که مشکل داره.

hdv212
دوشنبه 01 مهر 1387, 11:57 صبح
دوستان مشکل حل شد.
برای مشکل اولی، یکبار دیگه WebPageName.aspx رو آپلود کردم.
برای دومی هم یکبار دیگه Dll اونو آپلود کردم، مشکل از آپلود بود.
با تشکر.