1
votes
  1. I create test project on asp.net 5 RC1.

  2. Build and run on IIS Express

  3. Publish by file system

  4. Create new application in "Default Web Site" http://localhost/asp5

  5. Enable log in wwwroot\web.config

  6. Get 404 error in browser http://localhost/asp5

  7. In log Now listening on: http://localhost:29715

  8. I can open http://localhost:29715 in browser

  9. In log present error

    info: Microsoft.AspNet.Hosting.Internal.HostingEngine[1]

    Request starting HTTP/1.1 GET http://localhost/asp5

    info: Microsoft.AspNet.Hosting.Internal.HostingEngine[2]

    Request finished in 0ms 404

Why IIS not redirect http://localhost/asp5 to http://localhost:29715 ?

2

2 Answers

1
votes

In Startup.cs replace Configure(..) method with

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
    app.Map("/asp5", (app1) => this.Configure1(app1, env, loggerFactory));
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure1(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
    //OLD CODE

"/asp5" is name of Virtual app

0
votes

Check for two things:

  1. Right-click on you Site in IIS and select "Edit Bindings...". In the opened window check if you have http binding on 29715
  2. If bindings are correct, please open in a text editor your web.config on the server and check for httpRedirect tag