473,654 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detecting if browser runs on the server

Hi,

I've been written an asp.net Intranet application and since it will run on
an intranet it would be good to be able to detect whether the app runs on the
same computer that acts as a server or if it's possible to stop him from
doing so.

Normally you just enter the ip numbers to the server and startpage in the
url. And then you surf on the Intranet.

If everyone uses IE5+ on the client?

TIA

/Kenneth
Nov 18 '05 #1
4 1092
Could you explain a little more about what you're trying to accomplish? Are
you trying to detect if the person is browsing the site by sitting at the
server?

"Kenneth" <Ke*****@discus sions.microsoft .com> wrote in message
news:49******** *************** ***********@mic rosoft.com...
Hi,

I've been written an asp.net Intranet application and since it will run on
an intranet it would be good to be able to detect whether the app runs on
the
same computer that acts as a server or if it's possible to stop him from
doing so.

Normally you just enter the ip numbers to the server and startpage in the
url. And then you surf on the Intranet.

If everyone uses IE5+ on the client?

TIA

/Kenneth


Nov 18 '05 #2
I think your guess is correct; he wants to be able to detect if
someone is sitting on the server and trying to run the app. If that
really is the case, try:

1) Get the client machine name:

Request.ServerV ariables("REMOT E_HOST")

2) Server machine name:

System.Environm ent.MachineName

sayed

"Ken Cox [Microsoft MVP]" <BA************ @sympatico.ca> wrote in message news:<O$******* *******@TK2MSFT NGP15.phx.gbl>. ..
Could you explain a little more about what you're trying to accomplish? Are
you trying to detect if the person is browsing the site by sitting at the
server?

"Kenneth" <Ke*****@discus sions.microsoft .com> wrote in message
news:49******** *************** ***********@mic rosoft.com...
Hi,

I've been written an asp.net Intranet application and since it will run on
an intranet it would be good to be able to detect whether the app runs on
the
same computer that acts as a server or if it's possible to stop him from
doing so.

Normally you just enter the ip numbers to the server and startpage in the
url. And then you surf on the Intranet.

If everyone uses IE5+ on the client?

TIA

/Kenneth

Nov 18 '05 #3
Sayed,

Exactly, I tested with some code:

Dim lc As String = Request.ServerV ariables("REMOT E_HOST")
Response.Write( lc)
Response.Write( "<br>")
Response.Write( System.Environm ent.MachineName )

which ended up in one ip number (127.0.0.1) and one computer name "mjuk"

It seems we're on the right track, but we have to change the code so both
responses the same thing to be able to compare them with each other.

Any suggestions to the code?

/Kenneth

"Sayed Hashimi" wrote:
I think your guess is correct; he wants to be able to detect if
someone is sitting on the server and trying to run the app. If that
really is the case, try:

1) Get the client machine name:

Request.ServerV ariables("REMOT E_HOST")

2) Server machine name:

System.Environm ent.MachineName

Nov 18 '05 #4
Ken,

In my windows applications I detect whether the client starts their app from
a client computer or from the server. This has to do with licensing issues.
If I sell an app to a company that is to be used only on one computer
(1-licens) then I can refuse the app from starting from the client's server.
Everything installed on the client machine.

Now I'd like to have the same functionality for Intranet apps.

I guess that I have to check whether both the IE client and the server are
on the same computer, perhaps using ServerVariables .

Any ideas? And code?

/Kenneth

"Ken Cox [Microsoft MVP]" wrote:
Could you explain a little more about what you're trying to accomplish? Are
you trying to detect if the person is browsing the site by sitting at the
server?

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3150
by: Astra | last post by:
Hi All I have a Javascript to detect whether a client's browser has flash installed, but as so many people are putting me off relying on Javascript, could you please let me know if you know how to detect whether a browser has flash installed using ASP. Many thanks. Robbie
25
2892
by: Ryan Stewart | last post by:
I'm working on a project to collect web application usage statistics. What are the recommended ways of detecting whether a browser is JavaScript enabled and/or capable? Obviously I can write a script to invoke something on the server, and if it works, then it works. Is there a better way? I'm looking for the least intrusive way of doing it, from a web application point of view. i.e. I'd like to be able to drop this into an existing...
2
1525
by: Sergey Poberezovskiy | last post by:
Hi, Simple question: I developed an ASP.Net application that runs under IE. Now for all other browsers I display a message that the application runs under IE: If Not System.Web.HttpContextCurrent.Request.Browser.Type.ToUpper
79
3751
by: VK | last post by:
I wandering about the common proctice of some UA's producers to spoof the UA string to pretend to be another browser (most often IE). Shouldn't it be considered as a trademark violation of the relevant name owner? If I make a whisky and call it "Jack Daniels", I most probably will have some serious legal problems. "Mozilla" partially appeared because NCSA stopped them from using "Mosaic" in the UA string. Is it some different...
0
8379
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8709
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8494
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.