Error 403.14 when serving page from IIS - iis

This is very simple to reproduce:
Create a new VM (xtra small in my case, tried both Windows 2012
and 2008R2)
Install IIS using default config.
Create a Web Site using IIS Manager specifying a folder such as
C:\inetpub\simple.
Using Windows Explorer, create a new file called index.txt
Rename the file to index.htm
Edit the file with Notepad to make it a basic but valid html5
document and Save.
From IIS Manager, select the new website and click the Browse
Website link on the right side of the screen.
I get:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
Now look at the Contents of the web site in IIS Manager and you will see that the file has a .txt extension pasted onto the end : index.htm.txt
This does not happen on my local server.
I am new to Azure and probably missing something very basic but right now I feel like I am going insane. Can anyone put me out of my misery?

This is IIS configuration issue, not Azure specific. And I would not even say it is an issue at all.
index.html is not in the list of default documents for IIS. And has never been. index.htm however is. You get 403.14 forbidden, because Directory Browsing is by default forbidden in IIS. Again, absolutely typical IIS configuration which hasn't changed for ages!
Your solutions:
Configure index.html to be in default documents (read how to do this here)
enable directory browsing (read how to do it here)

For the sake of others as stupid as me, this is all down to Windows Explorer configuration. Normally, the first thing that I do with a new Windows install is to turn off 'Hide known filename extensions'. This time I forgot.

Related

Klondike private NuGet repository api page responds with an HTTP 404.0 error

