How do I restrict access to files with specific extensions in ASP.NET? -


मेरे वेब अनुप्रयोग में एक ADO.NET Entity-Framework * .edmx फ़ाइल है।

जब मैं ब्राउज़र में (जब एप्लिकेशन चालू हो रहा है) एक एडीएमएक्स फ़ाइल को ब्राउज़ करता हूं, यह त्रुटि पेज को नहीं दिखाता जैसे कि * .cs या vb फ़ाइल को ब्राउज़ करते हुए, यह एडीएमएक्स खोलता है और सभी मॉडल को मेरी मॉडल योजना दिखाता है

आप यह दो कर सकते हैं तरीके; सबसे पहले web.config में या दूसरे IIS में

  & lt; system.web & gt; & LT; httpHandlers & gt; & Lt; क्रिया = "*" पथ = "*। Edmx" type = "System.Web.HttpForbiddenHandler" / & gt; जोड़ें & Lt; / httpHandlers & gt; & LT; /system.web>  

यहां एक Microsoft समर्थन पृष्ठ पर एक लिंक है जो यह वेब कॉन्फ़िग और IIS में कैसे करें।


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -