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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:08:33+00:00 2026-05-31T13:08:33+00:00

We run our intranet site with PHP on an iSeries with Apache. By default,

  • 0

We run our intranet site with PHP on an iSeries with Apache. By default, PHP hosted on this box can not automatically get the username of the logged on windows user.

With asp.net pages hosted from a windows server, we can automatically get that username.

From a PHP page, call it login.php, i want to (through whatever method), call or redirect the user to an asp.net webpage hosted on a different server. This asp.net page will pass back a value (the username).

I know the syntax for retrieving the username from .net. But, what I dont want to do, is a URL redirect back to login.php with a querystring example of ?username=bob … because it is directly visible to the users and has many obvious flaws.

How can I go about achieving this? Maybe using Ajax? Or some sort of .net code for example Request.LastUrlVisited.ReturnValue(“bob”), which doesnt show in the URL bar?

I believe the asp.net page needs to specifically be a webpage, as a asp.net webservice can not retieve the username from windows.

Thanks,


Update

Through the comments, i’ve come to understand that an asp.net webservice CAN in fact get the username.. it does not need to be a webpage. So this opens up a bunch of possibilities to call the webservice service from php.

  • 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-31T13:08:33+00:00Added an answer on May 31, 2026 at 1:08 pm

    Ok, I’m making the presumption that you can convert your .Net site to a web service. This will look something like this:

    [WebMethod]
            public string GetUserName()
            {
    
            }
    

    You can then call this webservice form JQuery:

      $.ajax({
        type: "POST",
        url: "blah.asmx/GetUserName",
        data: "{}",
        dataType: "text",
        success: function(username) {
          //do stuff
        }
      });
    

    HEre’s a site with a better explanation:

    http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/

    EDIT

    I would encrypt the username too

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

Sidebar

Related Questions

Some installations that run our applications can be under hefty stress on a busy
In our application we've run into an error numerous times where we get error
I have an asp.net intranet site hosted on IIS on my computer. On one
I am building an Ajax Based application that will run on our local intranet
Our company has an intranet with 30,000+ web pages and 160+ web applications. This
We are looking for a software to run our test cases automatically. We want
Hi I run an internal site site to organise our company events. I want
Currently we run our web applications on a thin client browser IE 6 and
We want to run our unit tests on our TFS server. We are running
At work we are currently still using JUnit 3 to run our tests. We

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.