Friday, February 17, 2012

Error -2147024809 An error has occured on the computer running IIS

I am sync. for the first time (Merge Replication using SQL 2005 and Mobile) and this error keeps poping up on the emulator. I am tring out the tutorial. :) boss on my butt.

Does anyone have any ideas or a solution to this...your help is WELL APPRECIATED ...

Error code: -2147024809

zo

1. Can I assume the merge emulator run for merge sync on SQL mobile device?

2. Does the error popup on every sync or from time to time?

Thanks.

|||

I have talked with one of the experts and the error number -2147024809 stands for invalid arguments.

Can you check the parameters again on the sync object? Did you see any exception message also?

Thanks.

This posting is provided AS IS with no warranties, and confers no rights

|||

Sorry for the late reply...The parameters for the sync object (based on the sample in msdn) are correct. At first I thought it was a permission problem. I went through the debug process and the error comes up on the emulator when the code gets to repl.syncronize, then the exception is thrown giving the error above. Here is the code:

Sub Sync()
Dim repl As New SqlCeReplication()

repl.InternetUrl = "http://localhost/SQLMobile/sqlcesa30.dll"
repl.Publisher = "REALTORBUSINESS\JONES_SQL"
repl.PublisherDatabase = "SQLMobile"
repl.PublisherSecurityMode = SecurityType.NTAuthentication
repl.Publication = "SQLMobile"
repl.Subscriber = "SQLMobile"
repl.SubscriberConnectionString = "Data Source='" + filename + "';Max Database Size=128;Default Lock Escalation =100;"
Try
repl.AddSubscription(AddOption.CreateDatabase)
repl.Synchronize()
Catch err As SqlCeException
DisplaySQLCEErrors(err)
End Try

End Sub

Public Sub DisplaySQLCEErrors(ByVal ex As SqlCeException)

Dim errorCollection As SqlCeErrorCollection = ex.Errors
Dim bld As New StringBuilder()
Dim inner As Exception = ex.InnerException
Dim err As SqlCeError

For Each err In errorCollection

bld.Append(ControlChars.Lf + " Error Code: " + err.HResult.ToString())
bld.Append(ControlChars.Lf + " Message : " + err.Message)
bld.Append(ControlChars.Lf + " Minor Err.: " + err.NativeError.ToString())
bld.Append(ControlChars.Lf + " Source : " + err.Source)

Dim numPar As Integer
For Each numPar In err.NumericErrorParameters
If (numPar <> 0) Then
bld.Append(ControlChars.Lf + " Num. Par. : " + numPar.ToString())
End If
Next numPar
Dim errPar As String
For Each errPar In err.ErrorParameters
If (errPar <> String.Empty) Then
bld.Append(ControlChars.Lf + " Err. Par. : " + errPar)
End If
Next errPar

MessageBox.Show(bld.ToString(), "SQL Mobile Error")

Next err

I am going to try straight to the device, emulator might be screwed. Let me know what you find out ... got to figure this out one way or another, I have a project depending on it.

Appreciate everything and everyone ... Thank you.

|||

See what error message in the runtime you have captured.

Thanks.

|||

The error codes from the runtime is as follows:

Error Code: -2147024809

Message: An error has occured on the computer running IIS. Try restarting the IIS Server. (Tried several times)

Minor Error: 28022

Source: Microsoft SQL Server 2005 Mobile Edition

|||

Did you run the above code on the CE device? If true then I am wondering repl.InternetUrl = "http://localhost/SQLMobile/sqlcesa30.dll" might be the cause. Can you try to use the IIS machine name instead of "localhost"?

Thanks.

This posting is provided AS IS with no warranties, and confers no rights

|||

No, I haven't ran it on the CE device. I am using the emulator first, I figure if it woks there it should work anywhere else...but, I will change the URL and see what happens.

Let you know in a minute.

|||I'm pretty sure you need to use HTTPS as well, HTTP should fail with a graceful error msg.|||I had the same error number in a custom build Powerpoint wizard when

you failed to enter a filename of a background picture for the front

page.

In general is seems to indicate a wrong or invalid parameter in a system call.

Complete error message was:

"Err. -2147024809-

Description: The specified file wasn't found."

No comments:

Post a Comment