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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:23:43+00:00 2026-06-16T05:23:43+00:00

IIS 7.5 ASP.net 4.0 C# 4.0 Here the function is it thread safe ?

  • 0

IIS 7.5
ASP.net 4.0
C# 4.0

Here the function is it thread safe ? assume 1000 different calls made from different visitors at the same time

public static string ReturnIpAddress()
{
    string srUserIp = "";
    try
    {
        if (HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] != null)
        {
            srUserIp = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString();
        }
        if (string.IsNullOrEmpty(srUserIp))
        {
            srUserIp = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString();
        }
    }
    catch
    {

    }
    return srUserIp;
}
  • 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-16T05:23:44+00:00Added an answer on June 16, 2026 at 5:23 am

    This is super safe. You not changing any data, it is static and it queries a request object, which is immutable.

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

Sidebar

Related Questions

I have created an multi thread application on IIS (ASP.NET MVC), When the threading
Is it possible to create a virtual folder in IIS from an ASP.NET site?
Suppose you have 2 different ASP.NET applications in IIS. Also, you have some ASCX
The following article by Thomas Marquardt describes how IIS handles ASP.Net requests, the max/min
ASP.NET 4.0 MVC2 routing on IIS 6 is not working for me with all
I have asp.net mvc 4 web application project on my server in IIS Directory.
I want to use ASP.NET and IIS to download dynamically generated files to the
I run an ASP.NET application on IIS 6.0. Usually I have compression turned on
iam using c#,asp.net and iis, i want to simulate slow internet connection on my
I have an ASP.NET MVC 3 app hosted on IIS. This app is using

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.