IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact

How to Setup SQL Express LocalDB in ASP.NET

Microsoft SQL Server Express LocalDB should be used in place of the SQL Server Express user instance feature which is deprecated. It is more suitable for developers as it runs on-demand (instead as a service) with your Windows credential and without the need the need of complex configurations.

In Visual Studio 2013, if you want to have it setup a default database using a SQL Server LocalDb in your Web.Config, make sure you choose Individual User Account as your authentication mode.

New ASP.NET Project - Select a template

Then you can modify the parameters and commit Update-Database later.

<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, 
         visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <connectionStrings>
    <add name="DefaultConnection" 
         connectionString="Data Source=(LocalDb)v11.0;AttachDbFilename=|DataDirectory|aspnet-WebApplication1-20131218041336.mdf;Initial Catalog=aspnet-WebApplication1-20131218041336;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <appSettings>
    ...

Further Reading

SQL Server 2012 Express LocalDB
Introducing LocalDB, an improved SQL Express

December 18, 2013 Filed Under: .NET, How To Tagged With: ASP.NET, MVC

How to Use a Custom Email Address in Gmail

If you want to use Gmail with custom domain to send out email (i.e., [email protected]), here are the steps you can follow to set it up.

This Google custom email tutorial will demonstrate the use of popular webhosting companies such as SiteGround and Hostgator, but it applies to any other webhosts services that provide SMTP services.

  1. Assuming an email account is already setup, if your webhosting company uses cPanel, you can find the instructions by clicking on the drop-down and select Configure Email Client.

    cPanel Email Accounts Setup

  2. As a new page opens up, scroll to the bottom and look for Manual Settings. Copy the Mail Server Username and Outgoing Mail Server (SSL) information. For the Outgoing Mail Server, typically if you use SiteGround, the server would look like secure####.sgcpanel.com. Or Hostgator, gator###.hostgator.com. Bluehost would look something like box###.bluehost.com.

    cPanel Manual Settings for Email Configurations

  3. Now login to your Gmail account and go to Settings on the top-right corner.

    Gmail Settings

  4. Select Accounts, then click on a link Add another email address you own.

    Gmail Accounts Settings

  5. On the next dialog box, type in the name you want to be displayed every time an email sent out from that address, and the email address you created earlier.

    Gmail Add Email Address

  6. While we highly recommend SiteGround for your webhosting due to its reliability and speed, this step was already illustrated using Hostgator. But whether you use SiteGround, Hostgator or Bluehost*, the step is exactly the same. Make sure you paste the information copied from Step 2 for the SMTP Server and Username. Click Add Account>> after you’re done.

    Gmail SMTP Settings Bluehost
    Gmail SMTP Settings Hostgator

  7. Google will send a verification code to your new email address, which you need to enter on the verification window. Once you click Verify, your new email address is ready to use.

    Gmail Email Address Verification

Now, whenever you compose a new email, you have the options to use either your original gmail domain name or the new email address with your custom domain.
Gmail Compose New Message

You can repeat the steps above to add more than one custom email address.

Spending the extra effort to setup domain email with Gmail can make your email look more professional for your business. Hope it helps.

* Due to performance issue we have experienced with Bluehost, we can no longer recommend it as a webhost. Instead, we highly recommend SiteGround as a webhost. We’re very impressed by its performance and reliability that we added SiteGround as our affiliate.

December 10, 2013 Filed Under: How To Tagged With: Google

Upgrading SQL Express to Other Edition

In SQL Server 2012, upgrading edition is actually easier than ever since the data is stored under the same directory.

  1. Backup your data data. For default installation, the data can be found in the following directory:
    C:\Program Files\Microsoft SQL Server

  2. Have a local copy of SQL 2012 setup files as it will make the installation process much faster.

  3. Run setup.exe

  4. When SQL Server Installation Center launches, click on Maintenance on the left pane and select Edition Upgrade on the right.

    SQL Server Installation Center - Edition Upgrade

  5. Make sure after the Setup Support Rules shows nothing failed.

    SQL Server 2012 Setup - Setup Support Rules

    Click OK. It will run again one more time to make sure that the computer is not a domain controller. Click Next when done. You need to do this a couple times until you see the screen where you need to enter the product key.

  6. Enter the product key, and click Next.

    SQL Server 2012 - Enter product key

  7. Pick the SQL Server instance you want to upgrade.
    Click Next > until you reach the Ready to upgrade edition.

    SQL Server 2012 - Select Instance

  8. Check the summary on the Ready to upgrade edition.
    If everything looks correct, click on the Upgrade button.

    SQL Server 2012 - Ready to upgrade edition summary

  9. Once done, you should see all statuses as Succeeded in the Complete screen. Click Close.

    SQL Server 2012 - Edition Upgrade Complete

If you want to double check, connect to the database open a New Query window and run this SQL statement:

SELECT @@VERSION

 
It should display result similar to this:

Microsoft SQL Server 2012 - 11.0.2100.60 (X64)
​Feb 10 2012 19:39:15
​Copyright (c) Microsoft Corporation
​Developer Edition (64-bit) on Windows NT 6.0 <X64> ...

 

SQL Server Edition Query
 
You might also want to remove the SQL Server 2012 setup files from the local hard drive.
 
 

November 21, 2013 Filed Under: Database, How To Tagged With: SQL Server

How to Delete Chat History on LINE

Naver LINE messaging is one of the most popular app in Asia that is fun to use and useful because it’s available in multiple platforms.

One thing that can be tricky and confuses many people though is how to delete its chat history.

If you’re using an iOS version of LINE, you can delete your chat history by doing the following steps:

  1. Launch LINE

  2. Tap on …More

    Naver LINE Chats Settings

  3. Tap Settings

    Naver LINE Chats More Settings

  4. Select Privacy

    Naver LINE Chats Privacy Settings

  5. Tap on Clear Chat History

    Naver LINE Chats Settings - Clear Chat History

Note: Make sure this is really what you want to do as the whole chat history for all your contacts will be deleted and there’s no way to restore it.

November 19, 2013 Filed Under: How To Tagged With: iOS

How to Customize Master Page in SharePoint

Go to Site Action and select Edit in SharePoint Designer.

Edit in SharePoint Designer Menu

In the Master Pages Gallery, you will find three files:

  • v4.master
  • minimal.master
  • default.master

Don’t let the name default fool you, the one that is used for page layout in SharePoint 2010 is actually v4.master NOT default.master. So we want to copy v4.master before we make our customization and modify the copy instead (v4_custom.master).

Once done, just set it as a default page as indicated by the screenshot below (just do one or the other, not both).

SharePoint: Master Pages, Set Default Master Page

October 11, 2013 Filed Under: How To Tagged With: SharePoint

« Previous Page
Next Page »
Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2026 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure