Modifying machine.config in any way causes "Service Unavailable" browser error for SharePoint 2013 site - sharepoint

I need to add some new entries to machine.config on a machine running SharePoint 2013 (server). However, no matter what change I make, after I have saved the file and restarted IIS (both steps are successful), all SharePoint sites return HTTP Error 503 ("Service Unavailable") when an attempt is made to view them in a browser on a client machine.
In Internet Information Services (IIS) Manager, it seems that the entire server becomes unavailable - no application pool or site can be accessed, i.e. trying to click anything returns "Filename:redirection.config / Error: Cannot read configuration file". This error goes away once the original machine.config is restored.
The machine.config file I'm trying to edit is located at:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
Any help on how to resolve this would be appreciated.

Turns out you need to define <sectionGroup> elements in machine.config - I was not aware of that. E.g. if you want to use <Test> key somewhere, you need to add it to the appropriate section elsewhere in machine.config like this: <section name="Test" .../>. More info can be found on MSDN.

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.

Error 403.14 when serving page from 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.

Getting "Failed to apply web.config modifications" in Sharepoint Central Admininstration when trying to create a web application

I try to add a new web application in sharepoint central administration and get the following error message:
Failed to apply web.config modifications to file 'C:\inetpub\wwwroot\wss\VirtualDirectories\9675\web.config'.
Failed to apply a web.config modification to file 'C:\inetpub\wwwroot\wss\VirtualDirectories\9675\web.config'. The specified node "configuration/system.webserver/modules" was not found in the web.config file
The same error appears when trying to run any Shell-Command that changes something in the web.config. I already tried to do a repair-installation of sharepoint with no afford.
Any idea what could cause this error?
If you want the quickest solution and the problem is happening on a testing web application just delete it and re-create it again. The new web application should have a clean web.config and you cana play again.
Otherwise you could be cleaning the web.config file manually and checking if your changes would help or not.
Also, make sure that you do not change web application root directory by editing settings in IIS. After doing thit SP runs fine but you'll get into trouble when maitaining features and solutions. SharePoint has this value in the database; you'd have to synchronize it with IIS using its object model.

Classic ASP on IIS7: refusing to send errors to browser on 500 Internal Server Error

I have classic ASP running on IIS 7.
Even though I configured the ASP "Debugging Properties" to "Send Errors to Browser = True", the web app REFUSES to send errors to the browser and continues to send a 500 internal server error.
My browser has "Show Friendly HTTP Error Messages" unchecked.
Failed Request Tracing is installed (not sure if that's related)
Happens both on web pages loaded locally on the server and remotely
The App Pool is integrated (not sure if that matters)
Any ideas?
Try :
Internet Information Services (IIS) Manager —> Default Web Site —> Click Error Pages properties and select Detail errors
I was having the same issue with a Classic ASP app running in a subfolder of a site. I had enabled detailed errors and the 500 was still showing. My resolution was to enable parent paths in the ASP section in IIS for the site as the application was referencing the parent folder using "../":
I had this occuring on a Classic ASP application running in a subfolder of a site. The solution was:
IIS > Click into your Site > Click into your Application folder > Error Pages > Edit Feature Settings > set to: Detailed Errors
IIS Manager >> double click the ASP icon to open the ASP page. Expand the Debugging Properties node and set Send Errors To Browser to True.
Refer : http://www.chestysoft.com/asp-error-messages.asp
If your website is configured to connect to the physical path of the website as a specific user, instaed of using pass-through authentication, you may get this error if there is a permissions error with this user. It may also be necessary to restart the Windows Process Activation Service and then restart IIS.
If you are hosting the project in a shared environment then you can use the following snippet to view the errors.
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
<system.web>
<customErrors mode="Off" />
<compilation debug="true" />
</system.web>
Refer this URL for complete information http://blogs.iis.net/rickbarber/working-past-500-internal-server-error
Hope it helps someone
I had a 500 error with an ASP Classic application I had just installed on a new server (Windows 2019). Every URL on the application returned 500, no matter what. But no errors were being shown in the Windows event log, and despite configuring detailed errors, as mentioned in several the other answers here, no specific error was being displayed in the browser.
The only clue was in the IIS logs, which showed the HTTP status code as 500, and the IIS substatus code as 19. So a 500.19 error.
That led me to
and the specific issue I was having was answered by the second part of this section:
https://learn.microsoft.com/en-us/troubleshoot/iis/http-error-500-19-webpage#hresult-code-0x80070005
which says:
Don't configure the website to use UNC pass-through authentication to
access the remote UNC share. Instead, specify a user account that has
the appropriate permissions to access the remote UNC share.
and (this is the part I needed to do):
Grant the Read permission to the IIS_IUSRS group for the
ApplicationHost.config or Web.config file. To do it, follow these
steps:
In Windows Explorer, locate the folder that contains the
ApplicationHost.config file that is associated with the website, or
locate the virtual directories or the application directories that
contain the Web.config file that is associated with the website.
Note
The Web.config file may not be in the virtual directories or the
application directories in IIS. Even in this situation, you have to
follow these steps.
Right-click the folder that contains the ApplicationHost.config file,
or right-click the virtual or application directories that may contain
the Web.config file.
Select Properties.
Select the Security tab, and then Select Edit.
Select Add.
In the Enter the object names to select box, type
\IIS_IUSRS, select Check Names, and then select OK.
Note
is a placeholder for the computer name.
Select the Read check box, and then select OK.
In the Properties dialog box for the folder, select OK.
Note
Make sure that the folder properties are inherited by the
ApplicationHost.config and Web.config files so that IIS_IUSRS has the
Read permission for those files.

IIS7 Authentication problem

I have deployed a web site to a Win 2008 Web server with IIS7. The site works fine on a Win 2003 Standard server with IIS6. On the 2008 box, whenever I request a page (htm or aspx) from a folder named Reports, I get challenged with the Windows Authentication dialog box.
I have Anonymous Authentication and Forms Authentication enabled on the site. I applied Full Control permissions to the root of the site for both NETWORK SERVICE and IIS_IUSRS, but that hasn't make a difference.
Like a previous post already mentioned, here are the detailed steps to fix this:)
If there is a folder in the application named "Reports" and SQL Server Reporting Services are installedon the server, then Reporting Services Virtual Directory folder that is also named "Reports" will be in conflict with the application "Reports" folder.
To fix this open Reporting Services Configuration Manager (Start->All Programs->MS SQL Server->Configuraton Tools) and change the Virtual Directory under the "Report Manager URL" in the menu on the left.
Did you install MSSQL Reporting Services on your new machine? It'll use the Reports folder for the reporting toolkit (default setting) and under MSSQL 2008 you can't enable anonymous Access out of the box.
whats is the authentication mode in your web.config, verify that is not in Windows
<authentication mode="Windows" />
also be sure to disable integrated windows authentication in iis
You could try running FileMon from SysInternals to see if it is the file system that is sending back the "access denied".
Quote from another forum that solved this issue for me:
"SQL Server Reporting Services creates a folder called Reports by default if you install it on IIS. If you install SQL 2008 then Reporting Services doesn't need to use IIS and instead will try to reserve the URL with the HTTP.Sys service.
I believe this is the cause of the conflict you are seeing. What you could try is changing the URL that Reporting Services uses via the SQL Server Reporting Services Configuration Manager."
Well speaking on the same subject here, yesterday I was deploying my application on Windows Server 2008 running IIS7 w/MSSQL 2008 on there too. In my website's tree structure I had a folder named Reports that had a subfolder in it, and then the actual pages. It looked like this "Reports/SalaryReports/SalaryReport.aspx" The interesting thing was that when I clicked on a hyperlink to go to "Reports/SalaryReports/SalaryReport.aspx" I got a username/password prompt from my server. This did not happen on the VS development server when I ran the application on the development machine. So I was like hmm? I looked at the code-behind in SalaryReport.aspx and did not find anything unusual. So then I put a Default.aspx directly in the Reports folder (thinking maybe it was something wrong with the authentication going two nodes down from the root to get to SalaryReport.aspx) but the server still requested username/password even though there was no security settings applied to this new Default.aspx. So I figured it must be that the folder is named "Reports", so I renamed it to "Reports1" and bigno! Everything worked!....I will still look further in this issue today, but it seems that either an IIS 7 HttpModule (not one of mine) is trying to "reserve" the folder that is named "Reports" for itself or something else...I'll look into the SQL Server Reporting services as the above post mentioned...
Anyways, just wanted to share:)
I'm supposing you don't have a SQL Reporting Services running on the same server:
1 - Give rights to user "IUSR" and the user that's running your application pool.
2 - Overwrite child folder permissions and ownership.
2 - Check if there's a web.config file on that folder setting different access rules.

Resources