wcf - EndpointNotFound exception on Silverlight Web App, hosted on IIS -


once again hope can assist problem can't figure out.

i have silverlight web app used work , after making changes code, adding wcf methods , updating tables on ms-sql database, has stopped working , cannot figure out why.

the web app runs on windows 7 hosted in default iis.

when running through visual studio works fine, not when running web page.

i know has enpdoint, strange didn't change there. runs same site on iis.

the wcf trace:

exception.servicemodel.endpointnotfoundexception, system.servicemodel, version=4.0.0, culture=neutral, publictoken=b77a5c561934e089 

i not familiar silverlight cannot figure out has changed or broke.

a portion of web.config:

    <system.servicemodel>     <behaviors>       <servicebehaviors>         <behavior name="">           <servicemetadata httpgetenabled="true"/>           <servicedebug includeexceptiondetailinfaults="true"/>         </behavior>       </servicebehaviors>     </behaviors>      <bindings>       <custombinding>         <binding name="hscgym.web.gymrebateservice.custombinding0" receivetimeout="00:10:00" sendtimeout="00:10:00" opentimeout="00:10:00" closetimeout="00:10:00">           <binarymessageencoding/>           <httptransport/>         </binding>       </custombinding>     </bindings>     <servicehostingenvironment aspnetcompatibilityenabled="true" multiplesitebindingsenabled="true"/>     <services>       <service name="hscgym.web.gymrebateservice">         <endpoint address="" binding="custombinding" bindingconfiguration="hscgym.web.gymrebateservice.custombinding0" contract="hscgym.web.gymrebateservice"/>         <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange"/>       </service>     </services>   </system.servicemodel> 

if break , check endpoint uri address, shows incorrectly:

http://localhost:8080/rebate/ebate/gymrebateservice.svc

any ideas doing wrong?

neill

the issue haven't told web service end point use 1 created localhost.

here bit of code use automatically switch between localhost , server don't have remember when deploying

string serverpath = app.current.host.source.absoluteuri.replace(app.current.host.source.absolutepath, "");         string servicepath = serverpath + "/services/yourservicename.svc";          var mybindings = new basichttpbinding();         mybindings.security.mode = basichttpsecuritymode.none;         mybindings.maxreceivedmessagesize = int.maxvalue;         var address = new endpointaddress(servicepath);          app.globalvars.service = new riftruncomparerserviceclient(mybindings,address); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -