Archive
LightSwitch for Games Part 2: OData Tutorial and User Account Management on the Server
NOTE: Although this series is aimed at small game developers, it is equally applicable to anyone wishing to learn how to use LightSwitch.
In part 1 of this series we looked at the rationale for using LightSwitch as a game data server and how to setup and publish a LightSwitch project on Windows Azure (optional). In this part, we’ll look at the server-side work needed to enable users to create their own accounts on the game network. We shall take a look at several client-side samples for registering and logging on in part 3 to complete the end-to-end process.
In this article, you will learn:
- What OData is, how it works and the underlying HTTP messages it uses
- How to use OData to retrieve and insert rows in your LightSwitch application database
- How users, permissions and roles are organized in a LightSwitch application
- How to create a desktop application to edit the users and roles in your application
- How to create a WCF RIA Service which provides an updateable view of two tables
- How to create an anonymous guest user with limited permissions (in this case, permission to add a new, real user)
- How to limit a user to accessing only their own data in a particular table
- How to create a user profiles table which can store additional information and automatically generates a new user in LightSwitch’s internal user authentication database when a new row (user) is inserted
- How to automatically assign new users to roles
This article assumes some familiarity with:
- HTTP (GET and POST methods, headers and request and response bodies)
- a basic understanding of either XML or JSON
- a basic understanding simple database structures (tables and rows) and basic SQL queries (SELECT and INSERT)
- a moderate understanding of C# (but you can just copy and paste the code if you aren’t too familiar with C#)
NOTE: You need Visual Studio Professional 2012 Update 2 or Update 3, or Visual Studio 2013 (Preview) to complete the tutorials in this article. Note that in Visual Studio 2013 (Preview), the organization of items in Solution Explorer has changed so some items may be in different places to those indicated below. Read more…
Katy got her first computer at age 3 and learned to read, write and code at the same time. She still can't read a map, though.
Recent Posts
- Nacon treat you like garbage: Roguebook and Day 1 DLC (Apex Predator Pack)
- IL2CPP Tutorial: Finding loaders for obfuscated global-metadata.dat files
- Reverse Engineering Adventures: Brute-force function search, or how to crack Genshin Impact with PowerShell
- Reverse Engineering Adventures: VMProtect Control Flow Obfuscation (Case study: string algorithm cryptanalysis in Honkai Impact 3rd)
- Reverse Engineering Adventures: Honkai Impact 3rd (Part 3)
- Reverse Engineering Adventures: Honkai Impact 3rd (IDA Decompiler Techniques) (Part 2)
- Reverse Engineering Adventures: Honkai Impact 3rd (Houkai 3) (IL2CPP) (Part 1)
- Reverse Engineering Adventures: League of Legends Wild Rift (IL2CPP)
Top Posts & Pages
- IL2CPP Reverse Engineering Part 1: Hello World and the IL2CPP Toolchain
- IL2CPP Tutorial: Finding loaders for obfuscated global-metadata.dat files
- Printing numbers in binary format in C++
- Welcome
- Reverse Engineering Adventures: Honkai Impact 3rd (Houkai 3) (IL2CPP) (Part 1)
- IL2CPP Reverse Engineering Part 2: Structural Overview & Finding the Metadata
- Reverse Engineering Adventures: Brute-force function search, or how to crack Genshin Impact with PowerShell
- Il2CppInspector Tutorial: How to create, use and debug IL2CPP DLL injection projects
- Reverse Engineering Adventures: League of Legends Wild Rift (IL2CPP)
- C++ Explained: Object initialization and assignment, lvalues and rvalues, copy and move semantics and the copy-and-swap idiom
Categories
- Blog Updates (10)
- Bluetooth (2)
- Filesystems (3)
- NTFS (3)
- IT Industry (3)
- Learning To Code (2)
- Media (5)
- Operating Systems (15)
- Linux (1)
- Symbian OS (1)
- Windows (9)
- Windows Azure (4)
- Programming (67)
- AJAX (1)
- Audio (8)
- C# (1)
- C++ (8)
- DirectX (4)
- Excel (1)
- Game Development Walkthroughs (23)
- JavaScript (1)
- LightSwitch (4)
- Parallel Programming (3)
- PHP (4)
- Visual Basic (1)
- Web Programming (7)
- Windows Development (6)
- XSL (5)
- Reverse Engineering (13)
- IL2CPP (12)
- Unity (Mono) (1)
- Science (5)
- About The Universe (3)
- Particle Physics (2)
- Software (18)
- Documentation (2)
- Simple2D (1)
- SimpleFMOD (1)
- Releases (16)
- Documentation (2)
- Video Games Industry (57)
- Blog & Opinion (9)
- Game Reviews (25)
- Satire (Mature Content) (23)
Archives
- June 2021 (1)
- February 2021 (1)
- January 2021 (7)
- December 2020 (1)
- November 2020 (1)
- August 2020 (1)
- June 2020 (1)
- July 2015 (2)
- April 2014 (2)
- March 2014 (2)
- January 2014 (3)
- November 2013 (3)
- October 2013 (1)
- August 2013 (11)
- July 2013 (2)
- May 2013 (3)
- April 2013 (1)
- March 2013 (4)
- February 2013 (11)
- January 2013 (14)
- October 2012 (4)
- September 2012 (7)
- June 2012 (3)
- May 2012 (12)
- October 2010 (3)
- September 2010 (2)
- June 2010 (10)
- May 2010 (6)
- April 2010 (16)
- March 2010 (11)
- February 2010 (4)
- October 2008 (2)
- September 2008 (2)
- March 2008 (2)
- February 2008 (2)
- January 2008 (3)
- December 2007 (1)
- September 2007 (3)
- August 2007 (1)
- July 2007 (1)
- June 2007 (2)
- April 2007 (1)
- February 2007 (3)
- November 2006 (1)
- October 2006 (3)
- September 2006 (1)
- July 2006 (3)