Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 19th, 2015, 07:34 PM
Authorized User
 
Join Date: Aug 2014
Posts: 34
Thanks: 3
Thanked 0 Times in 0 Posts
Default Uploaded pages to Sql Server - Now no index.html or login

Hi all and TIA for taking a look at my web.config.

I have gone through the 4.5 book creating files and my web.config as instructedand have pretty much finished. Great text. I have just uploaded my development pages into production on my web server (sql).

When I type in my web address without any /someUrl.aspx(or html) I would normally get my index.html page, but instead I am taken to:

my web address/login.aspx/?ReturnUrl = %2f - instead of my index.html page?

If I try and log in to my site from that page I get Server Error "Login in Failed for PhX3/Iusr_XXXXXXX

My sense is that my web.config file needs help? I have tried most everything I have found on the net to correct this but nothing seems to work? Below please find my web.config with some privacy changes, but I'm really stuck here. thanks. Cliff

Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  </configSections>
  <connectionStrings>
    <add name="GolfDatabaseConnectionString1" connectionString="Data Source=esherr01.db.xyz.com;Initial Catalog=esherr01;User ID=esherr01; Password='xyz';Integrated Security=True"
      providerName="System.Data.SqlClient" />
   <add name="GolfDatabaseEntities10" connectionString="metadata=res://*/App_Code.GolfHandicap.csdl|res://*/App_Code.GolfHandicap.ssdl|res://*/App_Code.GolfHandicap.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=esherr01.db.xyz.com;Initial Catalog=esherr01;User ID=esherr01; Password='xyz';integrated security=True;multipleactiveresultsets=True;application name=EntityFramework&quot;"
      providerName="System.Data.EntityClient" />
    <add name="GolfDatabaseConnectionString2" connectionString="Data Source=esherr01.db.xyz.com;Initial Catalog=esherr01;User ID=esherr01; Password='xyz';Integrated Security=True;MultipleActiveResultSets=True;Application Name=EntityFramework"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <appSettings>
       <add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForms" />
       <add key="autoFormsAuthentication" value="false" />
       <add key="enableSimpleMembership" value="false"/>
   </appSettings>
  <system.web>
    <trust level="Full" />
    <trace mostRecent="true" enabled="true" requestLimit="1000" pageOutput="false" localOnly="true" />
    <customErrors mode="Off">
    </customErrors>
    <authentication mode="Forms">
      <forms timeout="1440"/>
    </authentication>
    <authorization>
      <deny users="?" /> 
    </authorization> 
    <pages theme="DarkGrey">
      <controls>
        <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
      </controls>
    </pages>
    <compilation debug="true" targetFramework="4.5">
     <assemblies>
        <add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
      <buildProviders>
        <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />
      </buildProviders>
    </compilation>
    <httpRuntime targetFramework="4.5" />
    <profile defaultProvider="DefaultProfileProvider">
      <providers>
        <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="GolfDatabaseConnectionString1" applicationName="/" />
      </providers>
    </profile>
    <membership defaultProvider="DefaultMembershipProvider">
      <providers>
        <add name="DefaultMembershipProvider"
             type="System.Web.Providers.DefaultMembershipProvider, 
             System.Web.Providers, Version=2.0.0.0, Culture=neutral,
             PublicKeyToken=31bf3856ad364e35"
             connectionStringName="GolfDatabaseConnectionString1" 
             enablePasswordRetrieval="false" 
             enablePasswordReset="true" 
             requiresQuestionAndAnswer="false"
             requiresUniqueEmail="false" 
             maxInvalidPasswordAttempts="5" 
             minRequiredPasswordLength="6" 
             minRequiredNonalphanumericCharacters="0" 
             passwordAttemptWindow="10" 
             applicationName="/" />
      </providers>
    </membership>
    <roleManager defaultProvider="DefaultRoleProvider">
      <providers>
        <add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="GolfDatabaseConnectionString1" applicationName="/" />
      </providers>
    </roleManager>
    <!--
            If you are deploying to a cloud environment that has multiple web server instances,
            you should change session state mode from "InProc" to "Custom". In addition,
            change the connection string named "DefaultConnection" to connect to an instance
            of SQL Server (including SQL Azure and SQL  Compact) instead of to SQL Server Express.
      -->
    <sessionState mode="InProc" customProvider="DefaultSessionProvider">
      <providers>
        <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="GolfDatabaseConnectionString1" />
      </providers>
    </sessionState>
  </system.web>
  <system.net>
    <mailSettings>
      <smtp deliveryMethod="Network" from="Cliff Sherrill &lt;[email protected] &gt;">
        <network enableSsl="true" host="smtp.gmail.com" userName="xyz.com" password="xyz" port="587" />
      </smtp>
    </mailSettings>
  </system.net>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v12.0" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>
</configuration>
I have turned Off customErrors and set compilation to true for debugging purposes. I know that I will change these as soon as all is well. Do you see anything obvious?

thaks agai!

Last edited by ssezotman; March 19th, 2015 at 07:37 PM.. Reason: Ttile change
 
Old March 20th, 2015, 10:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You set up the site to require a user to authenticate using forms authentication for all pages in the site.

Your error message seems to suggest to try to log in with a Windows / domain account, but you should log in using an account created for the web site using the Website Administration tool as explained in the book.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 20th, 2015, 03:12 PM
Authorized User
 
Join Date: Aug 2014
Posts: 34
Thanks: 3
Thanked 0 Times in 0 Posts
Default No Web Site Administration Tool

Hi

I am using Microsoft Visual Studio Express 2012 and after Google searching, it appears that the Web Site Administration Tool was removed from this version.

Other suggestions you have for my issue?

I found a .rar file for MyWSAT V3.5.4 is this program worth having?
Is there a fix for my existing web.config file?

Thanks again,
Cliff
 
Old March 21st, 2015, 10:33 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Take a look at this post: Where is the Website Administration Tool?

Cheers,

Ima
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Full SQL Server instance instead of SQL Server Express lagonave BOOK: Professional ASP.NET MVC 2 1 December 14th, 2010 02:22 PM
Difference between SQL Server 2000 and SQL Server 2005 leena K SQL Server 2005 4 March 31st, 2009 09:07 AM
Conflict in SQL Server 2000 and SQL Server 2005 ayan.mukherjee SQL Language 0 June 30th, 2008 03:34 AM
migrating from sql server 2000 to sql server 2005 abinashpatra SQL Server 2005 2 December 1st, 2006 03:45 PM
database uploaded to the server rongfu84 Java Databases 1 January 8th, 2006 02:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.