Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created a WCF app but while hosting it on godaddy (shared hosting) I am facing issue. In my local I was able to access .svc file from IIS but after uploading on godaddy it started throwing errors.

I am totally new in hosting type of work on shared server. So no idea weather i have coded something wrongly, configured wrongly or uploaded on server wrongly? I am using MS Sql server and .net framework 3.5.

i am getting below error
Server Error in '/' Application.

The type 'WCF35app.LinkuService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations 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 'WCF35app.LinkuService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations 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 'WCF35app.LinkuService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.]
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +62739
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +1429
System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +52
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +598

[ServiceActivationException: The service '/WCF35app/LinkuSystem.svc' cannot be activated due to an exception during compilation. The exception message is: The type 'WCF35app.LinkuService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found..]
System.Runtime.AsyncResult.End(IAsyncResult result) +486572
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +174
System.ServiceModel.Activation.ServiceHttpModule.EndProcessRequest(IAsyncResult ar) +345998
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +9683593


Web.config code is

XML
<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <system.web>
      <compilation debug="true" />
      <customErrors mode="Off"/>
  </system.web>
  <!-- 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 name="WCF35app.LinkuService" behaviorConfiguration="WCF35app.Service1Behavior">
        <host>
          <baseAddresses>
            <add baseAddress = "http://augustinfotechhosting.com/WCF35app/" />
          </baseAddresses>
        </host>
        <!-- Service Endpoints -->
        <!-- Unless fully qualified, address is relative to base address supplied above -->
        <endpoint address="" binding="webHttpBinding" contract="WCF35app.ILinkuService" behaviorConfiguration="web">
          <!--
              Upon deployment, the following identity element should be removed or replaced to reflect the
              identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity
              automatically.
          -->
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <!-- Metadata Endpoints -->
        <!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
        <!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WCF35app.Service1Behavior">
          <!-- To avoid disclosing metadata information,
          set the value below to false before deployment -->
          <serviceMetadata httpGetEnabled="True"/>
          <!-- 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 -->
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="web">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>

    <bindings>
      <webHttpBinding>
        <binding name="webHttpBinding">
          <security mode="None" />
        </binding>
      </webHttpBinding>
    </bindings>
  </system.serviceModel>

</configuration>
Posted

1 solution

As the error says, the type WCF35app.LinkuService could not be found. It looks like you missed a file when you uploaded your site.
 
Share this answer
 
Comments
forccyy 10-Feb-15 14:02pm    
Thank you but file is already present there(verified). Else it would have thrown 404 not found or some other error related to page not found.
U share any link which can be helpful than also it will great.
Richard Deeming 10-Feb-15 14:24pm    
The .svc file might be there, but what about the class behind it? I'd expect either a loose .cs file in the App_Code folder, or a class compiled as an assembly in the bin folder.
forccyy 11-Feb-15 0:12am    
I dont have app_Code folder, but my code behind file directly reside on a same level.

See my .svc file has a lines of code as below.
<%@ ServiceHost Language="C#" Debug="true"
Service="WCF35app.LinkuService"
CodeBehind="~/LinkuService.cs"
%>

And also i have compiled dll under bin folder.

I am doubting is anything wrong with my web.config? I mean service related configuration??
Richard Deeming 11-Feb-15 7:30am    
It's unlikely to be your web.config file, since the same configuration works locally.

Does the LinkuService.cs file exist in the root of your GoDaddy site? And is it up-to-date?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900