Office Add-in show warning - unsupported features by its add-in catalog (SharePoint App Catalog) - ms-word

I'm trying to deploy a Word Add-in.
I've deployed the backend on an onpremises server to IIS. And I've checked it's accessible.
I've created an app catalog in Office365 and uploaded the manifest file to the catalog. The catalog shows that the Add-in is valid
I've added the Office365 app catalog to the trusted catalog sites
I can add the app, I see that it shows part of my design, but it gives an info text and the Add-in doesn't work:
Info text:
ADD-IN INFORMATION
This Add-in uses features not supported by its add-in catalog.
The manifest:
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>e4a1b6ce-9333-44b5-bf03-59435dbf66ac</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>Name</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="Name" />
<Description DefaultValue="Name"/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="~remoteAppUrl/Images/Button32x32.png" />
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>AppDomain1</AppDomain>
<AppDomain>AppDomain2</AppDomain>
<AppDomain>AppDomain3</AppDomain>
</AppDomains>
<!--End Basic Settings. -->
<!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
<Hosts>
<Host Name="Document" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="~remoteAppUrl/" />
</DefaultSettings>
<!-- End TaskPane Mode integration. -->
<Permissions>ReadWriteDocument</Permissions>
<!-- Begin Add-in Commands Mode integration. -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<!-- The Hosts node is required. -->
<Hosts>
<!-- Each host can have a different set of commands. -->
<!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
<!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
<Host xsi:type="Document">
<!-- Form factor. Currently only DesktopFormFactor is supported. -->
<DesktopFormFactor>
<!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
<GetStarted>
<!-- Title of the Getting Started callout. resid points to a ShortString resource -->
<Title resid="Name.GetStarted.Title"/>
<!-- Description of the Getting Started callout. resid points to a LongString resource -->
<Description resid="Name.GetStarted.Description"/>
<!-- Point to a url resource which details how the add-in should be used. -->
<LearnMoreUrl resid="Name.GetStarted.LearnMoreUrl"/>
</GetStarted>
<!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
Think of the FunctionFile as the code behind ExecuteFunction. -->
<FunctionFile resid="Name.DesktopFunctionFile.Url" />
<!-- PrimaryCommandSurface is the main Office Ribbon. -->
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
<OfficeTab id="TabHome">
<!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
<Group id="Name.Group1">
<!-- Label for your group. resid must point to a ShortString resource. -->
<Label resid="Name.Group1Label" />
<!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
<!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
<Icon>
<bt:Image size="16" resid="Name.tpicon_16x16" />
<bt:Image size="32" resid="Name.tpicon_32x32" />
<bt:Image size="80" resid="Name.tpicon_80x80" />
</Icon>
<!-- Control. It can be of type "Button" or "Menu". -->
<Control xsi:type="Button" id="Name.TaskpaneButton">
<Label resid="Name.TaskpaneButton.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="Name.TaskpaneButton.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="Name.TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Name.tpicon_16x16" />
<bt:Image size="32" resid="Name.tpicon_32x32" />
<bt:Image size="80" resid="Name.tpicon_80x80" />
</Icon>
<!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<!-- Provide a url resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Name.Taskpane.Url" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<!-- You can use resources across hosts and form factors. -->
<Resources>
<bt:Images>
<bt:Image id="Name.tpicon_16x16" DefaultValue="~remoteAppUrl/App_Data/img/Name_logo_16.png" />
<bt:Image id="Name.tpicon_32x32" DefaultValue="~remoteAppUrl/App_Data/img/Name_logo_32.png" />
<bt:Image id="Name.tpicon_80x80" DefaultValue="~remoteAppUrl/Images/Button80x80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Name.DesktopFunctionFile.Url" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html" />
<bt:Url id="Name.Taskpane.Url" DefaultValue="~remoteAppUrl/" />
<bt:Url id="Name.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="Name.TaskpaneButton.Label" DefaultValue="Templates" />
<bt:String id="Name.Group1Label" DefaultValue="Name" />
<bt:String id="Name.GetStarted.Title" DefaultValue="Name templates" />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="Name.TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
<bt:String id="Name.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
<!-- End Add-in Commands Mode integration. -->
</OfficeApp>
I'm assuming it's the manifest file that's causing this. I'm not sure what's wrong with this file, as I followed the default tutorials and file -> new project in Visual Studio.

