简体   繁体   中英

Error 404 When Routing Using IIS 8 and VB.Net

I am trying to create an endpoint for an app using VB.NET ASP and have my first one set up. This endpoint is a simple request for some data from an SQL database. On my web server machine I have visual studio 2013 and when I run my app and use internet explorer to navigate to the endpoint using my localhost I get results returned in the browser.. If I then change the localhost for the ip address of the site (local and over the internet using a redirected web address) I get a 404 error. I have searched the net and tried as many suggestions to get it working but to no avail. In my attached image I show both samples of internet explorer when navigating and the route code I use. My web.config shows this in relation to the routing..
<modules> <remove name="UrlRoutingModule-4.0" /> <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" /> </modules>

I do not know what else I can look for and would appreciate some advice.. Please also state if more information is needed..

Thank you,

Derek.

在此处输入图片说明

Just from your screenshot I can see you're not referencing the same port using the IP vs localhost. If that doesn't fix the issue you may need to map your IP configuration inside IIS.

The server machine had a precompiled version of .Net V4 which had a number of options missing. Only found out eventually by fluke. Uninstalled it an installed the full version and then got new options to add in the 'turn on windows features' section.. Within 20 minutes I was up and running..

Thank you for comments.. Much appreciated.

Derek.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM