Nov 8, 2011 at 6:41 PM
Edited Nov 8, 2011 at 7:01 PM
I created a dll that i'm planning to use to self host my service from. Here is the code:
Public Class IssueTrackerHost
Private _host As HttpServiceHost
Public Sub New()
x.For(Of IIssueTrackerRepository)().Use(Of IssueTrackerRepository)()
_host = New HttpServiceHost(ObjectFactory.GetInstance(Of IssueTrackerResource), "http://localhost:8000")
#Region "IDisposable Support"
Private disposedValue As Boolean ' To detect redundant calls
Protected Overridable Sub Dispose(disposing As Boolean)
If Not Me.disposedValue Then
If disposing Then
' TODO: dispose managed state (managed objects).
' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below.
' TODO: set large fields to null.
Me.disposedValue = True
' TODO: override Finalize() only if Dispose(ByVal disposing As Boolean) above has code to free unmanaged resources.
'Protected Overrides Sub Finalize()
' ' Do not change this code. Put cleanup code in Dispose(ByVal disposing As Boolean) above.
' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(ByVal disposing As Boolean) above.
Something isn't working quite right. I know from my experimentation that you must run visual studio as administrator or you
will get a security exception when you call "_host.Open()".
I don't get any error when i call open even when i don't run in administrative mode. Also its not opening correctly because i
can not hit the service.
We are planning to host our services locally on the user machine (architectural decision) so in the future we have the flexibility
to be able to redirect the client to hit a remote machine instead of the local machine.
Does anyone know whats going on?