Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8070163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:19:04+00:00 2026-06-05T13:19:04+00:00

I have a web service that needs to be protected from unauthorized users. I

  • 0

I have a web service that needs to be protected from unauthorized users. I need to expose a web service operation to Authorize a user, based on username and password. The response to the user validation request should contain a security token. That security token contains some embedded user properties that the client applicatino can use, but when encrypted, will also be used to authenticate subsequent web service operations. The unencrypted token looks something like this:

UID=444; DTE=2012-06-01T14:01:54.9571247Z; GID=1; WID=00:1C:B3:04:85:11; SID=lit3py55t21z5v55vlm25s55;

I can use a symmetric key algorithm as the key can be a shared secret between client and server (I control both). I have implemented the following Rijndael example using SHA1 and a key size of 256.

This code is often quoted across the internet, but Microsoft themselves, state in relation to Rijndael:

The Rijndael class is the predecessor of the Aes algorithm. You should
use the Aes algorithm instead of Rijndael. For more information, see
the entry The Differences Between Rijndael and AES in the .NET
Security blog.

Are there any security concerns I should have? If so, how would you change the example code, or can anyone provide a better, more secure example?

Finally, as an alternative, I am considering using Windows Azure Access Control Service to issue security tokens against my own identity provider, and using that token to get user account data as a separate call. Since the application is running in Azure, would this be a better implementation? Would anyone like to share their experience of using ACS for such an architecture?

BTW: The client application is iOS 5.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:19:05+00:00Added an answer on June 5, 2026 at 1:19 pm

    Instead of building something yourself you could use the FormsAuthentication.Encrypt method. This method will encrypt and sign your FormsAuthenticationTicket (this ‘ticket’ can contain a username with additional information). By signing your ticket it also prevents tampering (this is based on the machine key).

    The encrypted ticket is simply a string you could send to the mobile device. Then, for each other request you could simply send the token and decrypt it server side. That’s it for the authentication part.

    Now, if you want to send encrypted data to your client I suggest you simply transfer the data over HTTPS (the same applies to your token).

    Reference: http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.encrypt.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope you can help me. I have a web service that needs to
I have a web service on an insecure network that needs authorization. I wish
I have a synchronous web service call that returns a message. I need to
I have code that does a web-service request. While doing this request I need
I have a flex client connecting to a web service that needs an authentication
I have a web service that needs different settings for different environments (debug, test,
I have a JAX-RPC (Java) web service that needs to return a complex polymorphic
I have a web service that returns about 100 photos and I would like
I have a web service that is processed on the Spring end as follows:
I have a web service that requires special headers to be sent in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.