setting property value erors in serviced components

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
.



Relevant Pages

  • Re: Some newbie questions
    ... inherit from DataSet, DataSets inherit from Object if you go far enough up ... > To my suprise was the datacolumn indexer the fastest. ... --I'd expect the string to be the slowest but the indexer part is what's ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Implement a Case INsensitive string.Comtains method?
    ... The proper .NET way is to write a custom string class ... As far as inheriting goes, you shouldn't need to inherit any class. ... you can write an extension method for   ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Implement a Case INsensitive string.Comtains method?
    ... The proper .NET way is to write a custom string class ... As far as inheriting goes, you shouldn't need to inherit any class. ... missing a reference to System.Core.dll. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Detecting type of object
    ... that work like strings but inherit from a user-defined prototype object ... you need to test against the `String' of the same frame, ... It's a relatively painless remedy to the deficiencies of `typeof`, `instanceof`, etc. that you mention (mainly, frame issue and an unreliable runtime nature of `instanceof`). ...
    (comp.lang.javascript)
  • RE: Enums
    ... Is there any reason an enum cannot inherit from a string or ... As far as inheriting from a string, there are a few reasons why this wont ... enums are value types; ... As far as inheriting from a GUID goes, ...
    (microsoft.public.dotnet.languages.csharp)