none
HTTP Error 404.0 - Not Found RRS feed

  • 问题

  • i am learning wcf recently.

    when i host a service to the console application. code as below:

    using (ServiceHost host = new ServiceHost(typeof(TrackingLogService)))
                {
                    host.AddServiceEndpoint(typeof(ITrackingLogService),
                        new BasicHttpBinding(),
                        "http://127.0.0.1/TrackingLogService");
                    host.AddServiceEndpoint(typeof(ITrackingLogService),
                        new NetTcpBinding(),
                        "net.tcp://127.0.0.1:8888/TrackingLogService");
                    host.Open();
                }
                Console.ReadLine();

    i start the host application and it run ok without any exception.

    but when i got to browser and type:http://localhost/TrackingLogService

    i got the following error:

    HTTP Error 404.0 - Not Found

    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

    if i change the 80 port to 8001 and got to browser to view : http://localhost:8001/TrackingLogService,the page can't load.

    can anyone help on this.


    2014年11月6日 8:07

答案

全部回复