עבור לתוכן

בעית הרצה על שרת חיצוני בC#

Featured Replies

פורסם

שלום

מצאתי שרת שתומך ASP העלתי את העבודה שלי בC# משהו ממש קטן (סוג של טופס הרשמה)

כאשר אני רוצה לפתוח את הדף שבניתי דרך הדפדפן הוא מציג לי את ההודעה הזאת:

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>

למרות שבVISUAL STUDIO התוכנית רצה לי בצורה טובה אז ריציתי לדעת מה יכולה להיות הבעיה?

ניסיתי לשנות את הקובץ שההודעה אומרת אבל זה לא עזר

בתודה לעוזרים...

פורסם

השינוי של הקובץ לא אמור לפתור את הבעיה, אלא הוא נועד לגרום לכך שתוצג לך הודעת שגיאה מפורטת.

שנה את הקובץ ואז תאמר לנו מהי הודעת השגיאה.

פורסם
  • מחבר

שיניתי את הקובץ הפחתי תא הMODE לOFF אבל זה משאיר לי את אותה בעיה..

קובץ ה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>
<add key="localhost.Service" value="~/server/Service.asmx"/>
</appSettings>
<connectionStrings>
<add name="mahagarConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\ophir\WebSite\server\App_Data\mahagar.mdb;Persist Security Info=True" providerName="System.Data.OleDb"/>
</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="Off"/>


-->
</system.web>
</configuration>

מה הבעיה יכולה להיות?

פורסם

יכול להיות אז שזה קובץ הקונפיגורציה הלא נכון?

פורסם
  • מחבר

אין לי עוד שום קובץ באותו שם בפרוייקט הזה..

כמו שאמרתי זה פרוייקט ממש קטן סך הכל הכנסה למסד נתונים...

מה עוד יכול להיות? אולי צריך לשנות משהו מהקודים כדי שירוץ על שרת באינטרנט ולא רק בVISUAL ?

פורסם
  • מחבר

סבבה הצלחתי לשנות את הWEB.CONFIG

ועכשיו הוא מציג לי את הבעיה הזאת:

 Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:


Line 28: ASP.NET to identify an incoming user.
Line 29: -->
Line 30: <authentication mode="Windows"/>
Line 31: <!--
Line 32: The <customErrors> section enables configuration


Source File: d:\DZHosts\LocalUser\ohpir91\[url]www.ophiryaniv.somee.com\website\client\web.config[/url] Line: 30


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

פורסם

אתה קורא מה שהוא רושם לך?

הוא אומר שיש בעיה בקובץ הקונפיגורציה עצמו. חפש בגוגל קצת כדי להבין מה אומרת הבעיה הזו.

פורסם
  • מחבר

טוב סבבה תודה אני אחפש

אם תהיהי בעיה נוספת אחזור

ושוב תודה

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים