0

I used apidocjs to setup the documentation of my asp.net web api app. Everything works fine on my machine when I run my web api in visual studio but not on the server I deployed the app to. I get a 404 error when I navigate to the index.html generated by apidocjs. I think it's an issue with IIS.

I need suggestions on how to resolve this?

enter image description here

2 Answers2

0

Ok. Found the problem kind of silly.

I did not include the ~ symbol as part of the path in my anchor tag. Before I had

I added ~

<li><a href="/service-doc/index.html">Docs</a></li>

<li><a href="~/service-doc/index.html">Docs</a></li>

and problem solved!!!

0

Update.

What I did earlier solved the problem on the deployment i did to my local IIS but not on my remote server.

I had move my static html file into the Content folder of my web-api, edited the link to look like this and the problem was resolved.

<a href="@Url.Content("~/Content/doc/index.html")">Docs</a>

Got this from here. Ordinary html links in mvc razor

Community
  • 1
  • 1