401.2 IIS Error using Anonymous Authentication - iis

I have set-up my Windows 10 Home PC as a web server to do some development work. I need to use Anonymous Authentication but I'm having issues with 401.2 errors.
401.2 Error
The IIS log gives me:
2015-11-01 18:29:12 192.168.1.14 GET /temp/index.html - 80 - 192.168.1.14 Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/46.0.2490.80+Safari/537.36 - 401 2 5 0"
It's a simple index.html page containing just "Hello World!
I've been through the MS troubleshooting article here but it doesn't help support.microsoft.com/en-us/kb/907273
I have posted the IIS set-up, folder set-up, Access control list on the folder and the AppPool Settings:
Link to settings
Thanks
Jeff

I had the same problem and struggled for couple of days. Finally figured it out that one of the reason to get the 401.2 error was because Authentication modules were not installed.
Make sure you have your desired Authentication modules(i.e. Anonymous Authentication) installed in IIS.
To verify go to IIS Manager -> Select root -> Select Authentication.
If it's not showing your Authentication type then go to control panel -> Add/Remove program or goto Run -> type "appwiz.cpl" -> enter to open the add remove program wizard.
Go to windows features -> IIS -> Authentication
Note: If you only want to fix this error in Visual studio for development purpose then you don't need to install those modules. In case you're using IIS express simply go to project properties by pressing "F4" and change the Authentication type from there.

So I gave up on trying to resolve this. I ended up uninstalling all IIS features and re-installing from scratch. After re-installing Anonymous Authentication now works!! :-) If turning it off and turning it back on again doesn't work then try uninstalling and reinstalling! IT support at its best!!

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.

msdeploy.axd returns 404

I'm trying to setup webdeploy on IIS8, but why am I getting 404 when accessing both https://[servername]:8172/msdeploy.axd and https://localhost:8172/msdeploy.axd locally.
I've installed management service.
I've installed webdeploy 3.5 using web platform installer. In Program and Features a changed the instalation of webdeploy to include all features including the handler.
In IIS Manager I've chosen Configure Web Deploy Publishing for default website's context menu.
I've restarted management service.
when i tried https://[servername]:8172/msdeploy.axd I was asked to enter credentials and accept the certificate. after that I got 404.
I've uninstalled webdeploy and installed using MSI manually including all features.
restarted entire server.
getting 404.
I don't believe you can open the service from a browser. I attempted that against a dev server that we deploy to many times a day and also received a 404. I would try deploying from VS instead as a test.
Also if anyone comes here and is using Visual Studio Publish dialog and the "Validate Connection" button fails: do NOT use the button when creating. Just click Ok, then Edit (in More actions menu).
In the Connection tab, click Validate Connection. This time it will asks you to accept an invalid certificate (since you likely self-signed it on your server). Accept it and the connection should go through.

IIS Express Debugging No Longer Working

I'm using IIS Express with Visual Studio 2013 on Windows 8.1 x64 for a WebAPI 2 application (all en-US here). This worked just fine roughly a month ago, but now I'm getting errors when attempting to debug the application.
If I do not run VS as admin (again, didn't need to do this before), I get:
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
Additional information: Access to the path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\~AspAccessCheck_c00414062044.tmp' is denied.
A second error occurs after this, or it will be the first error if I run VS as Administrator:
A first chance exception of type 'System.Globalization.CultureNotFoundException' occurred in mscorlib.dll
Additional information: Culture is not supported.
If I run the same WebAPI application from WebMatrix 3, it runs without errors (with or without running 'as Admin').
Project IIS config settings:
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort>46435</IISExpressSSLPort>
<IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
<IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>
I also have the application running on http://localhost:46436.
What I also find really strange is that the project properties show "IIS Express" and to use a URL of http://localhost:46436/, but in the project file I'm seeing:
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>46435</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:46436</IISUrl>
That may explain my access denied. Regardless if I unset, save, and re-set to use IIS Express (storing it for all users), the <UseIIS> property is set back to true.
EDIT: It looks like "Use IIS" is normal. I created a new WebAPI 2 project as a test. It ran fine under IIS Express OOTB.
I also had this issue. Ended up having to right click the folder in question and add access for the IIS_IUSR account.
If this isn't causing critical errors, you can also disable break mode for this sort of issue via Debug -> Options -> Debugging and check Enable Just My Code (Managed Only)
I updated all of the packages via the 'Manage NuGet Packages' console, and it started working.

Orchard CMS Module Install with IISExpress Fails because of permissions

I keep getting the "There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders." message when trying to install a module from the Gallery.
I've given the IIS_WPG full control of the Orchard.Web\Modules directory and it worked yesterday, but it doesn't today.
I'm running from Visual Studio 2010 SP1 and IIS Express.
EDIT: I've made sure the gallery path is: http://packages.orchardproject.net/FeedService.svc/
I came across the same issue. We had a custom theme and I had to change the version from 1 to 1.0 in the theme.txt file. Then I was able to install a module.
I fixed this problem by doing this:
Change the app pool user to NetworkService or to a custom user you
create. (I was using IIS not IIS Express)
Grant read/write permissions to the user on the folders (Modules and
Themes).
Make sure Dashboard > Settings > Gallery url is
http://packages.orchardproject.net/FeedService.svc/
That fixed it for me. Using ApplicationPoolIdentity did not work, even when I gave it the appropriate permissions (not sure why).
I hope that helps.

All sites give Error 500 under Sharepoint Foundation (SP2010)

I've just installed Sharepoint Foundatuion on my W2008 64bit server and got it up and running as far as being able to access the Central Admin etc just fine.
I did have to disable 32 bit apps in the application pools for all the SP sites and also, following a tip on here, add a config option for bitness64 as a prerequisite for the services.
However whenever I try to access the "Sharepoint - 80" site itself (or another site collection I created in the admin tool), I am getting an unhelpful 500 error. The log doesn't add anything - I can't find anything to give me a clue as to what it's complaining about.
The server is a hosted VPS and all services like SQL are running locally (and are OK).
Any ideas where I look next?
M
This turned out to be an incorrect specification of the dependencies for the Sharepoint14Module in applicationHost.config
In order to locate the issue I enabled Failed Request Tracing on the server and examined the logs that get output as a result. The preconditions for the module were incorrectly specified (appPool1,bitness64;appPool2,bitness64 instead of appPool1;appPool2,bitness64). Fixing this the sites sprung in to life :)
M

Resources