473,405 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Weird debugging problem

Joe
I have the following function I use to see if I have an Internet connection.
This function works fine in one application but in another, I get a message
"There is no source code available for the current location" when I try to
step over the WebRequest.Create line. After that message I can't step
through the code yet the code continues to run fine.

If I remove this check then I get the same message when trying to create my
proxy class for my web service.

Any ideas?

public static bool IsConnected(string testUri, string host)
{
bool connected = true;
try
{
UriBuilder uriBuilder = new UriBuilder(testUri);
if (host != null && host.Length > 0)
uriBuilder.Host = host;
System.Net.WebRequest webRequest =
System.Net.WebRequest.Create(uriBuilder.Uri);
System.Net.WebResponse response = webRequest.GetResponse();
response.Close();
}
catch
{
connected = false;
}
return connected;
}
Nov 16 '05 #1
0 741

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

Similar topics

1
by: Minti | last post by:
Hi there all, I am having a weird problem in the following Applet code, <begin code> public class MouseInputTester extends java.applet.Applet { private String msg = ""; private int mouseX ;...
11
by: HelLind | last post by:
Hello people, I am having a weird error and don't know what term to search in google. Sorry to bother. There is data in my field "M_BIO" When I run this code...
5
by: NanQuan | last post by:
I'm hoping someone can help me solve this error since I am at a total loss here. Usually I don't bother posting on any forums or groups on the internet and prefer to solve stuff myself but this is...
0
by: Zwyatt | last post by:
having a really weird little bug w/ time_t...check it out: I have the following code (simplified here): #include <time.h> class A { public: char *aString; int aNum;
1
by: Bill Rapoza | last post by:
We have a method that executes an arbitrary batch file (we use it for remote upgrades of our system). When we execute this method from outside of ASP.NET (either in the foreground app or from a...
1
by: Dees | last post by:
Hi, I am facing a weird problem with HTTPS and Request.Url.AbsoluteUri in my ASP.NET application. Here is the scenario - 1. I have a menu page (Default.aspx), which has the following anchor -...
5
by: Alan Silver | last post by:
Hello, I have a page that is supposed to do some checking, and if OK, set a session variable before redirecting to another page. The following code is a simplified version, I have hard-coded the...
5
by: Jim Strathmeyer | last post by:
So I'm having some weird problems with file output. If I try to boil this problem down to a small, simple program to just show what problems I'm having, I can't get the same problematic behavior. I...
0
by: P Pulkkinen | last post by:
Dear all, sorry, i know this code is far little too long to debug here, but there is really annoying logical error. If someone debugs this, I really offer warm virtual handshake. What this...
7
by: Mesan | last post by:
This is baffling me - I'm coming here in a desperate plea that someone smarter than myself (which isn't hard) might be able to explain what's going on. I've got a native C++ console app that has...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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,...
0
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...

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.