0

Whenever i setup a site using iis express in localhost, it automatically creates the address as http://localhost:80/901.

But i have originally given the url as http://localhost:901 when i have setup the project in the iis express section of the properties.

i am redirecting from localhost:904 (iis express hosted site) to localhost:80/901 (iis express hosted site) and i couldn't open localhost:80/901 and giving the below error HTTP Error 404.0 - Not Found, MapRequestHandler (Error Code 0x80070002)

How to overcome this problem? Any help will be appreciated a lot.

cheesemacfly
  • 11,622
  • 11
  • 53
  • 72
selva
  • 1
  • 2
  • `This url is giving problem when we do redirection in MVC` what do you mean? – cheesemacfly Aug 20 '14 at 18:03
  • i am redirecting from http://localhost:904 (iis express hosted site) to http://localhost:80/901 (iis express hosted site) and i couldn't open http://localhost:80/901 and giving the below error HTTP Error 404.0 - Not Found, MapRequestHandler (Error Code 0x80070002) – selva Aug 20 '14 at 18:09
  • I'm very unclear on what you are trying to achieve and what is your issue...what is `localhost:80/901` and why are you trying to redirect from `localhost:904` to `localhost:80/901`? – cheesemacfly Aug 20 '14 at 18:10
  • localhost:904 and localhost:80/901 are two different mvc projects hosted in iis express. programatically i am redirecting from 904 to 901. – selva Aug 20 '14 at 18:16
  • And what is localhost:80/901 giving you without the redirect? – cheesemacfly Aug 20 '14 at 18:18
  • it is giving the same error. Can i have http://localhost:901 instead of http://localhost:80/901? i don't why iis express by default add this 80 port when i create a virtual directory :( – selva Aug 20 '14 at 18:30
  • port 901 is my startup project. – selva Aug 20 '14 at 18:32
  • Are you sure that you are using iis express? if yes, have you looked at: http://stackoverflow.com/questions/8735713/creating-virtual-directories-in-iis-express ? – cheesemacfly Aug 20 '14 at 18:35
  • if i have changed anything on the applicationhost.config file, i am getting the error unable to start the iis express error. I am trying to change the below binding from 80 to different number , but iis express couldn't launch after i change the default port. – selva Aug 20 '14 at 19:10
  • Any help on this issue will be appreciated. Thanks for your time. – selva Aug 20 '14 at 19:31

1 Answers1

0

I have removed port 80 in iis and so iis express is taking the port 80 which is the confusion. After i closed the visual studio and add port 80 to the iis and port 80 dependency have been removed from iis express. Now i got the port as http://localhost:901/

selva
  • 1
  • 2