Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF Service Can't find metadata when using class from external dll
    primarykey
    data
    text
    <p>I'm creating a WCF service that will be used to insert data into a database.</p> <p>The WCF service runs normally when using functions that are scoped locally to within the interface and class of the service itself, however, it fails to start when I use a class that is in an external DLL.</p> <p>I made sure that the class in the DLL has all the required attributes, but still can't run the service.</p> <p>Any ideas?</p> <p>EDIT: This is the faulty function</p> <pre><code> public Dal_Users createProfile(DateTime dateOfBirth, string email, string firstname, bool genderIsMale, string lastname, string mphoneno, string nickname, string password, string pictureURL) { try { //generate new user object /////////////////////////start user metadata///////////////////////////////////////// Dal_Users newUser = new Dal_Users(); newUser.DateOfBirth = dateOfBirth; newUser.Email = email; newUser.FirstName = firstname; newUser.GenderIsMale = genderIsMale; newUser.LastName = lastname; newUser.MPhoneNo = mphoneno; newUser.NickName = nickname; newUser.Password = password; newUser.ProfilePicture = pictureURL; //////////////////////////////end user metadata/////////////////////////////////////// //insert user in database, call updateUsers without an ID newUser.UpdateUsers(); return newUser; } catch (Exception ex) { return new Dal_Users(); } } </code></pre> <p>The class DAL_Users comes from a DLL and is marked as a <code>DataContract</code></p> <pre><code>/// &lt;summary&gt; /// this is the data access class for the table Users /// &lt;/summary&gt; [DataContract] public class Dal_Users </code></pre> <p>EDIT2: </p> <pre><code>My app.config looks like this </code></pre> <pre class="lang-xml prettyprint-override"><code> &lt;system.serviceModel&gt; &lt;services&gt; &lt;service name="ProfileService.ProfileMgr"&gt; &lt;endpoint address="" binding="wsHttpBinding" contract="ProfileService.IProfileMgr"&gt; &lt;identity&gt; &lt;dns value="localhost" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="http://localhost:8732/Design_Time_Addresses/ProfileService/Service1/" /&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior&gt; &lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --&gt; &lt;serviceMetadata httpGetEnabled="True"/&gt; &lt;!-- 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 --&gt; &lt;serviceDebug includeExceptionDetailInFaults="False" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; </code></pre> <p>The error I'm receiving is </p> <blockquote> <p>Error: Cannot obtain Metadata from <a href="http://localhost:8732/Design_Time_Addresses/ProfileService/Service1/mex" rel="nofollow">http://localhost:8732/Design_Time_Addresses/ProfileService/Service1/mex</a> If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at <a href="http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata" rel="nofollow">http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata</a> Exchange Error URI: <a href="http://localhost:8732/Design_Time_Addresses/ProfileService/Service1/mex" rel="nofollow">http://localhost:8732/Design_Time_Addresses/ProfileService/Service1/mex</a> Metadata contains a reference that cannot be resolved: 'http://localhost:8732/Design_Time_Addresses/ProfileService/Service1/mex'. <Code>Receivera:InternalServiceFault</Code>The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the &lt;serviceDebug&gt; configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.HTTP GET Error URI: <a href="http://localhost:8732/Design_Time_Addresses/ProfileService/Service1/mex" rel="nofollow">http://localhost:8732/Design_Time_Addresses/ProfileService/Service1/mex</a> There was an error downloading 'http://localhost:8732/Design_Time_Addresses/ProfileService/Service1/mex'. The request failed with HTTP status 400: Bad Request.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload