[.Net] Soap doet vreemd

Pagina: 1
Acties:
  • 191 views sinds 30-01-2008

Acties:
  • 0 Henk 'm!

  • creator1988
  • Registratie: Januari 2007
  • Laatst online: 13-09 17:54
Een webservice

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="******")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class NieuwePagina
    Inherits System.Web.Services.WebService

    <WebMethod()> _
    Public Function Authenticate(ByVal user_name As String, ByVal user_password As String) As SoapResult
        Dim db As New clsDatabase
        Try
            db.Connect("Select * from tblUser Where (user_naam=" & db.f(user_name) & ") and (user_wachtwoord=" & db.f(user_password) & ")")
            If (db.Field("user_pagina") = True) Then
                'Session("user_authenticated") = True
                Return SoapResult.Success
            End If
            db.Disconnect()
        Catch ex As System.Exception
            Return SoapResult.Exception
        End Try
    End Function

    Enum SoapResult
        Success = 10
        NotAuthenticated = 20
        Exception = 30
    End Enum
End Class


Nu heb ik een verwijzing naar deze webservice met als naam 'm'
code:
1
m.Authenticate(My.Settings.Username, My.Settings.Password)


en hij retouneert 2! terwijl het enige wat hij mag retouneren 10 en 30 is ;(

What's wrong?

Acties:
  • 0 Henk 'm!

  • whoami
  • Registratie: December 2000
  • Laatst online: 10:23
what's wrong ?
tja...
zelf eens debuggen ?

Daarnaast: ook eens kijken naar Parametrized queries etc...

[ Voor 41% gewijzigd door whoami op 12-01-2008 13:33 ]

https://fgheysels.github.io/


Dit topic is gesloten.