Differences between revisions 1 and 10 (spanning 9 versions)
Revision 1 as of 2020-10-08 00:07:23
Size: 349
Editor: scot
Comment:
Revision 10 as of 2020-10-08 01:52:51
Size: 1693
Editor: scot
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Step 1: These directions are based on [[https://chsakell.com/2013/04/09/authenticate-wcf-clients-using-the-asp-net-membership-provider/|chsakell's Blog Post]]
Line 5: Line 5:
 * Install Sql Server Express (default installation will work. Instance = [servername]\SQLEXPRESS). '''Step 1: Database Setup'''

* Install Sql Server Express
  * Make sure to use both Windows and SQL authentication
 * Instance = [servername]\SQLEXPRESS).
Line 7: Line 11:
 * Start SSMS and connect to [servname]\SQLEXPRESS
   * Right click on the server and select properties
   * Select the connections page
   * Click allow remote connections and select ok.
 * Start Sql Server Configuration Manager
   * Set the following elements [[attachment:SqlConfig.png]]
   * Under "SQL Server Services" Right click on "SQL Server (SQLEXPRESS)" and click restart.
 * Add a Windows firewall rule to allow incoming connections to port 1433. (if you are not sure how to do this, ask an IT major or google it)
   * You can now remotely connect to the server using just the IP address. Try it on SSMS
Line 9: Line 22:
   * Give it a name "MovieUsers"    * Give it a name "!MovieUsers"
 * Run C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regsql.exe
   * Choose the Configure SQL Server for application services option and select next.
   * Fill in the server name and append "\SQLEXPRESS" e.g. CPTR446\SQLEXPRESS
   * Leave Windows authentication selected and Drop down the database selection. You should see !MovieUsers. Select it and click next, next, finish.

That should finish the database setup.

'''Step 2: Configure your service to use the database for authentication'''

Adding Authentication/Authorization

These directions are based on chsakell's Blog Post

Step 1: Database Setup

  • Install Sql Server Express
    • Make sure to use both Windows and SQL authentication
    • Instance = [servername]\SQLEXPRESS).
  • Install Sql Server Management Studio (SSMS) on the server
  • Start SSMS and connect to [servname]\SQLEXPRESS
    • Right click on the server and select properties
    • Select the connections page
    • Click allow remote connections and select ok.
  • Start Sql Server Configuration Manager
    • Set the following elements SqlConfig.png

    • Under "SQL Server Services" Right click on "SQL Server (SQLEXPRESS)" and click restart.
  • Add a Windows firewall rule to allow incoming connections to port 1433. (if you are not sure how to do this, ask an IT major or google it)
    • You can now remotely connect to the server using just the IP address. Try it on SSMS
  • Create a database
    • In SSMS, right click on the databases folder, select New Database...
    • Give it a name "MovieUsers"

  • Run C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regsql.exe

    • Choose the Configure SQL Server for application services option and select next.
    • Fill in the server name and append "\SQLEXPRESS" e.g. CPTR446\SQLEXPRESS
    • Leave Windows authentication selected and Drop down the database selection. You should see MovieUsers. Select it and click next, next, finish.

That should finish the database setup.

Step 2: Configure your service to use the database for authentication

WebServices/ProgrammingHomeworks2020/HW05 (last edited 2020-10-11 20:14:58 by scot)