2011-02-18 6 views
8

यहाँ मेरी Web.config फ़ाइल है:Web.config त्रुटियों दूर न दिखा रहा customErrors = "बंद" (ubuntu/मोनो पर) के साथ

<?xml version="1.0"?> 
<configuration> 
    <system.web> 
     <customErrors mode="Off" />  
     <compilation debug="true" strict="false" explicit="true />  
     <pages> 
      <namespaces> 
      <clear /> 
      <add namespace="System" /> 
      <add namespace="System.Collections" /> 
      <add namespace="System.Collections.Generic" /> 
      <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> 
      <controls> 
      <add src ="~/controls/maleBed.ascx" tagPrefix ="mycontrol" tagName ="male"/> 
      <add src ="~/controls/femaleBed.ascx" tagPrefix ="mycontrol" tagName ="female"/> 
      </controls> 
     </pages> 
    </system.web> 
</configuration> 

customErrors मोड बंद करने के लिए सेट भी साथ (और इसके निश्चित रूप से एक राजधानी "ओ") यह अभी भी मुझे डिफ़ॉल्ट त्रुटि पृष्ठ दिखा रहा है जो मुझे इस संपत्ति को सेट करने के लिए कह रहा है इससे पहले कि मैं उस वास्तविक त्रुटि को दूरस्थ रूप से देख सकूं।

मेरे पास मशीन.कॉन्फिग फ़ाइल नहीं है, और मैंने Web.Debug.config और Web.Release.config में यह customErrors मोड = "ऑफ" भी सेट किया है।

कोई भी विचार किसी को भी?

बहुत बहुत धन्यवाद।

संपादित करें - क्या इसके दिखाने:

Server Error in '/' Application 

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> 
+0

क्या आपने कभी यह पता लगाया है? – Sean

+0

नहीं ... हमें विंडोज़ समर्पित होस्टिंग प्राप्त करना था। –

उत्तर

5

का उत्तर नहीं मिल सका था - हम विंडोज आधारित होस्टिंग पाने के लिए था।

3

उन सेटिंग्स मेरे लिए सही लग रही है।

क्या आप सकारात्मक हैं कि आप सही web.config फ़ाइल देख रहे हैं? क्या आप इन पृष्ठों में से किसी भी मूल्य को अपने पृष्ठ निर्देशों में ओवरराइड कर रहे हैं?

अपने पूरे web.config (सैन्स निजी जानकारी) पोस्ट करने पर विचार करें।

संपादित करें: इसके अलावा, जब आप पृष्ठ देखते हैं तो यह क्या दिखा रहा है?

+0

जो मेरी पूरी वेब.कॉन्फिग फ़ाइल है ...:/यह भी मेरे लिए सही दिखता है। मुझे एक नज़र आएगी, लेकिन मुझे नहीं लगता कि मैं उन्हें कहीं भी ओवरराइड कर रहा हूं –

+0

यह कहने के लिए संपादित किया गया है कि यह –

+0

दिखा रहा है कि मैं विचारों से बाहर हूं ... एक मोनो क्विर्क हो सकता है। सेवाओं को पुनरारंभ करने लायक हो सकता है। – clifgriffin

5

मैंने पाया कि मैं वास्तव में web.config फाइल करने के लिए परिवर्तन करने के बाद अपाचे पुनः आरंभ करने की ...

+0

बस पुनः लोड करना पर्याप्त होना चाहिए। – Chris

6

रेखा

<compilation debug="true" strict="false" explicit="true /> 

अपने कोड में गलत है। यहाँ सुधार: (पिछले उद्धरण चिह्न देख)

<compilation debug="true" strict="false" explicit="true" /> 
0

हालांकि मैं पिछले 2 दिनों में मोनो के साथ वास्तव में निराश हो रही है और अपने आप को हो रही खिड़कियों की मेजबानी मुझे पता चला यह देखते हुए कि कम से कम क्रम में MVC 4 वेब साइटों के लिए Views में विस्तृत त्रुटियों के लिए आपको Web.config पर जाना होगा और आवश्यक निर्देश <customErrors mode="Off"/> जोड़ें।

इसे मुख्य निर्देशिका में पाए गए Web.config में जोड़ना कोई चीज़ नहीं बदलता है।

फिर वास्तविक समस्या शुरू होती है।

0

मुझे कुछ समस्या थी। मैं लिनक्स के लिए भी काफी नया हूं। मेरे मामले में, समस्या यह थी कि मैंने साइट फ़ोल्डर में आवश्यक अनुमतियां नहीं जोड़े हैं और नतीजतन, Web.config भी पढ़ा नहीं गया था।

बस डीबग के लिए, आप संपूर्ण साइट फ़ोल्डर (रिकर्सिवली) के लिए पूर्ण अनुमतियों को अनुमति देने का प्रयास कर सकते हैं।

  • chmod आर युगो + rwx/your_site_root

यह अनुशंसित नहीं है, हालांकि इस तरह के अनुमति के साथ उत्पादन में जाने के लिए।

संबंधित मुद्दे