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 Answers 2

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!!!

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.