Skip to main content
Home Forums General Silverlight Installation and Setup WCF Publishing Problem
2 replies. Latest Post by Amanda Wang - MSFT on July 3, 2009.
(0)
bdzahirul
Member
0 points
12 Posts
07-01-2009 4:58 AM |
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
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.
[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
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
All-Star
16276 points
2,479 Posts
07-02-2009 5:14 AM |
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 W...
17241 points
1,466 Posts
07-03-2009 5:58 AM |
Hi,
You can try to refer this article, WCF: The type provided as the Service attribute could not be found