Getting Started with ASP.NET 4.5 Web Forms and Visual Studio 2013 - Wingtip Toys

This download has been created for the ASP.NET 4.5 Web Forms and Visual Studio 2013 (Wingtip Toys) tutorial series. This series of tutorials guides you through the steps required to create an ASP.NET Web Forms application using Visual Studio Express 2013 for Web and ASP.NET 4.5.

C# (16.7 MB)
4.3 Star
409,327 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • After logging in with Google, the site redirects me back.
    4 Posts | Last post August 01, 2019
    • Hi everybody,
      I've done the stuff until the page 143. After I login with Google, it just redirects me back to the login page, where I can choose again either Google or create account.
      I've gone through the code from here, but couldn't find any issues.
      Can you point me in the right direction? :)
    • Did you ever figure this out? I am at this same part and cannot figure what I am doing wrong?
    • Ok, had the same issue hopefully this help. 
      1. I had to right click the project, Click properties
      2. Go to Application, change target Framework to .NET Framework to 4.7.2 (if that isn't there 
          click install other frameworks and scroll down to the 4.7.2 Developer - and download it)
      3.Re-build the project and try google auth again.
      Hopefully you are now good, if you now get a SQL network issue then continue below:
      -SQL Network error
      This error happens because the auth services are unable to connect your localDB (or so it seems, that what I have found I may be wrong). In this case you actually need to install and setup SQL express (make sure to install the SQL Management studio as well).
      1. Open SQL Management Studio
      2. Change Server name to: (localDB)\V11.0
      3. Windows Auth
      4. Right Click the WingtipsToys DB, Tasks then backup
      5. Backup Type = Full, click Add next to the destination box, then the ... next to file name
      6. Navigate to the exact folder where the project local DB file is, then name the file (ex: 
      7. Click OK (if error make sure all other connections are closed, ie. shutdown Visual studio)
      8. Disconnect form the localDB connect in SQL Management studio
      9. Connect to you SQLExpress, right click Databases - then restore database
      10. Bubble in Device, then click the ..., then Add
      11. Navigate back to the same dir where you created the .bak file
      12. Click OK, then OK again. Now you have the project database on your own SQL Server
      13. Google on how to allow remote connections to SQL (I'm not going into that)
      14. Open up the visual studio project, open the web.config
      15. Change your connection string to the following: 
          <add name="DefaultConnection" connectionString="Data Source=@HOSTNAME@\SQLEXPRESS;Initial Catalog=WingtipToys;User ID=******;Password=*******" />
      16. Replace @HOSTNAME@ to your PC name that you installed SQLExpress on, and replace the User ID and Pass
    • 17. Or if your SQL is windows auth the the connection would be:
          <add name="DefaultConnection" connectionString="Data Source=@HOSTNAME@\SQLEXPRESS;Initial Catalog=WingtipToys;Integrated Security=True" />
      18.Now Save the config file, re run the app and you should be all set!
  • How to Create Models Folder
    1 Posts | Last post July 06, 2019
    • I am using Visual Studio 2019 for this tutorial. How do I add Models Folder in the ASP.Net Web Forms tutorial? Do I just add a Models folder on the project folder OR do something special? What do I do after adding Models folder besides adding the classes? Also VS2019 doesn't allow me to add a new folder in the project root 
  • Running the Application and Creating the Database
    1 Posts | Last post March 28, 2019
    • Hi everyone, It´s all good until page 57, I start the project and for some reason, it gives an error. I followed all the steps and I don´t know what to do.
      This is what it shows:
         System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +5989696
         System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +95
         System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +59
         System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +27
         System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +167
         System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key) +61
         System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +87
         System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection) +254
         System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config) +79
         System.Data.Entity.Internal.LazyInternalConnection.Initialize() +253
         System.Data.Entity.Internal.LazyInternalConnection.get_ProviderName() +36
         System.Data.Entity.Internal.LazyInternalContext.get_ProviderName() +39
         System.Data.Entity.Internal.DefaultModelCacheKeyFactory.Create(DbContext context) +159
         System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +445
         System.Data.Entity.Internal.InternalContext.Initialize() +31
         System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +39
         System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +138
  • Sql server IIS 7 Azure deployment configuration issue
    1 Posts | Last post February 16, 2019
    • Hi ErikReitan,
      The solution works fine within the context of Visualstudio 2013/SQLEXPRESS/Chrome/IE. 
      But, have problem starting this web application from my local host (Though deployed successfully is IIS7/Sql2016 in my local machine & Microsoft azure portal), The same issue also occurs when tried in microsoft azure website. 
      It appears something on "RoleActions" (Line #27) Add role "CanEdit"  and triggers error Line # 59 from Global.asax.cs file. I have spoken to couple of Microsoft folks and they are not sure.
      http://localhost/ErrorPage.aspx?handler=customErrors%20section%20-%20Web.config - Error line # 59 got invoked everytime.
      Can you pls help me?.Thanks and regards, Arul (
      Thank you.
  • Prevent redirecting to login.aspx page after clicking "Pay with PayPal" button?
    3 Posts | Last post October 22, 2018
    • Hi everyone,
      From this example, I have integrated PayPal for my project. I am up to the "Review Order Details" heading of the "Checkout and Payment with PayPal" section. I have used my own login and register pages instead of the inbuilt register and login controls included in the ASP.NET web forms template. 
      When the user adds a product to the basket and clicks the "Pay with PayPal" button, they are redirected to the login.aspx page.  
      Would anyone know if it is possible to redirect to my own login page instead of the login form which is contained within the Account folder? 
      Many Thanks,
    • Did you every figure it out? I am stuck at this part too.
    • If you delete web.conf file in checkout folder then it will not redirect you on the login page, if this answer will work please let me know
  • How to upgrade localdb
    3 Posts | Last post October 11, 2018
    • I downloaded the complete project. When I opened it I got a message saying I don't have the version of localdb that the project uses and I must double-click somewhere to change it. I can't figure out where to change it or what to change it to. Probably I need to change the Web.config file but I can't get that to work. Other databases in my system that work use "(localdb)\ProjectsV13" but that does not work for this.
      I try not to put sample projects into my VS projects folder, I have a different folder I use for samples. Does the sample we download require that it be in the VS projects folder? If that is a requirement then that explains why I cannot get it to work.
      I have not yet gone through the tutorial. If I can build the project from scratch then I will use the developer's edition of SQL Server for it. I assume I can convert the existing Web.config to use the developer's edition of SQL Server but I don't know enough about SQL Server to know how to do that.
    • Did you get it to work?... I have the same issue and I don't have any clue what do. Any help would be appreciated
    • If you are using a higher version of Visual Studio eg 2015 or 2017- Please update the web.config file to be as follows:
          <!--<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-WingtipToys;Integrated Security=True" providerName="System.Data.SqlClient" />-->
           <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=aspnet-WingtipToys;Integrated Security=True" providerName="System.Data.SqlClient" />
          <add name="WingtipToys" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\wingtiptoys.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />
  • External Authentication - Log in using Google account
    2 Posts | Last post July 17, 2018
    • I am testing the app on IIS Express local server but although I manage to get authenticated with Google, the app returns to the Log in page and I get no redirection to the RegisterExternalLogin.aspx/Association Form page.
      Any suggestions?
    • I am having the same issue and cannot figure out the issue. Anyone has suggestions?
  • Dont get the navigation bar displayed
    2 Posts | Last post July 17, 2018
    • I am new to and follow the Wingtip Toys tutorial. I am very annoyed to ask this question:
      When running the Application and Creating the Database in chapter “UI and Navigation” all seems to be alright, but I do not get the blue top navigation bar displayed in Chrome:
      <ul class="nav navbar-nav">
                              <li><a runat="server" href="~/">Startseite</a></li>
                              <li><a runat="server" href="~/About">Informationen</a></li>
                              <li><a runat="server" href="~/Contact">Kontakt</a></li>
                              <li><a runat="server" href="~/ProductList">Products</a></li>
      How is this possible?
      Also, I have ScriptManager – Unnamed3.
      I cannot discover any difference in my Site.Master file to the Site.Master file of the complete projects, which runs perfectly. However, unless for the unfilled protected void Page_Load Method in the cs file of the full project.
      Hopefully there is an easy answer, regards Harald 
    • Make sure you are using the correct version of bootstrap
  • SqlException on run (0x80131904)
    2 Posts | Last post May 20, 2018
    • Hello,
      I not sure what's going on with this one, I tried opening my firewall port as well as enabling all the SQL services on my computer.
      I was diligent in following the directions but, i feel like i may be missing a pre-requisite SQL software.
      I am getting the following error:
      [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details
    • Hello, your problem has to do with the SQLEXPRESS service.
      In the Start Menu in your Windows computer, search for "Services.msc". Then in the list of the services, look for "SQL Server (SQLEXPRESS)" then right click and select "Start" and then wait for a couple of seconds and you're good to go.
      Here's a picture:
  • Getting errors in Login.aspx.cs and Register.aspx.cs
    3 Posts | Last post February 02, 2018
    • I'm stuck with these two errors in Login.aspx.cs and Register.aspx.cs. The errors are the same in both pages, the error is Using the generic type 'UserManager<TUser, TKey>' requires 2 arguments. I wonder if i am the only one experiencing this kind of issue because out of the whole comments about this tutorial i couldnt find any one with similar problem. But i notice something, there are some slight defferences between codes that are inside tutorial content and the source code downloadable of the tutorial.
      PLS Any help will be appreciated
    • I am also having this same issue
    • The answer is in the downloadable source.  In Login.aspx.cs copy everything from below the "// Validate the user..." comment down through to the bottom of file from the downloaded source to your project.  In Register.aspx.cs you will just need the following 2 lines put in between the top of the CreateUser_Click block and the IdentityResult... line:
                  var manager = Context.GetOwinContext().GetUserManager<ApplicationUserManager>();
                  var user = new ApplicationUser() { UserName = Email.Text, Email = Email.Text };
      You'll also want to take a look at the app.UseGoogle... procedure at the bottom of the Startup.Auth.cs file.
      Happy coding!
1 - 10 of 119 Items