Where does IIS store site bindings? - iis-7.5

I have a large amount of sites running on IIS 7.5 on Windows Server 2008 R2 Standard, each with many bindings configured. I need to extract the bindings into a text file.
One method is to manually go through each binding for each site within IIS, but it is a painstaking task. It would be easier to access them via a text file. I was lead to believe that site and binding combinations were stored in this file: C:\Windows\System32\inetsrv\Config\applicationHost.config, but I only see a subset of the sites that are configured on the server, and not all of those have all the bindings. So my question is, where does IIS store all of the site bindings?
I'm hoping it's in the form of an accessible text file (e.g. a .config file). If it is in the form of an accessible text file, I only need read access for now, but it would be good to know if this file can be written to rather than needing to edit bindings via IIS, and if so, does the file require administrator level access.

It is possible that you have opened applicationHost.conf with a 32-bit editor (like notepad++).
If you do that it will open C:\Windows\SysWOW64\inetsrv\Config\applicationHost.conf and not C:\Windows\System32\inetsrv\Config\applicationHost.config.
Check this answer for more information.
If you open the file with a 64-bit editor (like Windows notepad), you will see all your websites.

Related

IIS how to view a file stored on the Physical Path on a locally hosted webpage

I have been attempting to access some files I have in a local directory via a locally hosted web site using IIS (Internet Information Services Manager).
The current file types in the folder are CSS, CSV and HTML.
I cannot seem to find any data on these sites, however, I believe something is there as when I change the web URL slightly it states "page can’t be found" rather than showing a blank page.
I have been looking through IIS extensively for a way to make these files ether download/become visible/show file contents/display the HTML
I have the file system set up as both the main website and as another file, under the Default website (as seen below) however, I cannot get either of these two methods to show me the files or anything for that matter.

Protect static files in Classic ASP website

I want to secure static files (images, .txt files) from unauthenticated users. How can I implement the user authentication to the website so that the static files in specific folder also get secured? I have used simple authentication in a login.asp file and started a session for authenticated user and I check the session value for protected .asp files. But I have no idea how to secure static content on Classic ASP website.
The website is hosted on IIS 7 with Integrated pipeline mode.
You already asked this, and I answered it, and I will give you the same answer.
You will need to use BASIC AUTHENTICATION to restrict access on static files in IIS (Classic ASP). Otherwise, you need to save the static content in another format and encrypt it and only make it viewable by people authenticated by your program.
Please don't ask this again, the answers will not be different.
If using Basic Authentification is not your cup of tea, one possibility would be to replace your static files with an ASP file that upon authorization, will output the correct file. If necessary, you can set the ContentType of the Response to the appropriate type. The link http://support2.microsoft.com/kb/173308 show you how to do that with an image stored inside a database but of course, you can take whatever you want as the source of the file. In the case of .TXT files, you can even directly take the file and simply add a small section of ASP code at the beginning for doing the check.
All of this required extra work. There is no way to simply activate some sort of protection with the session state for static files without extra work.
Old question but -- Most MS servers with Classic Asp installed have several default folders which cannot be accessed except via ASP. they are /bin /app_code /app_data and there may be others. It depends on your hosting company. Windows 10 IIS (their cut down dev & test suite) locks these by default. Using ASP code to retrieve and display text and html is very easy but I'm not sure how to do images. If you have very low traffic, one way would be to copy the image file to an unlocked folder and give it a random name, then access it normally in an IMG tag, then delete it after use. (I came here looking for a better method).
Update: The answer to loading images via ASP is here -- displaying images from sql database with classic asp ... see bottom answer by "HeavenCore" and, instead of Response.BinaryWrite rs("ImageBlob"), get the binary of the image into Your variable, eg: BinaryImageData and do Response.BinaryWrite BinaryImageData

How to generate a report of IIS settings for easy perusal?

I'm looking for a way to (hopefully) create a text file which lists all the settings in IIS for..
Virtual Directories
Web sites
Which framework is used on a certain website/directory
directory of hosted files
etc.
Basically I want to do some investigation on some of our servers to figure out where certain projects are located, without digging through right clicking and looking for the directory name manually, etc, for every domain we host.
The reasoning is that I often need to find access to files/projects I haven't worked on before, but historically, we don't have a strong naming scheme, so you can't just look where something "logically" would be - so, generating a list would be very helpful.
Something like this would be awesome, but I'm looking for any tips at all
Domainname1.com
framework: ASP.NET 1.1
directory: c:\inetpub\wwwroot\domainname1.com
Applications hosted at this domain:
etc, etc.
Plain text, XLS, XML.. anything other than right clicking through the whole list!
Thanks!
The IIS metabase is a configuration file that contains most of the settings of IIS, including what websites/application pools are running on the server. It's located by default at:
%windir%/system32/inetsrv/metabase.xml
You can potentially use that as a starting point and write a custom parser, or an XSLT transformation to get the report you want, but it's probably not going to be a trivial task.

