Click here to Skip to main content
15,921,169 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
If I'm hosted my application (IIS), but i don't want to open that folder in windows login's. for example (C:\inetpup\wwwroot\MyApplnFolder). Can any one pls share the sample code using c# with asp.net.

What I have tried:

If I'm hosted my application (IIS), but i don't want to open that folder in windows login's. for example (C:\inetpup\wwwroot\MyApplnFolder). Can any one pls share the sample code using c# with asp.net.
Posted
Updated 7-Aug-17 18:05pm
v2
Comments
OriginalGriff 7-Aug-17 3:32am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you tell us to work from.
And if you don't want to open a folder, then don't - all we can do based on that little info is say "you have my permission not to open the folder"...
Use the "Improve question" widget to edit your question and provide better information.
Graeme_Grant 8-Aug-17 1:03am    
Any reason that you changed the title of the question rather than starting a new one? No the Solution is out of alignment with the question.

1 solution

This article will have more information about logical versus virtual file paths in Asp.Net: MapPath - DotNetPerls[^]

UPDATE: Due to the title of the question being changed, the above response is now incorrect. Below is a revised response:

Web applications work under a reduced set of permissions to stop security breaches of the hosting service above the level of the web application itself. So disable root folder in windows using ASP.NET C# would not be possible as this is the responsibility of the hosting service, IIS in this case.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900