Add-in command annotations are not supported in the SharePoint add-in Catalog. The only deployment option that will support add-in commands in the short term (other than the store) is our new Office 365 Centralized Deployment Tool, who is in preview right now. Check out the documentation here. (Note that the preview is for now only available on these geographies: US,CA,GB,AU,Ireland and NZ. )
That said, you can still use the SP-Based catalog, but you will need to remove the add-in commands annotations from the manifest (all the overrides), and users will need to go to the insertion dialog to insert your add-in.
Please make sure to consult this page for all the deployment options for add-ins and important remarks about each of them.

Related

Microsoft Word Add-In Failing Submission: Compatibility Issue with Desktop Versions on Windows and Mac

Update: I believe the issue was related to the 80x80 icons, which should have been 64x64.
I submitted a Microsoft Word Add-In to the Microsoft Partner Center (Store), but received the following failure messages:
Predictable Behavior - 1100.4.4.2 O365 Perpetual - Your offer is not working on Microsoft 365 on Windows, Word 16.0.13426.20352 64-bit. Your add-in is not available to be inserted.
Predictable Behavior - 1100.4.4.5 Office for Mac - Your offer is not working in Office for Mac connected to an M365 Subscription. macOS Version 10.15.4 Microsoft Word for Mac version 16.44. Your add-in is not available to be inserted.
The manifest file is below. It passes the npm install -g office-addin-manifest validation test, but apparently cannot be inserted.
If anyone can help, I'd really appreciate it.
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>eb4d03ca-1b89-47b9-9132-6e71b09788ef</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.2</Version>
<ProviderName>Clib Law Ltd</ProviderName>
<DefaultLocale>en-UK</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="Clause Library" />
<Description DefaultValue="Clause Library"/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://cliblaw.co.uk/assets/icon-32.png" />
<HighResolutionIconUrl DefaultValue="https://cliblaw.co.uk/assets/icon-64.png" />
<SupportUrl DefaultValue="https://cliblaw.co.uk" />
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>https://cliblaw.co.uk</AppDomain>
</AppDomains>
<!--End Basic Settings. -->
<!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
<Hosts>
<Host Name="Document" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://cliblaw.co.uk/app.html" />
</DefaultSettings>
<!-- End TaskPane Mode integration. -->
<Permissions>ReadWriteDocument</Permissions>
<!-- Begin Add-in Commands Mode integration. -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<!-- The Hosts node is required. -->
<Hosts>
<!-- Each host can have a different set of commands. -->
<!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
<!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
<Host xsi:type="Document">
<!-- Form factor. Currently only DesktopFormFactor is supported. -->
<DesktopFormFactor>
<!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
<GetStarted>
<!-- Title of the Getting Started callout. resid points to a ShortString resource -->
<Title resid="Contoso.GetStarted.Title" />
<!-- Description of the Getting Started callout. resid points to a LongString resource -->
<Description resid="Contoso.GetStarted.Description" />
<!-- Point to a url resource which details how the add-in should be used. -->
<LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl" />
</GetStarted>
<!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
Think of the FunctionFile as the code behind ExecuteFunction. -->
<FunctionFile resid="Contoso.DesktopFunctionFile.Url" />
<!-- PrimaryCommandSurface is the main Office Ribbon. -->
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
<OfficeTab id="TabHome">
<!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
<Group id="Contoso.Group1">
<!-- Label for your group. resid must point to a ShortString resource. -->
<Label resid="Contoso.Group1Label" />
<!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
<!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
<Icon>
<bt:Image size="16" resid="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="64" resid="Contoso.tpicon_64x64" />
</Icon>
<!-- Control. It can be of type "Button" or "Menu". -->
<Control xsi:type="Button" id="Contoso.TaskpaneButton">
<Label resid="Contoso.TaskpaneButton.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="Contoso.TaskpaneButton.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="Contoso.TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="64" resid="Contoso.tpicon_64x64" />
</Icon>
<!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<!-- Provide a url resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Contoso.Taskpane.Url" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<!-- You can use resources across hosts and form factors. -->
<Resources>
<bt:Images>
<bt:Image id="Contoso.tpicon_16x16" DefaultValue="https://cliblaw.co.uk/assets/icon-16.png" />
<bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://cliblaw.co.uk/assets/icon-32.png" />
<bt:Image id="Contoso.tpicon_64x64" DefaultValue="https://cliblaw.co.uk/assets/icon-64.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="https://cliblaw.co.uk/Functions/FunctionFile.html" />
<bt:Url id="Contoso.Taskpane.Url" DefaultValue="https://cliblaw.co.uk/app.html" />
<bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Open Clause Library" />
<bt:String id="Contoso.Group1Label" DefaultValue="Clause Library" />
<bt:String id="Contoso.GetStarted.Title" DefaultValue="Do more with the Clause Library add-in!" />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Click to open Clause Libary" />
<bt:String id="Contoso.GetStarted.Description" DefaultValue="The add-in is loaded." />
</bt:LongStrings>
</Resources>
</VersionOverrides>
<!-- End Add-in Commands Mode integration. -->
</OfficeApp>
Thanks,
Dean

Sulu: How to add an additional menu for a webspace?

Is there a way to create additional menus to a wabspace in Sulu CMS (1.6)? I only see the main manu in the options:
Thx a lot!
Andreas
You can add more navigations using the XML definition of a webspace. The default webspace from the sulu-minimal repository is located at app/Resources/webspaces/example.com.xml and already contains a navigation tag.
You can add more contexts like this:
<webspace>
<!-- other tags -->
<navigation>
<contexts>
<context key="main">
<meta>
<title lang="en">Main Navigation</title>
</meta>
</context>
<context key="footer">
<meta>
<title lang="en">Footer Navigation</title>
</meta>
</context>
</contexts>
</navigation>
<!-- other tags -->
</webspace>

Ionic Facebook authentication - CORS request rejected

I am running ionic using Visual Studio Android emulator and trying to authenticate a user through facebook using -
Ionic.Auth.login(authProvider, authSettings, loginDetails)
.then($scope.authSuccess, $scope.authFailure);
The call fails with the message in the message: “CORS request rejected: https://api.ionic.io/auth/login/facebook”. Anyone had this problem or know how to resolve it?
Install cordova-plugin-whitelist in your project, and add one of the follow in config.xml
<!-- Allow links to example.com -->
<allow-navigation href="http://example.com/*" />
<!-- Wildcards are allowed for the protocol, as a prefix to the host, or as a suffix to the path -->
<allow-navigation href="*://*.example.com/*" />
<!-- A wildcard can be used to whitelist the entire network, over HTTP and HTTPS. *NOT RECOMMENDED* -->
<allow-navigation href="*" />
<!-- The above is equivalent to these three declarations -->
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
<allow-navigation href="data:*" />

How to quickly copy the current editing file name or full file path in Eclipse (Luna)?

