Skip to main content

Microsoft Silverlight

Answered Question WCF Publishing ProblemRSS Feed

(0)

bdzahirul
bdzahirul

Member

Member

0 points

12 Posts

WCF Publishing Problem

 I publish a WCF project but it showing following error while i want to see wsdl.

http://cslsoft.org/WCF.BusinessObject/Wcf.BusinessObject.BOUser.svc

 

Error like bellow

 

===============

Server Error in '/' Application.

The type 'WCF.BusinessObject.BOUser', provided as the Service attribute value in the ServiceHost directive could not be found.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The type 'WCF.BusinessObject.BOUser', provided as the Service attribute value in the ServiceHost directive could not be found.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: The type 'WCF.BusinessObject.BOUser', provided as the Service attribute value in the ServiceHost directive could not be found.]
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +4072062
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +11656092
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +42
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479

[ServiceActivationException: The service '/WCF.BusinessObject/Wcf.BusinessObject.BOUser.svc' cannot be activated due to an exception during compilation. The exception message is: The type 'WCF.BusinessObject.BOUser', provided as the Service attribute value in the ServiceHost directive could not be found..]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +11527290
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +278
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

 

===============

 

My  web.config file like bellow

 

=======================

 <?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.web>
        <compilation debug="true" />
        <customErrors mode="Off"/>
    </system.web>
  <connectionStrings>
    <add name="DatabaseConnection" connectionString="Data Source=Zahir;Initial Catalog=SMSManagerDB;User ID=sa;Password=sa" providerName="System.Data.SqlClient"/>
    <add name="MobileConnection" connectionString="19" providerName="+8801670082095"/>
  </connectionStrings>
  <!-- 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>
    <services>
      <service behaviorConfiguration="WCF.BusinessObject.BOUserBehavior"
        name="WCF.BusinessObject.BOUser">
        <endpoint address="" binding="basicHttpBinding" contract="WCF.BusinessObject.IBOUser">
          <identity>
            <dns value="softsyshosting.org" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8731/Design_Time_Addresses/WCF.BusinessObject/BOUser/" />
          </baseAddresses>
        </host>
      </service>
      <service behaviorConfiguration="WCF.BusinessObject.BOtblApplicationBehavior"
        name="WCF.BusinessObject.BOtblApplication">
        <endpoint address="" binding="wsHttpBinding" contract="WCF.BusinessObject.IBOtblApplication">
          <identity>
            <dns value="softsyshosting.org" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8731/Design_Time_Addresses/WCF.BusinessObject/BOtblApplication/" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WCF.BusinessObject.BOUserBehavior">
          <serviceMetadata httpGetEnabled="true"  />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
        <behavior name="WCF.BusinessObject.BOtblApplicationBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

======================

 

Can anyone help me?

ken tucker
ken tucker

All-Star

All-Star

16276 points

2,479 Posts

Re: WCF Publishing Problem

 The error is saying it can not find the type WCF.BusinessObject.BOUser.  Could you be missing a namespace? 

Maybe it should be MyProjectName.WCF.BusinessObject.BOUser

Amanda Wang - MSFT
Amanda W...

All-Star

All-Star

17241 points

1,466 Posts

Answered Question

Re: WCF Publishing Problem

 Hi,

You can try to refer this article, WCF: The type provided as the Service attribute could not be found

Hope it helps.

Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities