简体   繁体   中英

No endpoint found when deploying a application with a WCF service reference

I have an MVC3 app with a WCF service reference. Of course when im debugging on my localhost, it runs fine. I published my MVC3 app to my test web server, configured it in IIS and i can get to the home screen fine. I published my WCF app to the same web server, set it up in IIS but when I click my login button which calls a method in my WCF service, i get this error:

 [EndpointNotFoundException: There was no endpoint listening at 
 http://localhost:56266/RQServices.svc that could accept the message.

In IIS i have the site called NewPCloser which points to C:\\NewPcloser and in IIS, the WCF app is setup and points to C:\\NewPcloser\\services. The file RQServices.svc is in this directory. Everything was setup in IIS with all the defaults except where the apps are pointing. I'm not sure what else i need to say or show, but let me know and i'll do it.

My test site is (htp for stackoverflow)htp://devdb/newpcloser. The services are at htp://devdb/newpcloserservices. Should i point something to one of these 2 places?

Bottom line why am I getting this error? Thanks

Open your Web.Config file and see what is the endpoint configuration you have. Make sure it is same as the URL where you get the service.

Assuming your Service is available at this url in your server

http://www.yourserver.com/someservice/something.svc

then your endpoint should look like this

<endpoint address="http://www.yourserver.com/someservice/something.svc"  

      other configuration attributes....  />

If you hosted it in the same server, you probably would be able to access it with something like http://localhost/.. , instead of your domain name in the url

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