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

The Archive Base Latest Questions

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

While it seems that this has been asked many times before, but there’s a

  • 0

While it seems that this has been asked many times before, but there’s a nasty twist here…

First, I’m working on a desktop application which calls a webpage on the same local system. This web application then calls upon a second server (in the local network) and needs to pass it’s own IP address to the other server. Easy, of course: Request.ServerVariables("LOCAL_ADDR") and I’m done…

It won’t work in this case… The code for the local web application is written in classic ASP and almost every sourcefile is encrypted, thus I cannot modify it’s code. All I can fix is the global.asa file. In the Application_OnStart event of global.asa is the line Application("InternalIp") = "172.22.14.59" and indeed, that’s the local IP address, hard-coded… And this application setting is used in the rest of the code to refer to the IP address.

However, my IP address in our local network tends to change every day, so every day I need to modify global.asa to contain my new IP address. I could write a small application which will modify global.asa for me every day on startup but I’d rather see a solution where global.asa would be smart enough to detect this IP address itself!
Unfortunately, the IP address must be known on the start of the application, not at the start of the session, else I could have used Application("InternalIp") = Request.ServerVariables("LOCAL_ADDR") in the Session_OnStart event. Tried this, application crashed, so it won’t work.
But that line of code in Application_OnStart won’t work, since Request is unknown at that moment, thus that would crash too. (Tried it, didn’t work…)

So, my limitation is that I need to get the IP address within the Application_OnStart event of global.asa in a reliable way. And no, using DNS names don’t work either. (Tried that too, didn’t work.) What options do I have?

  • 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-22T20:01:06+00:00Added an answer on May 22, 2026 at 8:01 pm

    you could use the commandline (wscript.shell) and ipconfig?

    or write your ip address in a textfile (with the help of another tool) and then read out that text file

    you could also add an asp page to your application, call that asp page from your desktop application. on the new asp page you could everything you want (e.g. set the application var with the help of request.servervariables…) then at the end do a redirect to the “original” (encrypted) asp page…

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

Sidebar

Related Questions

I realize this has been asked hundreds of times, however, I can't seem to
I realize this question has been asked several times in several different forms ,
I know that variations on this question have been asked, but I've tried all
I googled for this for a while but can't seem to find it and
It seems rare to read of a Python virtual machine while in Java virtual
In Firefox a Reload seems to reload everything while on IE the Refresh reloads
While project managers may each have their own personality and management style, it seems
My professor posted this online for a lab this week, but I missed the
While the lightbox example page works fine for me in IE7, I seem to
When is white space not important in Python? It seems to be ignored inside

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.