I'm moving my web site from another host to Winhost. I don't want to cut over the DNS until I'm sure it's working properly. When I use the 'Secondary FTP' to test the site, I'm immediately presented with a "Windows Security" logon screen saying; The server xxxxx.w01.Winhost.com at xxxxx.w01.Winhost.com requires a username and password I need to give my Winhost ID and Password in order to get to the requested form - which is my logon form! Thoughts? In case it helps, here's (most of) my web.config; Code: <?xml version="1.0" encoding="UTF-8"?> <configuration> <appSettings> <!--<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />--> <add key="ChartImageHandler" value="storage=file;timeout=20;" /> </appSettings> <connectionStrings> <add name="ApplicationServices" connectionString="Server=123.123.123.123,25000;Database=DB123_yyyyy;Uid=DB123_yyyyy;Password=xxxxx" providerName="System.Data.SqlClient" /> <add name="yyyyyConnectionString" connectionString="Server=123.123.123.124,25000;Database=DB123_zzzzz;Uid=DB123_zzzzz;Password=xxxxx" providerName="System.Data.SqlClient" /> </connectionStrings> <system.web> <httpHandlers> <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=ghif3856ad364ghi" validate="false" /> </httpHandlers> <pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=ghif3856ad364ghi" /> </controls> </pages> <compilation debug="true" strict="false" explicit="true" targetFramework="4.0"> <assemblies> <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=ghif3856ad364ghi" /> <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=ghif3856ad364ghi" /> </assemblies> </compilation> <customErrors mode="Off" /> <authentication mode="Forms"> <forms loginUrl="~/Forms/Authenticate/Login/Login.aspx" timeout="2880" /> </authentication> <membership> <providers> <clear /> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> </providers> </membership> <profile> <providers> <clear /> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" /> </providers> </profile> <roleManager enabled="true"> <providers> <clear /> <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" /> </providers> </roleManager> <sessionState mode="InProc" timeout="30" /> <machineKey validationKey="EEEEEEEEEE6E566A138E290AA62FA98C4F9130E45D535EFC617BC632454EA60E74E76ADC953FE0E30434F39DEC8FFEF9A8713EA05EE9E369ABE117C4726A5207" decryptionKey="EEEEEEEEEE7B62DD1F1AD4E3EFBD82747C06BE0EB05820879BFD269AC4123877" validation="SHA1" decryption="AES" /> </system.web> <system.webServer> <modules runAllManagedModulesForAllRequests="true" /> <handlers> <remove name="ChartImageHandler" /> <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=ghif3856ad364ghi" /> </handlers> <security> <authentication> <anonymousAuthentication userName="yyyyyyyyy_web" password="[enc:AesProvider:eeeeeeeeeeenSbwNdMgqJYjZxta3RFxMMOxYFGmU2o=:enc]" /> </authentication> </security> </system.webServer> <system.net> <mailSettings> <smtp deliveryMethod="Network" from="yyyyy System Generated<[email protected]>"> <network host="mail.yyyyy.com" userName="[email protected]" password="123123123" port="587" /> </smtp> </mailSettings> </system.net> </configuration>
Anonymous Login needs to be enabled. You can either change it directly in the web.config file or use IIS7 Manager.
...But I want to use forms authentication, basically allowing visitors to only see my logon page until they're authenticated... Code: <authentication mode="Forms"> <forms loginUrl="~/Forms/Authenticate/Login/Login.aspx" timeout="2880" /> </authentication> I have 'Page Load' events in every other form redirecting them back to my login form if they're not authenticated. (I also don't see a way to enable "Anonymous Login" - unless you're suggesting that I change the above to <authentication mode="None">
You can use the Authentication module in IIS7 Manager to configure your web.config file. This Knowledge Base article has information on how to connect to your site using IIS7 Manager: http://support.Winhost.com/KB/a628/using-the-microsoft-iis-70-manager.aspx You need to enable Anonymous Authentication so that any user will be able to see the first page (login) of your website. This shouldn't affect access to your other webpages if set up properly.