Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to run WCF service in a dotnetnuke
    text
    copied!<p>I am trying to run WCF service under DNN.<br/> I created a new WCF service web site project and set output to <code>C:\inetpub\...\dotnetnuke\bin</code><br/> I also removed web.config from that project.<br/> Then I have created on console project and try to add service reference but I get the following error:</p> <pre><code>An error occured while attempting to find services at 'http://localhost:5847/MyService/Service.svc </code></pre> <p>I removed code from old web config to dnnweb config <code>&lt;system.serviceModel&gt;</code> but still don't work. What I want to do is to be able to access web service with url like</p> <pre><code>localhost/dotnetnuke/portal/mywebservice... </code></pre> <p>and not as default</p> <pre><code>localhost:XXXX/... </code></pre> <p>This is from my dotnetnuke web.config</p> <pre><code>&lt;system.serviceModel&gt; &lt;services&gt; &lt;service name="Service" behaviorConfiguration="ServiceBehavior"&gt; &lt;endpoint address="localhost/dotnetnuke/service.svc" binding="wsHttpBinding" contract="IService"&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;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="ServiceBehavior"&gt; &lt;serviceMetadata httpGetEnabled="true"/&gt; &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; </code></pre> <p>If I type full address in browser</p> <pre><code>http://localhost/dotnetnuke/desktopmodules/com.demo.service/service.svc </code></pre> <p>I get following error page:</p> <blockquote> <p>The type 'Service', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.</p> </blockquote>
 

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