Cannot stop IIS Express asking to authenticate me on my local Silverlight application

207 Views Asked by At

Edit: I do not need any patronising replies about how Silverlight is almost out of date. Of course I know this. When you work in software support for a company (a) you don't get to use a time machine to change choices made years ago and (b) you often have to support systems that aren't the latest because "just replace it" isn't necessarily possible. Yes this system is being phased out. If it is purely Silverlight that is reacting to a change from WebDev to IIS Express then please cite references to that effect.

I seem to have a very specific problem with my laptop that colleagues don't experience. When I run our Silverlight UI solution locally at the latest version I am always asked to sign in. However, my user credentials (the same ones I use to sign into my laptop) are always rejected.

The difference is that in the latest solution we are now invoking IIS Express.

Previously the solutions ran like this (via a launch batch file - I'm unclear what has altered within the solution) and if I return to using this form I am able to avoid the authentication

start webdev.webserver40.exe /port:{port number} /path:"%CD%\{application folder}"

whereas with IIS Express we are using this:

start iisexpress.exe /config:"%CD%\{solution folder}\.vs\config\applicationhost.config" /site:{site name as shown in applicationhost.config}

I've looked through the applicationhost.config file:

I've altered this at the end

<location path="{site path}">
    <system.webServer>
        <security>
            <authentication>
                <anonymousAuthentication enabled="true" />
                <windowsAuthentication enabled="false" />
            </authentication>
        </security>
    </system.webServer>
</location>

The security block looks fine:

           <access sslFlags="None" />
           <applicationDependencies>
                <application name="Active Server Pages" groupId="ASP" />
            </applicationDependencies>
           <authentication>
               <anonymousAuthentication enabled="true" userName="" />
               <basicAuthentication enabled="false" />
               <clientCertificateMappingAuthentication enabled="false" />
               <digestAuthentication enabled="false" />
               <iisClientCertificateMappingAuthentication enabled="false">
                </iisClientCertificateMappingAuthentication>
               <windowsAuthentication enabled="false">
                    <providers>
                        <add value="Negotiate" />
                        <add value="NTLM" />
                    </providers>
                </windowsAuthentication>
           </authentication>
           <authorization>
                <add accessType="Allow" users="*" />
            </authorization>
           <ipSecurity allowUnlisted="true" />

to my untrained eye.

Finally I even updated the csproj.user file

  <PropertyGroup>
    <UseIISExpress>true</UseIISExpress>
    <IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
    <IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
    <IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>
  </PropertyGroup>

use IIS Express was false and Windows was enabled and anonymous disabled.

but these settings were also true in the old code.

I'm really baffled as to what can be set on my machine.

Note: Windows 10, VS 2015.

0

There are 0 best solutions below