Accessing Sharepoint File Server Search Results Externally

We are currently implementing MOSS 2007 to replace an older portal system (Plumtree) and are currently looking at searching. We have 1000s of documents on a file server that we would like users to be able to search. This I can set up by adding a content source of "File Shares" and pointing it at the UNC of the file share. The issue is getting access to this data when you are not on the local network.
So, file share is \FileServer01\Files. This has a file called Wibble.txt containing the word Wibble.
When I search for Wibble it finds this document, BUT it points to file:\FileServer01\Files\Wibble.txt.
That is great if I am attached to the network, but what about when I am accessing Sharepoint via the Internet and I'm not on the LAN that knows about that server?
If I wrote something from scratch I would have a download page that I passed in the location of the file and it would stream it to my browser. Sharepoint does not seam to do anything like like.
Ideas? Suggestions? Have I missed something simple?
Create an HttpModule that intercepts requests to documents in this file share, and presents them through an HttpHandler to the user. Deploy the module and handler to the web application.
The only way to make that content accessible via HTTP would be to bring everything off the file server and into the SharePoint content database. You can then simply let SharePoint crawl that instead of the file server; and your users will be able to download content as well.
Edit: To make the migration task quicker and easier, you can ensure that the WebDav service is running on the sharepoint box, which will allow you to open a document library using the windows explorer interface.

Upload files to Sharepoint document libraries via FTP

I was wondering if anyone knows how to or if it is possible to upload files to a sharepoint (v3/MOSS) document library over FTP. I know it is possible with webdav. If it is possible is this even supported by Microsoft?
I don't think so. I think your options are:
HTTP (via the upload page)
WebDAV
Web Services
The object model
You can map a drive to a SharePoint document library, for example \\serveraddress.domain.com\Documents. So I would try mapping a drive on your FTP server, then making sure files that come in over FTP get sent to that drive.
Big edit: Have any of you figured out how to upload to SharePoint (WSS)? I've tried drive mapping and then using Robocopy and Synctoy to copy files thinking a tool might offer greater control (i.e. a Copy Date Modified control). As I understand it the files are actually stored in SharePoint as database objects and therefore SharePoint views display the database object (SQL object's) properties in Document Libraries where a new user would expect to see the file properties. Those file properties are still alive! They just need to be uncovered by a different view. I particularly like the mapped network drive view of a SharePoint Document Library. File attributes are pretty important to my team, so we were concerned about that at the start. As an opinion note though, the default view showing attributes that appear as incorrect is just plain annoying!
The best solution we've come up with for doing large file migrations into SharePoint is a mapped network drive then using a tool called FreeFileSync available at SourceForge to move your files and folders. It's great because it produces verbose error messages and give a lot of control, especially for the instances that SharePoint tries to block a particular filename or file extension.
Direct FTP into SharePoint is not one of your options. You would need to have a timer job run that checks your FTP directory and uploads into the document library.
Yes it is possible.
The WebDav Redirector allows you to access webdav resources (including Share Point) via UNC path, ie \yourspserver\site\doclib. The IIS FTP server accepts UNC paths as backing storage to virtual directories.
On your ftp server, right click the ftp site in the IIS Manager and select "Add Virtual Directory". Give it a name and specify the sharepoint unc path for the physical path. You'll need to set the "connect as" user to a domain user that has access to the sharepoint folder you're connecting to.
Connect to the ftp folder and you should be able to "cd" into the directory and put/get files without issue (just confirmed it myself). The only caveat is an age old bug/feature of IISFTP, that doesn't show a virtual dir in an ls/dir command listing. The fix is to create a physical folder that mirrors the virtual directory's location. For example, if your ftp root is c:\inetpub\ftproot, then you'll need to create a dir that matches the name of your virtual dir in this location. It will then show up in an ls/dir listing but the cd command will still move into the virtual dir, not the physical dir.
You can directly SFTP/FTP into your SharePoint doc library using Couchdrop. It turns your SharePoint into a native SFTP/FTP server, you can create additional users, etc. Sing out if you need assistance more than happy to assist.
Full disclosure: I represent Couchdrop

Resources