This 'solution' doesn't look to work any longer in the Luna version:
Copy path/file name in Eclipse to clipboard
This is actually a must have feature for a rich IDE!
You can use start explorer (alternate link) or Copy path plugin.
Short cut key to copy path to clipboard in star explorer is : Ctrl+Alt+
C
Standard eclipse eclipse doest have such key. You can select resource in Package/Project/Navigator view and press Alt+Enter to open property dialog and then copy path from here.
I am using Eclipse Java EE IDE for Web Developers.Version: Luna Release (4.4.0)
Build id: 20140612-0600
You can right mouse click on the file and select "Copy Qualified Name".
For this particular example, the path in clipboard is
/TestingProject/src/com/website/testing/App1.java
Use the EasyShell plugin
If using Eclipse 4.14 or later, from Dec 2019 or later, neither StartExplorer nor Path Tools nor Copy as Path works.
Instead, use EasyShell, which works great!
Instructions:
Unsure no text or code is selected.
Right-click anywhere in your open Eclipse file editor, including on empty space near your code, or in the Project Explorer pane.
Go to "EasyShell" --> "Copy Full Path to Clipboard", or "Copy Qualified Name to Clipboard" (see screenshot below).
You now have the file path copied. Paste it wherever you want.
Totally unrelated aside
Additional note: as far as good Ecliplse plugins go in general, I also highly recommend the DevStyle plugin, set to "Dark Gray (Darkest Dark)" Workbench theme, with the DevStyle "Editor theme" (syntax highlighting) set to Sublime Text 3 (Monokai), by Jeremy Shepherd <-- Update Feb 2020: dead links. Instead, I've copied and pasted the contents of Jeremy Shepherd's .xml file at the bottom of this answer.
Sublime Text 3 (Monokai) - by Jeremy Shepherd--theme-25808.xml:
<?xml version="1.0" encoding="utf-8"?>
<colorTheme id="25808" name="Sublime Text 3 (Monokai)" modified="2014-04-11 19:52:55" author="Jeremy Shepherd">
<searchResultIndication color="#757575" />
<filteredSearchResultIndication color="#757575" />
<occurrenceIndication color="#000000" />
<writeOccurrenceIndication color="#000000" />
<findScope color="#111111" />
<deletionIndication color="#D25252" />
<sourceHoverBackground color="#000000" />
<singleLineComment color="#75715E" italic="false" />
<multiLineComment color="#75715E" italic="false" />
<commentTaskTag color="#CCDF32" italic="false" underline="true" strikethrough="false" />
<javadoc color="#76725E" italic="false" />
<javadocLink color="#76725E" italic="false" underline="true" strikethrough="false" />
<javadocTag color="#FD2971" italic="false" />
<javadocKeyword color="#C2BFA6" italic="false" />
<class color="#56D8F0" bold="false" underline="false" strikethrough="false" />
<interface color="#D197D9" />
<method color="#FFFFFF" />
<methodDeclaration color="#7BE12A" />
<bracket color="#D8D8D8" />
<number color="#7FB347" />
<string color="#E7DD6C" />
<operator color="#D8D8D8" />
<keyword color="#F12971" bold="false" />
<annotation color="#FFFFFF" />
<staticMethod color="#BED6FF" />
<localVariable color="#E7F8F2" />
<localVariableDeclaration color="#F12971" />
<field color="#7BE12A" />
<staticField color="#EFC090" />
<staticFinalField color="#EFC090" />
<deprecatedMember color="#D25252" underline="false" strikethrough="true" />
<enum color="#7BE12A" />
<inheritedMethod color="#BED6FF" />
<abstractMethod color="#BED6FF" />
<parameterVariable color="#79ABFF" />
<typeArgument color="#BFA4A4" />
<typeParameter color="#BFA4A4" />
<constant color="#EFB571" />
<background color="#272822" />
<currentLine color="#3E3D32" />
<foreground color="#F8F8F2" />
<lineNumber color="#72736A" />
<selectionBackground color="#757575" />
<selectionForeground color="#D0D0D0" />
</colorTheme>
Sublime Text 3 (Monokai) - by Jeremy Shepherd--theme-25808.epf:
Too long to post here. See my dotfiles project to download it instead.

Authentication issue when debugging in VS2013 - iis express