Using the instructions in this link and the "How to Deploy Klondike"
github instructions I have installed the Klondike release on my local IIS (Version 10.0.15063.0). At first it looked promising, but then I realized that the main page is showing "loading..." rather than the Klondike URL. See image:
Additionally the when I click the API page tab, the site navigates to http://localhost:8081/api which returns a 404.0 HTTP error. This error may not seem very surprising as the site's directory does not contain an api directory. However, I have reverse engineering a working server with Klondike configured on it and it also does not have the api directory. Here is an image of the 404.0 error:
Additionally, when I try to nuget pushto localhost:8081, it results with the error in the image here (note, the red blocked out text is the apikey).
Finally, I have left the handleLocalRequestsAsAdmin is set to true, but even though I am on localhost, it does not show me the "LocalAdministrator" link. I believe that all these symptoms are linked to the same issue.
I have tried the following with no affect on the behavior:
Putting this site in c:\inetpub\wwwroot and also in C:\Klondike;
Using different port numbers, such as 8081 and 80;
Putting a 127.0.0.1 alias in my hosts file and binding the value in IIS to the host name; and
Installed the Debugging tools for Windows install as was suggested on the github site and set the debuggingToolsPath to its path.
(at this point, I'm just guessing at the issue)
The settings I have changed in settings.config file are as follows:
packagesPath = C:\Klondike\App_Data\Packages
Left lucenePath = empty string (I also tried this with a value of C:\Klondike\App_Data\Lucene with no affect.
symbolsPath = C:\Klondike\App_Data\Symbols
debuggingToolsPath = C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
ignorePackageFiles = "true"
I have not changed any values in the web.config file from the default web.config release values.
Thank you for any help that you can provide.
I ran into the same problem, although I was installing Klondike on a remote server rather than locally, but still IIS 10. The problem might be you don't have all the IIS components installed or enabled. More specifically, .NET or one of its required components might not be installed or enabled. If you look at the error on the /api link - it has to do with the MapRequestHandler and Static file handler in IIS - this indicates IIS doesn't know how to handle the request, which is an indicator you might be missing the ExtensionlessUrlHandler in IIS, as well as other components. To solve the problem, go to Start -> Control Panel -> Turn Windows features on or off (varies per system, might be under "Programs and Features"), then find the IIS Application Development Features. These might be listed under Internet Information Services -> World Wide Web Services, or Web Server (IIS) -> Web Server, depending on your system. Once you find these Application Development Features, make sure you have an ASP.NET option checked - you might just want to check all the options. Below is screenshot of what it looks like on my system. You might want to reboot after adding those features - not sure if a reboot is required, but it doesn't hurt. After you enable those features, you might start to run into all kinds of file permission errors when running the Klondike app - you might want to just remove Klondike and reinstall it from the zip file. I have a feeling it Klondike doesn't run cleanly the first time it has problems, as it needs to create an App_Data folder with sub directories.

HTTP Error 500.19 - Internal Server Error Cannot read configuration file

I have been searching for this error all over the internet but no matter what I try to fix this problem nothing actually works. And the detailed message that I got after I copied a url from fiddler and put it in the browser and is as follows.
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070003
Config Error Cannot read configuration file
Config File \?\C:\inetpub\wwwroot\myservices\web.config
Actually what has happened in the past that I had this service called "myservices" working all fine when I used visual studio to create a virtual directory for it in IIS. But then what I did, I tried to do a web deploy of this service in IIS and removed ("myservices" from Default Web Site tree which I had created by creating a virtual directory from within VS 2013). And what I observed is, that after I web deployed "myservices" it didn't work the same way as it was working previously when (I created a virtual directory for "myservices" in IIS through VS2013 but had it removed to see whether the web deployed version of it would behave the same way). Therefore when I analyzed the cause of HTTP error 500.19 through Fiddler (for the web deployed service) it said (Config Error Cannot read configuration file and
Config File \?\C:\inetpub\wwwroot\myservices\web.config) but when I physically try to look into the folder C:\inetpub\wwwroot I could never find myservices folder as such (what to talk of web.config file in it). Then I manually created a folder called "myservices" in C:\intepub\wwwroot directory and put my web.config file there to see if the web deployed service would still work, but it didn't. Then I removed this folder called "myservices" and obviously the web.config file inside of it and also removed the web deployed service from Default Web Site Tree.
And now after all this mess even if I go to visual studio and try to create a virtual directory for my service "myservices" (I can see it in Default Web Site Tree in IIS ) but it would throw the same error as http 500.19 as the web deployed version of this service. In other words whatever I tried it messed up my services even when it's not a web deployed version which previously was not the case. I literally request everybody out there to please guide/suggest me with whatever experience they have as to what went wrong in all this trial and error endeavor of mine.
Thanks
This may be a long shot, but sometimes web.config files get corrupted (our code repository occasionally does this) and you cannot see it with the naked eye. take a simple web.config file that you know is not corrupt and start rebuilding the file from there if it works. We have also used a hex editor (like XVI32) where we can see the corruption, but its much easier to rebuild from a fresh file.
If your problem is not the web.config but the virtual folders, then do the same methodology. Start over with what works and go from there. It could be the web deploy tool that is causing the corruption.
When nothing worked, all I did, was uninstalled IIS rebooted my machine re-installed it again and the HTTP 500.19 is gone.It seems like my IIS was corrupted.

IIS: How change URL to include site name when browsing web files

In my IIS, I have created "App1" as my site name and setup everything.
Now when I browse one of my web file from IIS, the URL for that page is something like "http://localhost/Folder1/Default.aspx".
But back to last time when I was using window 7, the URL that I can get is "http://localhost/App1/Folder1/Default.aspx", now I'm only getting "http://localhost/Folder1/Default.aspx" after I upgrade to window 8. I'm not sure if it's window 8 that causing the issue or anything, but I need advice on how to include the site name when I browse the file so that I can get "http://localhost/App1/Folder1/Default.aspx".
The reason why I need to include site name is because my entire project solution is calling files and web services that including the site name since long time ago. Without the site name, I can't run the program at all because I can retrieve data from any web service
Can anyone advice me on how to include site name in IIS?
I tried Directory Browsing but seems not the solution in my case. I try search for how to include site name in my domain but usually end up directing me to Directory Browsing.
FYI, my application pool setting is as below:
.Net CLR Version: v2.0.50727
Managed Pipeline mode: Classic
Really appreciate any help on this.
Thanks
Just in case anyone face the same issue like me, I found my solution.
Yesterday I just thought of instead of searching Google for so many hours looking for how to include site name in my URL, I remove the App1 application in my IIS. Then, in the physical directory of my App1, I created one new folder call "Main" and I move my App1 folder into Main.
When I create a new application in IIS, i create new application as App1 but point the physical application path to "Main". This way, when I browse one of the web files in IIS, I can see something like "http://localhost/App1/Folder1/Default.aspx" which totally solve my problem, and my program can run properly now.
Although I still do not know how to include site name into the URL and why the site name is missing. But at least this solve my issue now

Does ASP.NET MVC 4 application have to be in the root folder of a site on IIS 8?

iI have a ASP.NET MVC 4 application based on the VS 2012 Basic template. Using VS 2012, I can deploy the app into a root of an IIS server, such as c:\inetpub\wwwroot. Then, I can go to [http://]mymachine/ and see the app.
But, if I try to move the app to c:\inetpub\wwwroot\Test, an attempt to access [http://]mymachine/Test results in "HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory."
I tried to move the folder both manually, and also by deploying to that folder from VS 2012, but there was no difference. I tried to move the web.config file into c:\inetpub\wwwroot while leaving the rest of the app under c:\inetpub\wwwroot\Test, but that also doesn't work. I have to move global.asax, global.asax.cs and the bin folder into the site root, but then the whole app is again in the root folder, which is not what I wanted.
Does anyone know whether what I'm trying to do is possible? Thanks.
PS.: Sorry about the link formatting - I used the square brackets around [http://] to prevent stackoverflow from treating the example URIs as links.
You need to ensure that the sub-folder has been converted (or created) as an application in IIS. Load the IIS manager and locate the folder under the website node in the tree, right-click and select convert to application. If it's not listed, use the add application option.
Keep in mind that the child application will inherit web.config settings from it's parent by default (among other things). More information can be found on MSDN.

Why does IIS stop me from accessing this text file?

Im having some trouble with basic IIS administration. I have created a site at C:\test\ with a document called test.htm. When I browse to testsite/test.htm iis is trowing an error saying it could not access the web.config. But the folder hasnt even got any asp.net resources in it. Whats going on?
I just did the same as you:
Created a new web site on C:\test
Set its binding to port 81 (port 80 already used)
Started the site
Created a html test file test.htm in C:\test
browsed http://localhost:81/test.htm and it worked
BTW - I used IIS 7.5
Is your "testsite" even mapped to the C:\test folder?
If not that would not work. Make sure that the website is mapped to where the files are.
Default folder for the default web site is c:\inetpub\wwwroot
Good luck

Resources