Click here to Skip to main content
15,896,444 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I made a simple WCF service library. It works in localhost with the development server. I have tried many diff configs with a runtime error or 500 internet error. Some advice or corrections?

Environment: VS 2010, WCF Service Library, Hosting site - cloud server(Gear Host), I use ASPX for web development.
wsHttpBinding,

Here is the web.config: based on the configurations from the app.config file.
XML
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="wsServBind" />
      </wsHttpBinding>
    </bindings>
    <services>
      <service name="WebServEnc.ServLib.Service">
        <endpoint address="~/WebServEnc.ServLib.Service" binding="wsHttpBinding"
          bindingConfiguration="wsServBind" name="Default" contract="WebServEnc.IServ">
          <identity>
            <dns value="" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" name="serv"
          contract="IMetadataExchange">
          <identity>
            <dns value="http://mysite.com/" />
          </identity>
        </endpoint>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, 
          set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="True"/>
          <!-- To receive exception details in faults for debugging purposes, 
          set the value below to true.  Set to false before deployment 
          to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

</configuration>
Posted
Updated 10-Aug-12 18:32pm
v3
Comments
Kenneth Haugland 10-Aug-12 22:55pm    
Is this IIS related?
Idle_Force 10-Aug-12 23:10pm    
Yes, IIS 7.5 if I'm not mistaken.
Kenneth Haugland 10-Aug-12 23:17pm    
Are you sure that the outside world has access to the scv file on you virtual folder?
Idle_Force 10-Aug-12 23:26pm    
No, I'm not. Frankly, this is very new to me. I have a book and watched some videos, but it is still so new. In my project, after testing on localhost, I published to my host server where I have a website. Mind you it replaces the web.config file and I manually add the config info from the service. I just don't know if I going about this the right way. Thanks for you advice.

1 solution

This could take a while if im going to go trough all the possible mistakes that could have occured, so im going to give you this linke:
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/5c0a54e7-af4b-422f-bf5d-5f2f93d46ed0/[^]

If you still cant figure out what happened you are more than welcome to update your question with the new information (By using the Improve Question button)

So good luck to you :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900