none
500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.

    Question

  •  I have a project in which i uses the wcf service for fetching data from the database. In local host my project is working absolutely fine. When i implemented my project on the server and browse my wcf service i got the following error:-

    500 - Internal server error.

    There is a problem with the resource you are looking for, and it cannot be displayed.

    because of this i m not able to fetch data from the database.

    I can browse my wcf service in the local host.

    Also, when i tried to create a service reference of the service which i have placed on the server from the localhost i got the followng error:-

    Metadata contains a reference that cannot be resolved:
    The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly.

    Plz Help!

     

     

    Monday, May 10, 2010 3:14 AM

Answers

  • You need to run "ServiceModelReg -i" in the command prompt of your server.

    i think you need to use the VS command prompt so you get appropriate PATHs.

    otherwise, look for the ServiceModelReg.exe in your server machine.. and run it from there.

    Monday, May 10, 2010 4:16 AM

All replies

  • do you the ServiceReference.ClientConfig file in your main silverlight project? ( the project that generates the XAP )

    if yes, do you have the server url point to the correct URL? probably should not be localhost and should be something else (machinename:port).

    Monday, May 10, 2010 3:29 AM
  •  hi shihalv, thanks for reply.

    I m changing the endpoint address at run time. Its not related to end point address. I checked it already.

    Monday, May 10, 2010 3:43 AM
  • have you registered the WCF in your IIS?

    ServiceModelReg -i.

    see http://msdn.microsoft.com/en-us/library/ms732012.aspx

    Monday, May 10, 2010 3:47 AM
  •  hi shihalv,

    is it possible to register wcf through web.config file or through coding.

    Actually i dont have access to IIS .

    Is there is something,  that i write in web.config file that will register wcf on IIS if not registered.

    Monday, May 10, 2010 4:11 AM
  • You need to run "ServiceModelReg -i" in the command prompt of your server.

    i think you need to use the VS command prompt so you get appropriate PATHs.

    otherwise, look for the ServiceModelReg.exe in your server machine.. and run it from there.

    Monday, May 10, 2010 4:16 AM