How to hide web.config from directory browsing? - iis

I use IIS8 and I'm trying to hide web.config from the files list on my site but I just can't seem to find a solution for that. Can you help me please? :)

Right click the file and mark it as hidden. It will stop showing up in IIS directory browsing.

Use the command prompt for each web.config file
attrib +H web.config
You can also do a Find with Windows Explorer and search for "web.config" in the directory where you store all of your web data, then right-click on each one there to enable the Hidden flag as well. With the Find GUI > View options - you can hide already hidden files so you know which ones you've already changed.

Related

How can I restore a deleted Sharepoint page?

A colleague deleted a Sharepoint 2013 page by mistake, I can find it in the recycle bin, but when I try to restore it I encounter an error:
A file named "P10.aspx" already exists in "PORG/OAN/Pages". To restore the file, rename the existing file and retry.
The fact is that when I go into "PORG/OAN", site content, Pages, I can't find any "P10.apsx". I also tried to search for an existing "P10.aspx" file on the entire Sharepoint and didn't find anything.
Does anyone have an idea where that file might be hidden or how to delete/rename it without finding it so I can restore the one in the recycle bin please?
Thanks in advance for your answers.
In the Pages library settings, click on "Manage files which have no checked in version" and check if the offending page is shown there. –
Monte_fisto

Local VS Inherited pages in IIS

Unfortunately I have deleted the 401 page at application level in IIS..
I have created a new one there back.. type of that page is local instead of inherited..
How should I get it to inherited at app level..
Tried resett but no luck
Unless someone has changed the delegation configuration for your Error Pages, the changes made to your Application Error Pages will be made to the Application's Web.Config file.
Click your Application on the Left Side of IIS Manager.
Next Click Explore in the Top Right corner to open Windows Explorer to the Physical Path of the Application.
Open the Web.config in NotePad.
Locate the tag for < httpErrors>.
I imagine you'll only have two entries one for Remove and one for add. If this is the case, delete everything between < ttpErrors and the closing < / httpErrors>. (Feel free to make a backup of the web.config if you're nervous).
If you have something other than that in the web.config or you don't find it, post back with what you find.

Convert application to regular folder in IIS7

In IIS7, If I want to create an application, I just right-click on a folder to do it:
If later on I want to convert it back to a regular folder (not an application), how can I do it?
Right click on application folder and select remove. The application will be converted as regular folder.
I'm not aware of an automated approach, but you should be able to get most of the way there by moving all of the code for your site (except code behind) into an App_Code folder at the top level, and by removing the DLL for your site from the bin folder.
You may also need a few other tweaks.
Just right-click on the app and then select remove.
I have made the Following changes.
In IIS Right-click the same Virtual application and select "remove"
option. This will convert the application to the folder only.

Can't browse website in iis6

When I browse my website it shows me a directory listing instead of web pages:
How do I stop this happening?
Looks like you've got Directory Browsing turned on:
Open the site properties and select the Home Directory tab. Uncheck "Directory Browsing".
If you're seeing a directory listing rather than the Default.aspx page being loaded up then you're missing "Default.aspx" as a default document. Check out Setting Up Default Documents in IIS6.

IIS Directory Browing

If I enable directory browsing in IIS it displays folder contents to user. Is there any way of controlling the way it shows the list. For example, I don't want to show full physical path of the folder. Is it possible to achieve? If yes, how?
Enable Directory browsing will not show the full path in the browser. Where do you see the full path?

Resources