I am trialling the WebApi Self Hosting sample and am getting an error 101: connection was reset (in chrome). I am new to MVC so I know I haven't done something right but this appears to be very straight forward.
1) I installed MVC 4.
2) I grabbed self host and dependencies from NuGet.
3) I have implemented code as in Derek Whittaker's blog post but it is almost identical to Mike Wasson's "Self-Host a Web API" on this site.
5) I originally used port 8080 but changed the code to use port 9000 because my TFS is using 8080 and I was concerned about a conflict... for the record same result anyway.
6) Try to open http://localhost:9000/endpoints/episode and get an error 101. If the service isn't running I get a "url is broken" message so something is working. I've disabled my firewall, etc. I've checked my windows logs and there is nothing apart from
some messages from TFS (which stopped when I started using port 9000).
Member
1 Points
3 Posts
WebApi Self Hosting Sample Error 101
Mar 18, 2012 07:02 AM|aewilson|LINK
I am trialling the WebApi Self Hosting sample and am getting an error 101: connection was reset (in chrome). I am new to MVC so I know I haven't done something right but this appears to be very straight forward.
1) I installed MVC 4.
2) I grabbed self host and dependencies from NuGet.
3) I have implemented code as in Derek Whittaker's blog post but it is almost identical to Mike Wasson's "Self-Host a Web API" on this site.
http://devlicio.us/blogs/derik_whittaker/archive/2012/02/27/zero-to-self-hosting-aspnet-webapi-in-a-few-short-steps.aspx?CommentPosted=true#commentmessage
4) I register my port with netsh:
netsh http add urlacl url=http://+:9000/ user=[domain\user]
5) I originally used port 8080 but changed the code to use port 9000 because my TFS is using 8080 and I was concerned about a conflict... for the record same result anyway.
6) Try to open http://localhost:9000/endpoints/episode and get an error 101. If the service isn't running I get a "url is broken" message so something is working. I've disabled my firewall, etc. I've checked my windows logs and there is nothing apart from some messages from TFS (which stopped when I started using port 9000).
Any help would be appreciated.
Member
376 Points
263 Posts
Re: WebApi Self Hosting Sample Error 101
Mar 18, 2012 09:32 AM|panesofglass|LINK
Member
1 Points
3 Posts
Re: WebApi Self Hosting Sample Error 101
Mar 18, 2012 03:45 PM|aewilson|LINK
(Should be) as per code in Derek's post I mentioned above, but to be sure...
Program.cs
EpisodeController.cs
Episode.cs
Url I try to access:
http://localhost:9000/endpoints/episode
As I said, I am new to MVC so I am sure that this is something in my environment rather than the code...
Thx
Member
131 Points
93 Posts
Re: WebApi Self Hosting Sample Error 101
Mar 19, 2012 02:29 PM|davebettin|LINK
On your action method, change the return type to List<Episode> and see if that makes it happy.
@dbettin
Member
1 Points
3 Posts
Re: WebApi Self Hosting Sample Error 101
Mar 19, 2012 03:52 PM|aewilson|LINK
Thank you!