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 4584830
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:24:34+00:00 2026-05-21T21:24:34+00:00

I have a windows azure Webrole application using Silverlight on top of WCF+ASP.NET. I

  • 0

I have a windows azure Webrole application using Silverlight on top of WCF+ASP.NET. I found this useful ASP.NET provider for Azure tables in the Azure samples and implemented it. I authenticate my users with the WCF service System.Web.ApplicationServices.AuthenticationService.

It works great: I create my users with a very simple ASP.NET form, then I go to my Silverlight app and authenticate successfully, but when I shutdown the Azure development storage environment and restart it, I can’t log in again, even if the user is still in the Membership table.
I debugged the logging process and found that when the provider executes the query to the table, it throw an exception in this method:

private MembershipRow GetUserFromTable(DataServiceContext svc, string username)
    {
        SecUtility.CheckParameter(ref username, true, true, true, Constants.MaxTableUsernameLength, "username");

        DataServiceQuery<MembershipRow> queryObj = svc.CreateQuery<MembershipRow>(_tableName);

        var query = (from user in queryObj
                     where user.PartitionKey == SecUtility.CombineToKey(_applicationName, username) &&
                           user.ProfileIsCreatedByProfileProvider == false
                     select user).AsTableServiceQuery();

        IEnumerable<MembershipRow> allUsers = query.Execute();
        if (allUsers == null)
        {
            return null;
        }
        IEnumerator<MembershipRow> e = allUsers.GetEnumerator();
        if (e == null)
        {
            return null;
        }
        // e.Reset() throws a not implemented exception
        // according to the spec, the enumerator is at the beginning of the collections after a call to GetEnumerator()
        if (!e.MoveNext())
        {
            return null;
        }
        MembershipRow ret = e.Current;
        if (e.MoveNext())
        {
            throw new ProviderException("Duplicate elements for primary keys application and user name.");
        }
        return ret;
    }

the queryObj variable contains the user entry when I check during execution, but query looks like it contains an exception in one of its member. Finally, the execution fails when making the e.moveNext().

If I just delete all the Membership tables and blobs and recreate a user, it works just normally.

  • 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-05-21T21:24:35+00:00Added an answer on May 21, 2026 at 9:24 pm

    The samples from the sdk are not production ready. There are newer versions in the Windows Azure Toolkit for Windows Phone 7 and in the Windows Azure Training Kit. You might have problems in the dev environment if you don’t shut down your browser between different user sessions because of the session management in blob storage not getting cleared. We have used them in our book and tested with no problem.

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

Sidebar

Related Questions

I run an ASP.Net MVC3 application and have followed this Windows Azure How-To on
Currently I'm trying to port a web application(ASP.NET MVC) to windows azure and have
We have an windows Azure web role (typically ASP.NET application) with client side J-queries
I have a web application running on Windows Azure. It is built with ASP.Net
I have a Windows Azure Virtual Machine. I am able to view my ASP.Net
I have an ASP.NET MVC 4 site running perfectly well in an Azure WebRole.
I want to transfer my asp.net webforms app to windows azure and now have
I have MVC project on Windows Azure. This project has WebRole with method OnStart.
We have an ASP.NET MVC3 based Web role running on the Azure cloud, using
I have deployed an ASP.NET web application to Azure running in a web role.

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.