1
votes

I have an ASP.NET Webforms application and I want to run ServiceStack alongside it. Lets say the application's URL is ~/Web. I have read the ServiceStack tutorial at http://www.servicestack.net/ServiceStack.Hello/.

Since my app is not MVC, I followed the installation of ServiceStack at the root "/" path. I have successfully configured ServiceStack and now displays the metadata when I use URL ~/Web/metadata.

But the problem is, when going to the default URL ~/Web, it serves default.htm page in which it should be serving to Default.aspx.

Inline questions:

  • Can I configure ASP.NET Webforms to go back to Default.aspx than the newly added (by the nuget installation of ServiceStack) default.htm?

  • If I remove the default.htm file, the default URL ~/Web would route to ~/Web/metadata. Even if I use ~/Web/Default.aspx, it would still route to ~/Web/metadata. Any workaround to make Default.aspx work as well?

  • Should I be using the custom path (eg: ~/Web/api) instead?

Please let me know if the question is not clear. Thanks in advance!

1

1 Answers

2
votes

A similar question is asked here and answered by myth. I will copy it here:

In order to run ASP.NET you need to host servicestack on a different path, e.g. /api or /servicestack See the b) web.config example on http://www.servicestack.net/ServiceStack.Hello/

You can view a static default.htm page but to run an .aspx page the request needs to go to ASP.NET.