Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > .NET

Reply
 
LinkBack Thread Tools
Old October 8th, 2007, 12:02 PM   #1
New Member
SuperMember
 

Join Date: Oct 2007
Location: UK
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 pas2gether is on a distinguished road
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 October 8th, 2007, 12:15 PM   #2
Elite Veteran
 

Join Date: Jul 2007
Location: Webforumz 24/7
Age: 17
Posts: 3,799
Blog Entries: 9
Thanks: 2
Thanked 3 Times in 3 Posts
Rep Altering Power: 0 alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all
Re: checking for localhot

What Operating System are you using?
__________________
Web Design and Development Blog

Alex Perry
Technical Administrator.
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 October 8th, 2007, 12:17 PM   #3
New Member
SuperMember
 

Join Date: Oct 2007
Location: UK
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 pas2gether is on a distinguished road
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 October 8th, 2007, 08:22 PM   #4
Elite Veteran
 

Join Date: Jul 2007
Location: Webforumz 24/7
Age: 17
Posts: 3,799
Blog Entries: 9
Thanks: 2
Thanked 3 Times in 3 Posts
Rep Altering Power: 0 alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all
Re: checking for localhot

I will assume you mean XP. Have you installed IIS?
__________________
Web Design and Development Blog

Alex Perry
Technical Administrator.
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 October 9th, 2007, 05:23 AM   #5
New Member
SuperMember
 

Join Date: Oct 2007
Location: UK
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 pas2gether is on a distinguished road
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 October 11th, 2007, 08:19 PM   #6
Elite Veteran
 

Join Date: Jul 2007
Location: Webforumz 24/7
Age: 17
Posts: 3,799
Blog Entries: 9
Thanks: 2
Thanked 3 Times in 3 Posts
Rep Altering Power: 0 alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all
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".
__________________
Web Design and Development Blog

Alex Perry
Technical Administrator.
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

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 6 November 8th, 2007 03:19 AM
Link popularity checking? preston9u1 Forums, Blogging and Content Management 9 October 31st, 2007 10:26 AM
Javascript - Anti browser checking satimis JavaScript 7 August 8th, 2007 11:43 AM
CSS needs checking cocoonfx HTML, XHTML and CSS 6 June 20th, 2007 05:04 PM
Checking Folders for images... JohnMitch Classic ASP 9 October 20th, 2004 08:33 AM


Search Engine Optimization by vBSEO 3.2.0 RC8