Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Production issues - disable ASP.NET debugging, restrict access to directory

Tags:

asp.net

iis

iis-7

I deployed my latest web site to production environment, now client found that the following issues on my deployment. and that are to be fixed.

I just need some clarification from you all on the following

  1. disable ASP.NET debugging

I already set compilation debug="false" in the web.config, is there anything that to be done apart from this?

  1. restrict access to directory

any idea on defining access rights for users?

like image 950
vml19 Avatar asked Jan 23 '26 10:01

vml19


2 Answers

Have you tried this:

<compilation 
    debug="false"
/>

on your web.config

HOW TO: Disable Debugging for ASP.NET Applications

ScottGu's Blog

this will display the exact error that user gets.

And if your application has an download.upload file into a folder you need to

Share Folder name “YourFileFolder” and add ‘Network Service’ account having read/write permission

Regards

like image 67
BizApps Avatar answered Jan 26 '26 04:01

BizApps


There is a configuration setting in machine.config(only) called:

      <configuration>
        <system.web>
            <deployment retail="true"/>
        </system.web>
    </configuration>

This parameter will automatically turn off debugging features(tracing,compilation,...).

For your security rights, give only access on your directory to the iis pool user.

To disable Browsing in IIS7 add this to your web.config:

 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
     <directoryBrowse enabled="false" />
  </system.webServer>
like image 32
lnu Avatar answered Jan 26 '26 02:01

lnu