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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:00:01+00:00 2026-05-22T23:00:01+00:00

I get this error when calling my service: Server Error in ‘/’ Application. ——————————————————————————–

  • 0

I get this error when calling my service:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: There was an error while trying to serialize parameter http://DSD.myCompany.net/DsdWebServices/2011/05/:config. The InnerException message was 'Type 'System.OrdinalComparer' with data contract name 'OrdinalComparer:http://schemas.datacontract.org/2004/07/System' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details.

Source Error: 


Line 130:            passwordAttemptWindow="10"
Line 131:            passwordStrengthRegularExpression=""
Line 132:            type="DsdWebsite.Providers.DsdMembershipProvider, DsdWebsite.Providers" />
Line 133:      </providers>
Line 134:    </membership>


Source File: C:\Development\DSD Website\WebUI\web.config    Line: 132 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5444; ASP.NET Version:2.0.50727.5420 

The service is a data service for a membership provider. I created a MembershipUser DTO to move data back and forth across the service. It uses only standard classes: string, int, DateTime. I use Guid instead of object for the providerUserKey.

The interface for the service looks like this:

[ServiceContract(Namespace = "http://DSD.myCompany.net/DsdWebServices/2011/05/")]
[ServiceKnownType(typeof(MembershipUserDTO))]
[ServiceKnownType(typeof(NameValueCollection))]
[ServiceKnownType(typeof(Guid))]
[ServiceKnownType(typeof(DateTime))]
public interface IDsdMembershipProviderService
{
    [OperationContract]
    void Initialize(string name, NameValueCollection config);

    [OperationContract]
    MembershipUserDTO CreateUser(string username, 
        string salt,
        string encodedPassword,
    ...

The DTO looks like this

namespace DsdWebsite.Services.Providers
{
    [Serializable]
    [DataContract]
    [KnownType(typeof(Guid))]
    [KnownType(typeof(DateTime))]
    public class MembershipUserDTO
    {
        public MembershipUserDTO(string providerName, string userName, Guid providerUserKey, string email,
                              string passwordQuestion, string comment, bool isApproved, bool isLockedOut,
                              DateTime creationDate, DateTime lastLoginDate, DateTime lastActivityDate,
                              DateTime lastPasswordChangedDate, DateTime lastLockoutDate,
                              string firstName, string lastName, string cellPhone, string officePhone,
                              string brokerId, bool isAdmin, bool mustChangePassword)
        {
            ProviderName= providerName;
            UserName = userName;
            ProviderUserKey= providerUserKey;
            Email= email;
            PasswordQuestion= passwordQuestion;
            Comment= comment;
            IsApproved=isApproved;
            IsLockedOut= isLockedOut;
            CreationDate= creationDate;
            LastLoginDate= lastLoginDate;
            LastActivityDate= lastActivityDate;
            LastPasswordChangedDate = lastPasswordChangedDate;
            LastLockoutDate=lastLockoutDate;
...

Finally, my web.config looks like this:

<membership
 defaultProvider="DsdMembershipProvider"
 userIsOnlineTimeWindow="15"
 hashAlgorithmType="">   <providers>
     <clear/>
     <add
         name="DsdMembershipProvider"
         connectionStringName="DsdMembershipConnectionString"
         enablePasswordRetrieval="true"
         enablePasswordReset="true"
         requiresQuestionAndAnswer="true"
         applicationName="/DsdWebsite/"
         requiresUniqueEmail="true"
         passwordFormat="Encrypted"
         maxInvalidPasswordAttempts="5"
         minRequiredPasswordLength="7"
         minRequiredNonalphanumericCharacters="0"
         passwordAttemptWindow="10"
         passwordStrengthRegularExpression=""
         type="DsdWebsite.Providers.DsdMembershipProvider,
 DsdWebsite.Providers" />  
 </providers> </membership>

How can I determine what type or object is causing the error?
Thanks

  • 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-22T23:00:02+00:00Added an answer on May 22, 2026 at 11:00 pm

    Use following ServiceKnownTypeAttribute constructor to specify type of class (declaringType) containing the static method methodName that will return service known types:

    public ServiceKnownTypeAttribute(
        string methodName,
        Type declaringType
    )
    

    Inside the aforementioned static method add all service known types that are already added (although I think you would do good without DateTime and Guid), and add System.OrdinalComparer as well.

    The catch is that System.OrdinalComparer is internal class so you will have to get the type via reflection.

    EDIT:

    System.OrdinalComparer is part of mscorlib assembly. Basically you can get its type in a following manner:

    Type[] types = typeof( string ).Assembly.GetTypes();
    

    and then you can retrieve the wanted type by name (using Linq, add necessary using statements).

    Type type = types.Where( x => x.FullName == "System.OrdinalComparer" );
    

    Previous two line can be combined in one, for simplicity done using two lines.

    If you need more details, just say.

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

Sidebar

Related Questions

I get no error when calling my WCF service methods except in one. This
I get this error when debugging my ASP.NET web application after I trigger an
I get this error: Can't locate Foo.pm in @INC Is there an easier way
I get this error on an update panel within a popupControlExtender which is within
I get this error when I do an svn update : Working copy XXXXXXXX
I get this error:- You have an error in your SQL syntax; check the
We get this error in Visual Studio 2005 and TFS very often. Can anyone
i get this error {Method 'System.DateTime ConvertTimeFromUtc(System.DateTime, System.TimeZoneInfo)' has no supported translation to SQL.}
I get this error message when installing SQL 2005 Analysis services. The cabinet File
I get this error: System.Reflection.TargetException: Object does not match target type. when trying to

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.