Closed hibri closed 4 years ago
Not maintained any more. last commit in kayak was 2 years ago HttpListener is a better candidate, and the code can be cleaner. http://msdn.microsoft.com/en-us/library/vstudio/system.net.httplistener
+1
I was going to use HttpListener to create a fake http server but I found your package instead. I think I could help you with using HttpListener if you're interested.
@nikklassen That would be great. I'm spiking it, but haven't had time to work on it a lot. Feel free to have a go.
What about using the new Katana and OWIN projects? They provide great self hosting capabilities for web based applications: http://www.asp.net/aspnet/overview/owin-and-katana/an-overview-of-project-katana
Hey @jozefizso Apologies for the late reply. I've been away. HttpMock isn't intended to serve web applications. I need an HTTP server, that I can hook into at runtime, without needing to define routes and handlers.
I see. I though that OWIN would provide such hooks.
@hibri What you think about Nowin https://github.com/Bobris/Nowin? This is pure .NET web server. You can build you own OWIN middleware without routing and etc.
@mfilippov thanks for that. I'll look into it. Feel free to send me a PR with a spike :)
FWIW, I am running into this issue with Kayak when trying to use this library (everything installed from NuGet):
System.TypeLoadException : Could not load type 'Kayak.KayakScheduler' from assembly 'Kayak, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Result StackTrace:
at HttpMock.HttpServer..ctor(Uri uri)
at HttpMock.HttpServerFactory.Create(Uri uri) in c:\dev\HttpMock\src\HttpMock\HttpServerFactory.cs:line 23
at HttpMock.HttpServerFactory.Get(Uri uri) in c:\dev\HttpMock\src\HttpMock\HttpServerFactory.cs:line 16
at HttpMock.HttpMockRepository.At(Uri uri) in c:\dev\HttpMock\src\HttpMock\HttpMockRepository.cs:line 19
at HttpMock.HttpMockRepository.At(String uri) in c:\dev\HttpMock\src\HttpMock\HttpMockRepository.cs:line 14
at MaxMind.GeoIP2.UnitTests.WebServiceClientTests.AddressNotFoundShouldThrowException() in C:\Users\Gregory\Documents\GitHub\GeoIP2-dotnet\GeoIP2.UnitTests\WebServiceClientTests.cs:line 32
@oschwald could you please reproduce this and raise a separate issue for this ? I'd like to fix it with the current implementation if possible. Thanks for reporting it :)
why?