shaju antony

shaju antony

  • NA
  • 1
  • 1.5k

The type 'abc.in.MyService'

Jun 25 2013 9:38 PM

 Hi,

I have created WCF file, it working fine in my local system, but after launch, it throws an error

like

The type 'abc.in.myService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

the 'scv' file and related files are launched in a shared host server

its structure is

httpdocs
bin ---> folder
myService.dll
myService.svc
web.config

here i am calling a site like "abc.in"

so how to define the service name and contract, if the access point is like "abc.in"

markup of svc file is
-------------------------

< %@ ServiceHost Language="C#" Debug="true" Service="abc.in.MyService" CodeBehind="MyService.svc.cs" %>


my web config file is
-------------------------

< ?xml version="1.0"?>
< configuration>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.0">
</compilation>
</system.web>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="True" >
</serviceHostingEnvironment>
<services>
<service name="abc.in.myService" behaviorConfiguration="myWCF">
<endpoint address="" binding="wsHttpBinding" contract="abc.in.IMyService">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="myWCF">
<serviceMetadata httpGetEnabled="true" policyVersion="Policy15"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
</system.webServer>
< /configuration>




please help me, i am trying for last 2 daysso how to define the service name and contract, if the access point is like "abc.in"

markup of svc file is
-------------------------

< %@ ServiceHost Language="C#" Debug="true" Service="abc.in.MyService" CodeBehind="MyService.svc.cs" %>


my web config file is
-------------------------

< ?xml version="1.0"?>
< configuration>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.0">
</compilation>
</system.web>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="True" >
</serviceHostingEnvironment>
<services>
<service name="abc.in.myService" behaviorConfiguration="myWCF">
<endpoint address="" binding="wsHttpBinding" contract="abc.in.IMyService">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="myWCF">
<serviceMetadata httpGetEnabled="true" policyVersion="Policy15"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
</system.webServer>
< /configuration>

 

i am trying this, to use in windows desktop application

 
please help me, i am trying for last 2 days

Thanks & Regards

Shaju


Answers (1)