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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:43:48+00:00 2026-06-03T12:43:48+00:00

I have developed in c# 2 applications. One ASP .NET web service and a

  • 0

I have developed in c# 2 applications. One ASP .NET web service and a WinForms client that uses the web service. The client is distributed to many customers. For one of these customers, suddenly the application started throwing the following exception:

External component has thrown an exception.
at System.Diagnostics.SharedPerformanceCounter.GetCounter(String counterName, String instanceName, Boolean enableReuse, PerformanceCounterInstanceLifetime lifetime)
at System.Diagnostics.SharedPerformanceCounter..ctor(String catName, String counterName, String instanceName, PerformanceCounterInstanceLifetime lifetime)
at System.Diagnostics.PerformanceCounter.Initialize()
at System.Diagnostics.PerformanceCounter.set_RawValue(Int64 value)
at System.Net.NetworkingPerfCounters.Initialize()
at System.Net.Configuration.SettingsSectionInternal..ctor(SettingsSection section)
at System.Net.Configuration.SettingsSectionInternal.get_Section()
at System.Net.ServicePointManager.set_Expect100Continue(Boolean value)
at #Neh.#hgh.#P0f(String[] args)

The obfuscated (using SmartAssembly 5) function at the end of the exception, is client’s main function which is as follows

public static void Main(string[] args) {
    try {
        AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
        Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);

        System.Net.ServicePointManager.Expect100Continue = false;
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);

        Globals.Settings.NoWaitPrintJobs = true;
        Application.Run(new frmMain());
    }
    catch(Exception ex) {
        HandleUnhandledException(ex);
    }
}

From the exception I understand that it is breaking at line

System.Net.ServicePointManager.Expect100Continue = false;

The application doesn’t reference any interop components, just other managed dlls. It’s also using a native function in shell32.dll

[DllImport("shell32.dll")]
static extern bool SHGetSpecialFolderPath(IntPtr hwndOwner, [Out] StringBuilder lpszPath, int nFolder, bool fCreate);

that is being called on main form load event from a static object.

Globals.Settings.InitLocalFiles();

I don’t know the customer’s computer specifications yet. I think he has Windows XP.
Any thoughts please?

  • 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-03T12:43:53+00:00Added an answer on June 3, 2026 at 12:43 pm

    Looks like the user account running the client doesn’t have the correct permissions, to use performance counters

    see 'UnauthorizedAccessException' – 'Global\.net clr networking'

    This makes the network classes not use the performance counters.

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

Sidebar

Related Questions

I have developed web applications for a couple of years with ASP.NET Webforms and
I have developed a web application (ASP.NET Web Forms). One of my customer has
I have two web applications and both are developed in ASP.NET. Now I want
I have developed one asp.net web application and now i would like to add
I have developed one ASP.NET (C#) web application in Framework 4. I want to
I have developed several GWT Web Applications. Latest one is a little modification of
I have developed middleware that provides RPC functionality to multiple client applications on multiple
I have developed an ASP.NET web application in Visual Studio 2008. I have an
I have an ASP.NET web application developed in Visual Studio 2008, composed of 3
I have an old ASP.NET web application on a server, which was developed in

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.