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

  • Home
  • SEARCH
  • 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 7185317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:23:24+00:00 2026-05-28T18:23:24+00:00

This situation might seem strange but this is what i have to do: Situation,

  • 0

This situation might seem strange but this is what i have to do:

Situation, i have a sharepoint portal and there was such an issue that there might be a problem while retrieving user profiles that there might be too slow when a lot of people online and perfrom that kind of action, so there was made a descision to make a console application to test it out.

The console application needs to simulate behavior for retrieving the user profiles with as if many different users are doing that.

And there must be a log written.

The first question is this kind of testing a good way to really know where exactly the problme is?

And the other question is about my application, i have a strange behavior:

public class Program
    {
        static void Main(string[] args)
        {
            string filePath = @"C:\Users\User\Desktop\logfile.txt";
            string siteUrl = @"http://siteurl";
            int threads = 1;

            //Multiplicator multiplicator = new Multiplicator(filePath, siteUrl, threads);
            //Console.ReadLine();
            for (int i = 0; i < 100; i++)
            {
                Thread t = new Thread(Execute);
                t.Start();
            }

            Console.WriteLine("Main thread: " + Thread.CurrentThread.Name);
            // Simultaneously, do something on the main thread.
          }

        static void Execute()
        {
            for (int i = 0; i < 100; i++)
            {
                using (SPSite ospSite = new SPSite(@"http://siteurl"))
                {
                    SPServiceContext serviceContext = SPServiceContext.GetContext(ospSite);
                    UserProfileManager profileManager = new UserProfileManager(serviceContext);
                    UserProfile userProfile = profileManager.GetUserProfile("User Name");
                    string message = "Retrieved: " + userProfile.DisplayName + " on " +DateTime.Now + "by " Thread.CurrentThread.Name;
                    Console.WriteLine(message);
                }
            }
        }
    }

So the problem is i never get the name of the thread written why?
Thread.CurrentThread.Name is empty, is it normal, maybe i initialize the threading wrong? Altho many sources said that it is done like this?

  • 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-28T18:23:25+00:00Added an answer on May 28, 2026 at 6:23 pm

    Ok, I will go for your first question. No, there is a better way to do this.

    1. Put the site under load. Maybe a friend can hit F5 all the time or you run a batch file with 1000 lines of a curl get
    2. Attach the Visual Studio debugger to the webserver process
    3. Hit break 10 times and see where it stops most of the time. That is your hotspot/problem.

    This is called the poor mans profiler. It is built into every Visual Studio 😉

    In general, it is easy to find such problems by doing profiling. There are even sophisticated tools for this.

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

Sidebar

Related Questions

This might be a very basic and clueless question, but while I understand that
I have this situation: $(#button).toggle(function(){ $(#window).animate({top:'0%'},1000); },function(){ $(#window).animate({top:'-100%'},1000); }); but I need change it
I have this situation: There are a login page with a login form (form
This question might seem a repeat of previous ones. I have read through a
This might seem like a basic question but I'm still getting a handle on
In this situation I have two models, Comment and Score. The relationship is defined
I have this situation: http://jsfiddle.net/bRDgK/3/ In this situation I have a modal dialog with
I came across this situation while migrating our DB from Foxpro to SQL. Below
I have this situation: { float foo[10]; for (int i = 0; i <
I have this situation where I want to display a list of Administration objects

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.