Reagrding turbo Activate

hi

I am using turboactivate version 2.12 and while login to the application i am getting the following error

"Start index cannot be larger than length of the string,Parameter Name:Start index"

Please help me

I'm going to need a whole lot more information. What function are you calling? What are your input parameters? Etc, etc., etc.

In my application i am using turboactivate version 2.12 and while logging the application,when the main form is loading i am getting the error as i said earlier

in form load the following function i used:

" Dim isGenuine As Boolean Dim NeedsReactivate As Boolean dteLicenseDate = DateTime.Parse(TurboActivate.GetFeatureValue("License_expires"))

IndianTimes() If IndianTime = Nothing Then MsgBox("Check the internet connection") Return Else If DateTime.Parse(IndianTime) > DateTime.Parse(dteLicenseDate) Then ' If IndianTime > dteLicenseDate Then 'If objbolERPMain.GetSqlDateTime() > dteLicenseDate Then 'If DateTime.Parse(dtStringTime) > dteLicenseDate Then isGenuine = TurboActivate.IsGenuine(NeedsReactivate) If NeedsReactivate = True Then TurboActivate.Activate() End If End If End If

PictureBox1.Image = Nothing wbrMain.SendToBack() btnHelpDesk.Visible = True btnVertexWeb.Visible = True wbrMain.Visible = False

Dim dtComp As New DataTable dtComp = objbolERPMain.GetCompanyDetails()

CheckModule() Dim sdiffdays As String sdiffdays = Math.Abs(DateDiff(DateInterval.DayOfYear, dteLicenseDate, IndianTime)) lbllicensevalidity.Text = "License : " & sdiffdays & " days remaining" If Not dtComp.Rows.Count = 0 Then scompanyname = dtComp.Rows(0)("CompanyName") sCompanycode = dtComp.Rows(0)("CompanyCode") saddress = dtComp.Rows(0)("CompanyAddress") End If

lblcompnamedisplay.Text = "Welcome to " & scompanyname

lbladdval.Text = saddress

Dim dr As DataRow = objLogin.LoadCurrentItem(sCompanycode) If sCompanycode <> String.Empty Then If Not dr("Logo") Is DBNull.Value Then If Not dr("Logo") Is Nothing Then Dim bits As Byte() = CType(dr("Logo"), Byte()) Dim memorybits As New MemoryStream(bits) Dim bitmap As New Bitmap(memorybits) PictureBox1.Image = bitmap PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage 'PictureBox1.BorderStyle = BorderStyle.Fixed3D End If End If End If

lbllogindisplay.Text = "Logged in as " & Login.sUserName For Each c As Control In Me.Controls If c.GetType() Is GetType(Button) Then c.Enabled = False End If Next"

this info is needed or some more infomation u want ?

please help me

At what line is the exception happenning? And what are the arguments being passed into the function throwing the exception?

we cant able to get From Where this exception is coming..what to do

The exception window should give you some big hints. Also, if you run your app with a debugger attached you should be able to get the exact line. Looking at the code it doesn't look like a problem with TurboActivate.

in that above said coding i used the fuction "indiantimes". in that line only the exception is coming

in that function i wrote the coding as follows

" Nisttime = ServerTime.GetNISTTime("192.43.244.18")

In this Coding I used the function getnisttime.This getnisttime Function Has the coding as follows

"Dim result As DateTime Dim timeStr As String

Try Dim reader As New StreamReader(New TcpClient(host, 13).GetStream) LastSysTime = DateTime.UtcNow() timeStr = reader.ReadToEnd() reader.Close() Catch ex As SocketException 'Couldn't connect to server, transmission error Debug.WriteLine("Socket Exception [" & host & "]") Return DateTime.MinValue Catch ex As Exception 'Some other error, such as Stream under/overflow Return DateTime.MinValue End Try

'Parse timeStr If (timeStr.Substring(38, 9) <> "UTC(NIST)") Then 'This signature should be there Return DateTime.MinValue End If If (timeStr.Substring(30, 1) <> "0") Then 'Server reports non-optimum status, time off by as much as 5 seconds Return DateTime.MinValue 'Try a different server End If

Dim jd As Integer = Integer.Parse(timeStr.Substring(1, 5)) Dim yr As Integer = Integer.Parse(timeStr.Substring(7, 2)) Dim mo As Integer = Integer.Parse(timeStr.Substring(10, 2)) Dim dy As Integer = Integer.Parse(timeStr.Substring(13, 2)) Dim hr As Integer = Integer.Parse(timeStr.Substring(16, 2)) Dim mm As Integer = Integer.Parse(timeStr.Substring(19, 2)) Dim sc As Integer = Integer.Parse(timeStr.Substring(22, 2))

If (jd < 15020) Then 'Date is before 1900 Return DateTime.MinValue End If If (jd > 51544) Then yr += 2000 Else yr += 1900

Return New DateTime(yr, mo, dy, hr, mm, sc)"