setting property value erors in serviced components
- From: volkan <volkan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 24 Jun 2005 00:50:03 -0700
Hi all...
I have the code below. when I inherit the class from the
servicedcomponents,I cant set the property values of class which is declared
by me. their all values seem nothing.
on the other hand If I dont use the class as inherited servicedcomponents,I
can set the property values but in this case when I want to deploy dhe dll
using "regsvcs.exe",I receive an error "no serviced components-derived
classes were found in the assembly"
Can you help me please How can I set thoose property value??
sample code
---------------------------------------------------------
<InterfaceType(ComInterfaceType.InterfaceIsIDispatch)> _
Public Interface _octokimlikmed
<DispId(1)> Function sskkarneProvizyon(ByVal siciltahsis As String,
ByVal sigortalituru As String, ByVal karneno As Integer, ByVal pgmid As
String, ByVal unitekod As Integer, ByVal kaydet As Boolean) As Object()
<DispId(2)> Property CerFilePath() As String
<DispId(3)> Property Proxy() As Boolean
<DispId(4)> Property Sonuc() As Boolean
<DispId(5)> Property Username() As String
<DispId(6)> Property Password() As String
<DispId(7)> Property Domain() As String
End Interface
<ClassInterface(ClassInterfaceType.None),
ProgId("octokimlikmed.islemler")> Public Class islemler
Inherits ServicedComponent
Implements _octokimlikmed
Public octokimlikmed()
Dim ib_proxy As Boolean = False
Dim ib_sonuc As Boolean = False
Dim is_username As String = ""
Dim is_password As String = ""
Dim is_domain As String = ""
Dim is_CerFilePath As String = ""
Public Function sskkarneProvizyon(ByVal siciltahsis As String, ByVal
sigortalituru As String, ByVal karneno As Integer, ByVal pgmid As String,
ByVal unitekod As Integer, ByVal kaydet As Boolean) As Object() Implements
_octokimlikmed.sskkarneProvizyon
Dim srvc As New tr.gov.ssk.ws.MustehaklikKontrolService
Dim proxyy As System.Net.WebProxy
If ib_proxy Then
Dim creadential As System.Net.NetworkCredential = New
System.Net.NetworkCredential(is_username, is_password, is_domain)
proxyy = New System.Net.WebProxy("http://10.1.1.1:8080/")
proxyy.Credentials = creadential
srvc.Proxy = proxyy
End If
srvc.PreAuthenticate = True
Dim crd As System.Net.NetworkCredential = New
System.Net.NetworkCredential("sagliktesisitest", "sagliktesisitest", "")
srvc.Credentials = crd
Dim x509 As X509Certificate
x509 = X509Certificate.CreateFromCertFile(is_CerFilePath)
srvc.ClientCertificates.Add(x509)
Dim arr As New tr.gov.ssk.ws.ResultData
Dim arr2 As New tr.gov.ssk.ws.SigortaliBilgileri
Dim hata As String = ""
Try
arr = srvc.karneProvizyon(siciltahsis, sigortalituru,
karneno, pgmid, unitekod, kaydet)
arr2 = arr.sigortaliBilgileri
ib_sonuc = True
Catch ex As Exception
ib_sonuc = False
hata = ex.Message
End Try
Dim arrsonuc(13), arrsonuc2(0) As Object
If ib_sonuc Then
arrsonuc(0) = arr.provKod
arrsonuc(1) = arr.provUniqueId
arrsonuc(2) = arr.info
arrsonuc(3) = arr.mustehaklikBitisGunu
arrsonuc(4) = arr2.ad
arrsonuc(5) = arr2.soyAd
arrsonuc(6) = arr2.yas
arrsonuc(7) = arr2.cinsiyet
arrsonuc(8) = arr2.yakinlikKod
arrsonuc(9) = arr2.tckNo
arrsonuc(10) = arr2.tahsisNo
arrsonuc(11) = arr2.sigortaliTuru
arrsonuc(12) = arr2.sira
arrsonuc(13) = arr2.karneNo
Else
arrsonuc2(0) = hata
End If
Return IIf(ib_sonuc, arrsonuc, arrsonuc2)
End Function
Public Property proxy() As Boolean Implements _octokimlikmed.Proxy
Get
End Get
Set(ByVal Value As Boolean)
ib_proxy = Value
End Set
End Property
Public Property sonuc() As Boolean Implements _octokimlikmed.Sonuc
Get
Return ib_sonuc
End Get
Set(ByVal Value As Boolean)
ib_sonuc = Value
End Set
End Property
Public Property Username() As String Implements
_octokimlikmed.Username
Get
End Get
Set(ByVal Value As String)
is_username = Value
End Set
End Property
Public Property Password() As String Implements
_octokimlikmed.Password
Get
End Get
Set(ByVal Value As String)
is_password = Value
End Set
End Property
Public Property Domain() As String Implements _octokimlikmed.Domain
Get
End Get
Set(ByVal Value As String)
is_domain = Value
End Set
End Property
Public Property CerFilePath() As String Implements
_octokimlikmed.CerFilePath
Get
End Get
Set(ByVal Value As String)
is_CerFilePath = Value
End Set
End Property
End Class
.
- Prev by Date: Re: .NET called as COM interface
- Next by Date: Re: ASP.NET + Excel Download
- Previous by thread: Releasing an Automation OLE Component from Managed C++
- Next by thread: VB6 types marshaling
- Index(es):
Relevant Pages
|