I'm trying to pick up the windows username when debugging in Visual Studio 2013. I am simply using:
httpcontext.current.user.identity.name
If I run this on my Dev Server it works fine, if I run it in debug mode on any previous version of Visual Studio it also works fine.
My problems is - If i run this on visual studio 2013 I get an empty string.
My web config is as follows.
<system.web>
<authentication mode="Windows"/>
<identity impersonate="false"/>
<authorization>
<allow users="*"/>
</authorization>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/>
<customErrors mode="Off"/>
</system.web>
I had just upgraded to VS 2013 from VS 2012 and the current user identity (HttpContext.User.Identity) was coming through as anonymous.
I tried changing the IIS express applicationhost.config, no difference.
The solution was to look at the properties of the web project, hit F4 to get the project properties when you have the top level of the project selected. Do not right click on the project and select properties, this is something entirely different.
Change Anonymous Authentication to be Disabled and Windows Authentication to be Enabled.
Works like gravy :)
As I was researching this I found my answer, but can't find the answer on the internet, so I thought I'd share this:
I fixed my issue by modifying my applicationhost.config file. My file was saved in the "\My Documents\IISExpress\config" folder.
It seems that VS2013 was ignoring my web.config file and applying different authentication methods.
I had to modify this portion of the file to look like the below. In truth, I only modified the anonymousAuthentication to be false and the windowsAuthentication mode to true.
<authentication>
<anonymousAuthentication enabled="false" userName="" />
<basicAuthentication enabled="false" />
<clientCertificateMappingAuthentication enabled="false" />
<digestAuthentication enabled="false" />
<iisClientCertificateMappingAuthentication enabled="false">
</iisClientCertificateMappingAuthentication>
<windowsAuthentication enabled="true">
<providers>
<add value="Negotiate" />
<add value="NTLM" />
</providers>
</windowsAuthentication>
</authentication>
In Visual Studio 2013 AND VS15 (but i guess if the same for all other version) just press F4 and change this two properties:
-Anonymous Authentication: Disable
-Windows Authentication: Enable
In VS2013 F4 on your project to view properties window and disable Anonymous access and enable "Windows authentication"
Then it will work. No need to change anything else
VS 2015 changes this. It added a .vs folder to my web project and the applicationhost.config was in there. I made the changes suggested (window authentication = true, anon=false) and it started delivering a username instead of a blank.
Open up the applicationHost.config file located in the C:\Users[userid]\Documents\IISExpress\config folder. Inside this file change the overrideModeDefault of anonymousAthentication and windowsAuthentication to "Allow"
<sectionGroup name="security">
<section name="access" overrideModeDefault="Deny" />
<section name="applicationDependencies" overrideModeDefault="Deny" />
<sectionGroup name="authentication">
<section name="anonymousAuthentication" overrideModeDefault="Allow" />
<section name="basicAuthentication" overrideModeDefault="Deny" />
<section name="clientCertificateMappingAuthentication" overrideModeDefault="Deny" />
<section name="digestAuthentication" overrideModeDefault="Deny" />
<section name="iisClientCertificateMappingAuthentication" overrideModeDefault="Deny" />
<section name="windowsAuthentication" overrideModeDefault="Allow" />
</sectionGroup>
Next change lockItem to be "false" for AnonymousAuthenticationModule and WindowsAuthenticationModule
<system.webServer>
<modules>
<!--
<add name="HttpCacheModule" lockItem="true" />
-->
<add name="DynamicCompressionModule" lockItem="true" />
<add name="StaticCompressionModule" lockItem="true" />
<add name="DefaultDocumentModule" lockItem="true" />
<add name="DirectoryListingModule" lockItem="true" />
<add name="IsapiFilterModule" lockItem="true" />
<add name="ProtocolSupportModule" lockItem="true" />
<add name="HttpRedirectionModule" lockItem="true" />
<add name="ServerSideIncludeModule" lockItem="true" />
<add name="StaticFileModule" lockItem="true" />
<add name="AnonymousAuthenticationModule" lockItem="false" />
<add name="CertificateMappingAuthenticationModule" lockItem="true" />
<add name="UrlAuthorizationModule" lockItem="true" />
<add name="BasicAuthenticationModule" lockItem="true" />
<add name="WindowsAuthenticationModule" lockItem="false" />
Making these changes will allow the existing web config settings to override what is in the applicationHost file for IIS Express.
You could also modify the project properties for your web project, choose "Web" from left tabs, then change the Servers drop down to "Local IIS". Create a new virtual directory and use IIS manager to setup your site/app pool as desired.
I prefer this method, as you would typically have a local IIS v-directory (or site) to test locally. You won't affect any other sites this way either.
It appears that the right answer is provided by user3149240 above. However, As Neil Watson pointed out, the applicationhost.config file is at play here.
The changes can actually be made in the VS Property pane or in the file albeit in a different spot. Near the bottom of the applicationhost.config file is a set of location elements. Each app for IIS Express seems to have one of these. Changing the settings in the UI updates this section of the file. So, you can either change the settings through the UI or modify this file.
Here is an example with anonymous auth off and Windows auth on:
<location path="MyApp">
<system.webServer>
<security>
<authentication>
<windowsAuthentication enabled="true" />
<anonymousAuthentication enabled="false" />
</authentication>
</security>
</system.webServer>
</location>
This is equivalent in the VS UI to:
Anonymous Authentication: Disabled
Windows Authentication: Enabled
F4 doesn't always bring me to this panel. Besides, it is often said that a picture is worth a thousand words.