I have a WCF sample app that simply display a string and updates a DB.
http://www.mymrt.net/testwcf/testwcf.Web/testwcfTestPage.aspx
It works on my pc but on the host server it doesnt update the DB?
I dont get an error as when i click the button a value in the DB is incrmented . IT does this but not when i run from the host?
works on my pc. I upload the xap , the dll and service refernce files and for some reason no DB field update and the same DB is used?
I have crossdomain and the other cross..policy.xml file
<OperationContract()> _
Public Function GetSurname() As String
Return "Sheridan"
End Function
<OperationContract()> _
Public Sub updatedataSin(ByVal myid As String)
Dim db2 As New testwcf.Web.DataClasses1DataContext
Dim temp As result
Dim mylist As New List(Of result)
Dim myresults = (From p In db2.results _
Where p.id = myid _
Select p)
If myresults.Count > 0 Then 'only bother if the user name exists which it will
For Each p As result In myresults
p.sin = p.sin + 1
Next
db2.SubmitChanges()
End If
End Sub
End Class
Private Sub btnGetSurname_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnGetSurname.Click
Dim uri As New Uri(Application.Current.Host.Source, "../person1.svc")
Dim client As New testwcf.ServiceReference1.person1Client("CustomBinding_person1", uri.AbsoluteUri)
' Dim uri2 As New Uri(Application.Current.Host.Source, "../person1.svc")
' Dim client2 As New testwcf.ServiceReference1.person1Client("CustomBinding_person1", uri.AbsoluteUri)
Dim myid As String
' Dim webservice2 As New trigB.ServiceReference1.Service1Client
' Dim client As New testwcf.ServiceReference1.person1Client
' AddHandler client.GetSurnameCompleted, Function(s, args) AnonymousMethod1(s, args)
' client.GetSurnameAsync()
AddHandler client.GetSurnameCompleted, AddressOf AnonymousMethod1
client.GetSurnameAsync()
myid = "01"
client.updatedataSinAsync(myid)
End Sub
Private Function AnonymousMethod1(ByVal s As Object, ByVal args As testwcf.ServiceReference1.GetSurnameCompletedEventArgs) As Boolean
txtSurname.Text = args.Result
Return True
End Function