Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to I fix "The method or operation is not implemented"?

How to I fix "The method or operation is not implemented"?

Scheduled Pinned Locked Moved ASP.NET
helpsecuritytutorialquestionworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11369001
    wrote on last edited by
    #1

    When I run my code, when I want to check the user who is logged in (this is a web application), the method called is having an error saying The method or operation is not implemented. I need help to fix it by implementing the method. Here is where the error occurs

    try
    {
    foreach (string caseNumber in userEnteredCaseNumberList)
    {
    EditCandidateCaseModel newCandidate = new EditCandidateCaseModel();
    newCandidate.CaseNbr = caseNumber;
    newCandidate.RequestorInfoID = Convert.ToInt32(requestorItem.Value);
    newCandidate.EntryStaffUserName = Helpers.Authentication.GetADEmail(); //Calls public static string GetADEmmail method
    await CandidateCaseController.PostCandidate(newCandidate);
    }
    }
    catch (Exception ex)//shows The method or operation is not implemented.
    {
    string errorMsg = string.Format("An error has occured in {0}. \nException:\n{1}", "GetCasesButton_Click()", ex.Message);
    ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + errorMsg + "');", true);
    }

    Method that is called by line 8 with EntryStaffUserName. The error on on this method on line 7

    public static string GetADEmail()
    {
    string retVal = string.Empty;
    using (var context = new PrincipalContext(ContextType, "COURTS"))
    {
    UserPrincipal user = new UserPrincipal(context);
    user = UserPrincipal.FindByIdentity(context, IdentityType, Environment.UserName);//this is where there is an issue. I can see UserName has a value
    retVal = user.EmailAddress;
    }
    return retVal;
    }

    B 1 Reply Last reply
    0
    • U User 11369001

      When I run my code, when I want to check the user who is logged in (this is a web application), the method called is having an error saying The method or operation is not implemented. I need help to fix it by implementing the method. Here is where the error occurs

      try
      {
      foreach (string caseNumber in userEnteredCaseNumberList)
      {
      EditCandidateCaseModel newCandidate = new EditCandidateCaseModel();
      newCandidate.CaseNbr = caseNumber;
      newCandidate.RequestorInfoID = Convert.ToInt32(requestorItem.Value);
      newCandidate.EntryStaffUserName = Helpers.Authentication.GetADEmail(); //Calls public static string GetADEmmail method
      await CandidateCaseController.PostCandidate(newCandidate);
      }
      }
      catch (Exception ex)//shows The method or operation is not implemented.
      {
      string errorMsg = string.Format("An error has occured in {0}. \nException:\n{1}", "GetCasesButton_Click()", ex.Message);
      ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + errorMsg + "');", true);
      }

      Method that is called by line 8 with EntryStaffUserName. The error on on this method on line 7

      public static string GetADEmail()
      {
      string retVal = string.Empty;
      using (var context = new PrincipalContext(ContextType, "COURTS"))
      {
      UserPrincipal user = new UserPrincipal(context);
      user = UserPrincipal.FindByIdentity(context, IdentityType, Environment.UserName);//this is where there is an issue. I can see UserName has a value
      retVal = user.EmailAddress;
      }
      return retVal;
      }

      B Offline
      B Offline
      Blikkies
      wrote on last edited by
      #2

      Check the UserPrincipal.FindByIdentity functions if it has the following code in it:

      throw new NotImplementedException();

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups