I have in my web application an ADO.NET Entity-Framework *.edmx file.
When I browse in the browser (when the application is running) to an edmx file, it doesn't show the error page like when browsing to a *.cs or vb file, it opens the edmx and shows my model scheme to all the users!!!
How can I avoid that.
You should map the extension to the ASP.NET's
System.Web.HttpForbiddenHandler
class inweb.config
. If you are using IIS6, before you could do that, you should have mapped the extension to ASP.NET ISAPI handler.IIS7 Integrated Mode:
IIS7 Classic Mode. Something like:
IIS6 (after mapping the handler to
aspnet_isapi.dll
in IIS6 configuration):You can do this two ways; firstly in the web.config or secondly in IIS
Here's a link to a microsoft support page that details how to do it in the web config and IIS.
http://support.microsoft.com/kb/815152