August 28, 2017, 1:28am
I followed the first sample c# code provided in
http://docs.servicestack.net/create-your-first-webservice. The service without the route attribute works. Once I add the Route attribute I get a 500 internal server error.
Where can I check what the error is?
What could be causing this error?
I am using VS 2012
August 28, 2017, 1:35am
You’ll have to inspect the raw HTTP Traffic using something like Chrome Web Inspector or Fiddler to find more details about the error. Also set
DebugMode = true if not already.
Although I’m a bit confused you’ve used the
.NET Core tag but say you’re using VS 2012? Note many of the VS.NET templates in ServiceStackVS require VS 2013+. But why not just use the latest VS 2017 Community Edition?
August 28, 2017, 2:55am
My solution is in VS2012. So I am bound to it for now.
Will the latest version of SS not work on VS2012? If not do I have to use an earlier version of SS?
I enabled debug. I do notsee any useful info in Fiddler
HTTP/1.1 500 Internal Server Error
X-Powered-By: ServiceStack/4.512 NET45 Win32NT/.NET
Date: Mon, 28 Aug 2017 02:53:53 GMT
Is there anywhere else I can look at to see what the error is.
I get the error only if I use the Route attribute. If I remove it, it works just fine.
August 28, 2017, 3:02am
ServiceStack itself should still work since it’s still running on .NET 4.5, but you may need to
create your Web Project from an Empty ASP.NET project.
Check to see if
you have any Startup Errors in your Metadata page which might be causing the issue.
Otherwise what does your complete Service + Route definition look like?
August 28, 2017, 10:26am
I started from blank
ASP.NET project. I am sorry if I poseted my question to the wrong queue.
There are no startup errors. Attached is screen shot.
The route attributes I have set ar
If I use the default end point it works. If I add /Test or /Test/testname they both give this error.
I have not added any other references to my project yet. Want to get this first basic method to work before I write my other methods.
Should I see 500 errors in event log?
Can you share the solution you’ve created? Do you start it from Visual Studio or publish to IIS first and then run?
enable logging to event log by adding this line to
LogManager.LogFactory = new EventLogFactory("Logging.Tests", "Application");
also if you run from Visual Studio you can get ServiceStack debugging information in application output pane by enabling debug logs:
LogManager.LogFactory = new DebugLogFactory(debugEnabled:true);