Web Design and Development Forums

checking for localhot

This is a discussion on "checking for localhot" within the ASP.NET Forum section. This forum, and the thread "checking for localhot are both part of the Program Your Website category.

Old Oct 8th, 2007, 16:02   #1 (permalink)
 
Join Date: Oct 2007
Location: UK
Posts: 43
checking for localhot

A common problem I have when writing code is that I want ceratin code not to be executed when I am testing locally.

I am a vb.net developer.
Is there a way of checking whether that you are running locally or on a remote machine.

Thanks
Parm
pas2gether is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Oct 8th, 2007, 16:15   #2 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: checking for localhot

What Operating System are you using?
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Oct 8th, 2007, 16:17   #3 (permalink)
 
Join Date: Oct 2007
Location: UK
Posts: 43
Re: checking for localhot

Windows
pas2gether is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Oct 9th, 2007, 00:22   #4 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: checking for localhot

I will assume you mean XP. Have you installed IIS?
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Oct 9th, 2007, 09:23   #5 (permalink)
 
Join Date: Oct 2007
Location: UK
Posts: 43
Re: checking for localhot

I have windows xp. I have IIS installed locally.

When I upload it to the web server it does some authentication.

When I test it locally, I do not want it to do the authentication (since it is local). So what I need to do is make the code check whether it is running locally, and if so skip authentication and proceed with the rest of the app.

Please not: this is nbot a Q about authentication, its simply about detecting whether I am running locally, the authentication bit is simply one example of where it would be useful.
pas2gether is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Oct 12th, 2007, 00:19   #6 (permalink)
Administrator
 
alexgeek's Avatar
 
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
Blog Entries: 9
Send a message via MSN to alexgeek
Re: checking for localhot

I don't quite get how you wouldn't know whether you are checking locally or remotely.
If it's locally, it will either be your IP address or "http://localhost" otherwise it will be an external IP address or domain name "http://example.com".
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.


alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript checking for broken links Code_breaker JavaScript Forum 6 Nov 8th, 2007 07:19
Link popularity checking? preston9u1 Design & Development Software 9 Oct 31st, 2007 13:26
CSS needs checking cocoonfx CSS Forum 6 Jun 20th, 2007 21:04
checking for most recently added xml file fogofogo XML, RSS & Atom 0 Feb 13th, 2006 09:35
Checking Folders for images... JohnMitch ASP Forum 9 Oct 20th, 2004 12:33



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 14:08.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59