Welcome :Guest
Congratulations!!!

Top 5 Contributors of the Month
david stephan
yasminpriya
Ram
Gaurav Pal
christianasteves

### Calculate distance, bearing and more between Latitude/Longitude points

This page presents a variety of calculations for latitude/longitude points, with the formulÃÂ¦ and code fragments for implementing them.

All these formulÃÂ¦ are for calculations on the basis of a spherical earth (ignoring ellipsoidal effects) - which is accurate enough* for most purposes. [In fact, the earth is very slightly ellipsoidal; using a spherical model gives errors typically up to 0.3% - see notes for further details].

### Find location based on longitude and latitude

hiiiiiiii.

can you explain a bit more about  using google map api in asp.net3.5 using c#.

and please tell me one thing how to give latitude and longitude and identify the location (from givinglongitude and latitude).

### Stored Procedure to Retrieve Zipcodes within a specified Zipcode and distance

Hi All,

Does anyone have a Stored Procedure that works perfectly to retrieve all zipcodes within a specified zipcode and distance radius - a zipcode and radius is passed and the Store Procedure result shows all zipcodes that falls within that range.

ÃÂ

ÃÂ

### issue in calculating Distance by latitude and longtitude

Hello,

I am just stuck in the strange calculation.

i am trying to find distance by latitude and longtitude by using this formula mentioned in this site.

http://www.movable-type.co.uk/scripts/latlong.html

every thing is Ok there when i do it by calculator but when i started doing it by programmatically there is a diiference in result.

here is my part of code

lat = Convert.ToDouble( (s3[a]));
longt =Convert.ToDouble( (s4[a]));
Avg_lat = pc._Latitude - lat;
Avg_longt = pc._Longitude - longt;

a_hold =( Math.Sin(Avg_lat / 2) * Math.Sin(Avg_lat / 2) )+ (Math.Cos(pc._Latitude) * Math.Cos(lat)) * (Math.Sin(Avg_longt / 2) * Math.Sin(Avg_longt / 2));
c_hold = 2 * Math.Atan2(Math.Sqrt(a_hold), Math.Sqrt(1 - a_hold));
&

### How to calculate the distance between two points on the Earth

We offer many Global Database Products that you can use with the below formulas to calculate distances and many other uses. Not sure how to use distance calculations or global databases within your company? See our Global Database Examples for more information on how to use our data within your industry. Be sure to Download a Free Sample of one of our many Global Database Products.

### find a Control inside a GridView using jQuery

I have databound GridView in my page and I have a hidden DIV in all rows. Each row contains a Button that I want it to make the DIV visible for me! how can I use that with jQuery?!

here is the code page:

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
<Columns>
<asp:T

### Is there any way to find out the reason for session expiry?

Dear All,

is there any way to find out the reason for session expiry?

Regards

Denny

### Cannot find ASP.NET tab on IIS6+2003,how to choose .NET framework 4.0?

Hi all,

I just wanna setup a .net framework 4.0 on my VPS for a new site. While I could not find the ASP.NET tab on properties. I did some research find some similar problems but haven't fixed it yet.

Thanks.

Hi,

I wrote a class to pull adinfo and for the life of me I can't seem to figure

out why it says "Invalid Login Name" no matter what I type in. If I leave

it blank it seems to work properly but it doesn't seem to be actually searching

the AD. I'll drop the whole class here, it's being initiated by a button click

on an outside form.

Thanks in Advance for any help Offered,
Postholes

```Imports System.DirectoryServices
Imports Microsoft.VisualBasic
Imports System.String
Imports System.Collections
Imports System.Security.Principal
Imports System.Security.Permissions

'Class Variables
Dim UserID As String = Nothing
Dim DomainDN As String = ConfigurationManager.AppSettings("myConnectionString")
Dim ADEntry As DirectoryEntry = New DirectoryEntry(DomainDN)
Dim oResults As DirectoryServices.SearchResultCollection
Dim oResult As DirectoryServices.SearchResult
Dim RetArray As New Hashtable
Dim page As Page = DirectCast(HttpContext.Current.Handler, Page)

### LDAP - Can't find server

Hey people,

I would like to get a persons name from their username - a common query on forums i know, but i haven't managed to get mine working yet and any help would be appreciated.

I currently have this code that I found here: http://www.vbforums.com/showthread.php?t=612655 (Thanks Chris128)

I have adapted it from VB into VB.net. The page renders but when i enter my username into the Username textBox and hit the submit button (Which calls IsUser) I just get "The specified domain either does not exist or could not be contacted." I have tried lots of other code but I always get this response...

If anyone can help by posting links to a tutorial or another post for code that they know works, i will give it a go.

Cheers,
Jim

```Imports System.DirectoryServices

Partial Class UserInfo
Inherits System.Web.UI.Page

Using searcher As New DirectorySearcher(New DirectoryEntry())
searcher.PageSize = 1000
searcher.SearchScope = SearchScope.Subtree
searcher.Filter = "(&(samAccountType=805306368)(sAMAccountName=" & UsernameToFind & "))"
Using Results A```

### Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap

Hi,

I created 2 projects in my solution:

1. Classic asp.net web service (asmx)
2. Class library project which references service
3. web site project which references class library project
4. Windows app project which references service.

Both projects were created in 3.5 framework and in Visual Studio 2008 Beta 2.

I added web service reference to Class library project. When it asked for namespace I typed "CurrencyProxy". Projects build ok, but when I run web app, Class library throws an error: Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

I believe it has something to do with app.config in Class library project. Here is part from app.config:

` <system.serviceModel>  <bindings>   <basicHttpBinding>    <binding name="CurrencyServiceSoap" closeTimeout=`

### Asp to asp.net cant find Msxml2.XMLHTTP

Hi all i have this following code in asp and when i try this in .net it asks me to run in aspcompat=true mode which i dont want.
So i tried to DIM x as Msxml2.XMLHTTP but its not defined any suggestions on this. Thanks

```xmlhttp = Server.CreateObject("Msxml2.XMLHTTP")
On Error Resume Next
xmlhttp.Open("POST", "https://xxxxx.cgi", False)
queryString = "xxxRequestMode=X&xxxRequestData=" & Server.UrlEncode(xmlStr)
xmlhttp.Send(queryString)
```

### Cant find vsi file for CSS Friendly Control Adapters

Hi guys

This is driving me crazy... I cant find the .vsi file for installing the CSS Friendly Control Adapters Project. Does anyone know where I can get this?

Any help is much appreciated!

### Editor's Note: Find Your Anchors

This month, Howard Dierking explores the value of maintaining a few discrete technology interests in order to avoid being swept away in a sea of buzzwords and new technologies.

Howard Dierking

MSDN Magazine September 2009

### Performance: Find Application Bottlenecks with Visual Studio Profiler

We will introduce you to the Visual Studio Profiler by walking through a sample performance investigation, pinpointing code inefficiencies in some sample applications.

Hari Pulapaka and Boris Vidolov

MSDN Magazine March 2008

### Crash Course: Analyze Crashes to Find Security Vulnerabilities in Your Apps

Here the authors analyze program crashes to help you understand if you have the potential for read or write violations in your applications, and how they can lead to security vulnerabilities.

A. Abouchaev, D. Hasse, S. Lambert, and G. Wroblewski

MSDN Magazine November 2007

### Code Reviews: Find and Fix Vulnerabilities Before Your Application Ships

Code defects can be found using many approaches, but manual code reviews stand out in terms of precision and quality. We provide some best practices for planning and executing code reviews on your own team.

M. Chmielewski, N. Clift, S. Fonrobert, and T. Ostwald

MSDN Magazine November 2007

 Categories:
 ASP.Net Windows Application .NET Framework C# VB.Net ADO.Net Sql Server SharePoint Silverlight Others All