WCF, Service attribute value in the ServiceHost directive could not be found
I'm trying to host my service with IIS 6 but I keep get this exception.
Server Error in '/WebServices' Application.
--------------------------------------------------------------------------------
The type 'QS.DialogManager.Communication.IISHost.RecipientService', 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 'QS.DialogManager.Communication.IISHost.RecipientService', 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 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found.]
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri baseAddresses) +6714599
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +604
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +46
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +654
[ServiceActivationException: The service '/WebServices/dm/RecipientService.svc' cannot be activated due to an exception during compilation. The exception message is: The type 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found..]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +15626880
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15546921
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +227
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
I have absolutely no clue except that it seems like it can't find my assemblies. The code should be correctly compiled with public classes.
Here is my .svc file:
<%@ ServiceHost Language="C#" Debug="true" Service="QS.DialogManager.Communication.IISHost.RecipientService" CodeBehind="RecipientService.svc.cs" %>
I have tried to create a very very simple service that contains just nothin too see if this would work but still the same old error shows up.
The type 'IISHost.Service1', provided as the Service attribute value in the ServiceHost directive could not be found.
c# wcf iis
|
show 1 more comment
I'm trying to host my service with IIS 6 but I keep get this exception.
Server Error in '/WebServices' Application.
--------------------------------------------------------------------------------
The type 'QS.DialogManager.Communication.IISHost.RecipientService', 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 'QS.DialogManager.Communication.IISHost.RecipientService', 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 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found.]
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri baseAddresses) +6714599
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +604
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +46
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +654
[ServiceActivationException: The service '/WebServices/dm/RecipientService.svc' cannot be activated due to an exception during compilation. The exception message is: The type 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found..]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +15626880
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15546921
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +227
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
I have absolutely no clue except that it seems like it can't find my assemblies. The code should be correctly compiled with public classes.
Here is my .svc file:
<%@ ServiceHost Language="C#" Debug="true" Service="QS.DialogManager.Communication.IISHost.RecipientService" CodeBehind="RecipientService.svc.cs" %>
I have tried to create a very very simple service that contains just nothin too see if this would work but still the same old error shows up.
The type 'IISHost.Service1', provided as the Service attribute value in the ServiceHost directive could not be found.
c# wcf iis
Can you show contents of service.svc?
– Konstantin Tarkus
Apr 6 '09 at 10:00
1
If it reference a pre-compiled type in an assembly, have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:01
2
<%@ ServiceHost Language="C#" Debug="true" Service="QS.DialogManager.Communication.IISHost.RecipientService" CodeBehind="RecipientService.svc.cs" %>
– nandarya
Apr 6 '09 at 10:13
1
Thanks for posting this, your Q&A just fixed the same problem for me.
– Pauk
Jul 22 '09 at 15:59
Comment since I cannot Save apparently...
– Joshua Drake
Jul 9 '13 at 20:13
|
show 1 more comment
I'm trying to host my service with IIS 6 but I keep get this exception.
Server Error in '/WebServices' Application.
--------------------------------------------------------------------------------
The type 'QS.DialogManager.Communication.IISHost.RecipientService', 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 'QS.DialogManager.Communication.IISHost.RecipientService', 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 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found.]
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri baseAddresses) +6714599
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +604
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +46
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +654
[ServiceActivationException: The service '/WebServices/dm/RecipientService.svc' cannot be activated due to an exception during compilation. The exception message is: The type 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found..]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +15626880
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15546921
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +227
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
I have absolutely no clue except that it seems like it can't find my assemblies. The code should be correctly compiled with public classes.
Here is my .svc file:
<%@ ServiceHost Language="C#" Debug="true" Service="QS.DialogManager.Communication.IISHost.RecipientService" CodeBehind="RecipientService.svc.cs" %>
I have tried to create a very very simple service that contains just nothin too see if this would work but still the same old error shows up.
The type 'IISHost.Service1', provided as the Service attribute value in the ServiceHost directive could not be found.
c# wcf iis
I'm trying to host my service with IIS 6 but I keep get this exception.
Server Error in '/WebServices' Application.
--------------------------------------------------------------------------------
The type 'QS.DialogManager.Communication.IISHost.RecipientService', 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 'QS.DialogManager.Communication.IISHost.RecipientService', 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 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found.]
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri baseAddresses) +6714599
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +604
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +46
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +654
[ServiceActivationException: The service '/WebServices/dm/RecipientService.svc' cannot be activated due to an exception during compilation. The exception message is: The type 'QS.DialogManager.Communication.IISHost.RecipientService', provided as the Service attribute value in the ServiceHost directive could not be found..]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +15626880
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15546921
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +227
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
I have absolutely no clue except that it seems like it can't find my assemblies. The code should be correctly compiled with public classes.
Here is my .svc file:
<%@ ServiceHost Language="C#" Debug="true" Service="QS.DialogManager.Communication.IISHost.RecipientService" CodeBehind="RecipientService.svc.cs" %>
I have tried to create a very very simple service that contains just nothin too see if this would work but still the same old error shows up.
The type 'IISHost.Service1', provided as the Service attribute value in the ServiceHost directive could not be found.
c# wcf iis
c# wcf iis
edited Apr 6 '09 at 11:07
asked Apr 6 '09 at 9:39
nandarya
3781312
3781312
Can you show contents of service.svc?
– Konstantin Tarkus
Apr 6 '09 at 10:00
1
If it reference a pre-compiled type in an assembly, have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:01
2
<%@ ServiceHost Language="C#" Debug="true" Service="QS.DialogManager.Communication.IISHost.RecipientService" CodeBehind="RecipientService.svc.cs" %>
– nandarya
Apr 6 '09 at 10:13
1
Thanks for posting this, your Q&A just fixed the same problem for me.
– Pauk
Jul 22 '09 at 15:59
Comment since I cannot Save apparently...
– Joshua Drake
Jul 9 '13 at 20:13
|
show 1 more comment
Can you show contents of service.svc?
– Konstantin Tarkus
Apr 6 '09 at 10:00
1
If it reference a pre-compiled type in an assembly, have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:01
2
<%@ ServiceHost Language="C#" Debug="true" Service="QS.DialogManager.Communication.IISHost.RecipientService" CodeBehind="RecipientService.svc.cs" %>
– nandarya
Apr 6 '09 at 10:13
1
Thanks for posting this, your Q&A just fixed the same problem for me.
– Pauk
Jul 22 '09 at 15:59
Comment since I cannot Save apparently...
– Joshua Drake
Jul 9 '13 at 20:13
Can you show contents of service.svc?
– Konstantin Tarkus
Apr 6 '09 at 10:00
Can you show contents of service.svc?
– Konstantin Tarkus
Apr 6 '09 at 10:00
1
1
If it reference a pre-compiled type in an assembly, have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:01
If it reference a pre-compiled type in an assembly, have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:01
2
2
<%@ ServiceHost Language="C#" Debug="true" Service="QS.DialogManager.Communication.IISHost.RecipientService" CodeBehind="RecipientService.svc.cs" %>
– nandarya
Apr 6 '09 at 10:13
<%@ ServiceHost Language="C#" Debug="true" Service="QS.DialogManager.Communication.IISHost.RecipientService" CodeBehind="RecipientService.svc.cs" %>
– nandarya
Apr 6 '09 at 10:13
1
1
Thanks for posting this, your Q&A just fixed the same problem for me.
– Pauk
Jul 22 '09 at 15:59
Thanks for posting this, your Q&A just fixed the same problem for me.
– Pauk
Jul 22 '09 at 15:59
Comment since I cannot Save apparently...
– Joshua Drake
Jul 9 '13 at 20:13
Comment since I cannot Save apparently...
– Joshua Drake
Jul 9 '13 at 20:13
|
show 1 more comment
22 Answers
22
active
oldest
votes
Option One:
This message is often due to an IIS 7 config problem. If you are used to creating a virtual directory pointing to the folder where your service resides, that no longer works. Now, you need to use the "Create Application..." option instead.
Other Options:
WCF: The type provided as the Service attribute could not be found- The type , provided as the Service attribute value in the ServiceHost directive could not be found.
1
Where can I find this option on IIS 6?
– nandarya
Apr 6 '09 at 9:48
2
Verify that virtual folder in IIS6 is a web application
– Konstantin Tarkus
Apr 6 '09 at 9:53
2
Have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:04
4
Yes, now it works! I missunderstood you before and solved the problem making the subfolder to a virtual app. Thanks a lot!
– nandarya
Apr 6 '09 at 11:27
3
In my case it turned out that project output was out of web site folder (fixed by changing output folder to 'bin')
– Pavel Shkleinik
Dec 4 '13 at 19:09
|
show 10 more comments
The problem could also be a in a different namespace in svc file as it is in svc.cs file.
In svc file namespace must be in the following format.
Service="Namespace.SvcClassName"
1
This is espcially common in VS Express which does not have refactoring support and the IDE does not easily display the content of the svc file.
– Chriseyre2000
Mar 11 '12 at 11:10
2
This was my exact problem. I went through my solution and seperated out the namespaces between the two projects within the solution and forgot to update the .svc reference.
– Nip
Jul 5 '12 at 18:38
2
You nailed it, most tuitorials on the web are placing a name space around the sample WCF service and interface and it needs to be brought to the service.svc page.
– htm11h
May 16 '14 at 18:54
2
This helped me. I changed my namespace but couldnt figure out how to open the service file (servicename.svc) in VS2010 Express. I ended up going to the file system and opening the file directly into notepad++ and editing it in there.
– Andrew MacNaughton
Nov 7 '14 at 19:13
add a comment |
I know this is probably the "obvious" answer, but it tripped me up for a bit. Make sure there's a dll for the project in the bin folder. When the service was published, the guy who published it deleted the dlls because he thought they were in the GAC. The one specifically for the project (QS.DialogManager.Communication.IISHost.RecipientService.dll, in this case) wasn't there.
Same error for a VERY different reason.
This seems to make a difference for me - our project outputs its assembly elsewhere. Adding binDebug and copying the dll to it seemed to work.
– Tom W
Jun 27 '13 at 10:42
I was missing a third-party dll...
– Cosmin
Jul 25 '14 at 15:01
Thank you. I forgot to build my application after a branch and was wondering why IIS was throwing those errors. Man, don't i feel silly...
– Dudemanword
Sep 15 '14 at 19:12
add a comment |
This error occurs due to mismatch of Service name in .SVC file. Probably you might have changed the name of the service class that is implementing the interface.The Solution is to open .SVC file and exactly match the Service attribute and CodeBehind Attribute. So your .SVC file should be like
<%@ ServiceHost Language="Language you are using" Debug="bool value to enable debugging" Service="Service class name that is implementing your Service interface" Codebehind="~/Appcode/Class implementing interface.cs"%>. for eg.
<%@ ServiceHost Language="C#" Debug="true" Service="Product.Service" CodeBehind=~/AppCode/Product.Service.cs"%>
This example is for .svc file that is using C# language, with debugging enabled, Service class implementing interface and this class is within app folder with name Service.cs and Product is namespace for Service class.
Also Please make respective change in service config file.
<system.serviceModel>
<services>
<service name="Product.Service" behaviorConfiguration="ServiceBehavior">
<endpoint address="" binding="wsHttpBinding" contract="Product.Iservice">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<behavior name="ServiceBehavior">
<serviceMetaData httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</behaviors>
</system.serviceModel>
1
This was my problem, I later moved my .svc file into "Client" subfolder. Service directive inside .svc file was missing this new folder/namespace:Service="MyServicesProxy.Client.OpenClientService"
– Iztoksson
Mar 9 '16 at 11:13
Exactly. Thanks
– Bhuwan Pandey
Jul 6 '17 at 7:52
Just note also that the service name is case-sensitive! As a vb.net developer, that tricked me!
– J.Hudler
Aug 9 '17 at 20:17
add a comment |
Double check that you're referencing the correct type from the ServiceHost directive in the .svc file. Here's how...
- In the VS project containing your web service, open the .svc file in the XML editor (right-click the file, Open With..., choose XML (Text) Editor, OK).
- Note the "Service" attribute value.
- Make sure it matches the fully qualified type name of your service. This includes the namespace + type name. For example, if the namespace is "MyCompany.Department.Services" and the class is called "MyService", then the Service attribute value should be "MyCompany.Department.Services.MyService".
You should open SVC files in the Web Service Editor (the default) because the XML editor will give you XML validation errors.
– DanM7
Jun 5 '15 at 17:29
add a comment |
I had the same Exception, this is due to the Type not correctly mentioned in the .svc file
I corrected with below fix.
if your .svc.cs has class like this
namespace Azh.Services.MyApp
{
public class WcfApp : FI.IWcfAppService
{
...
}
}
for this the .svc file should look like this
<%@ ServiceHost Language="C#" Debug="true" Service="Azh.Services.MyApp.WcfApp" CodeBehind="WcfApp.svc.cs" %>
Life saver! I had renamed my service project and namespace but this hadn't been updated.
– arviman
Aug 15 '15 at 14:36
add a comment |
You should configure your bin folder path to service local bin.
1
Indeed, copying the DLL to a folder in the same path as svc file worked.C:FolderSVC_ServiceFolderbin
. I had to remove some duplicate config tags.
– Junior M
Oct 14 '11 at 19:50
add a comment |
I practically solved the same issue . Here is my suggestion -- The error means that the object referenced in the Service attribute is not found. For the object to be found, the application or library must build output to the bin folder.
You can edit property page of the application and specify the output path to 'bin'.
Yes, my project properties had "binDebug" for output path - changed it to just "bin". Might be related to the fact that this was a very old project file now used in VS2017.
– joanygaard
Dec 6 '17 at 12:00
add a comment |
If you have renamed anything verify the (Properties/) AssemblyInfo.cs
is correct, as well as the header in the service file.
ServiceName.svc
<%@ ServiceHost Language="C#" Debug="true" Service="Company.Namespace.WcfApp" CodeBehind="WcfApp.svc.cs" %>
Aligning with your namespace in your Service.svc.cs
add a comment |
Two keys to this for certain flavors of the ' Service attribute value in the ServiceHost directive could not be found'-problem: (1) If you're working in Silverlight, you should use the Silverlight WCF-Enabled Service, not the non-Silverlight WCF Service; this will update Web.Config for the bindings and allow the type to be visible; (2) Match the class name in the new service to the Service name -- the goal here is to make a wsdl... so that you know the service's functionality is exposed to your Silverlight client and to the Web; it helps to have the service match the class. If you get the names gummed up, you will have to edit the Web.Config in 3 places (serviceBehaviors, services and bindings).
There were so many sincere attempts to help folks with this problem that were not helpful to me that it should be stressed that this write-up is for a Silverlight solution and it may not apply for someone not using Silverlight 3 in a client/Web configuration.
Hope it helps.
add a comment |
I had the same problem but no clue what caused it. I Solved it by changing from Debug to Release and Run using Debug/Start New Instance. After that, it ran in both Release and Debug. It was magic...
This happens to be when I have a Web UI and and Web Service project in the same solution. The Web Service does not compile if its not understood as a dependency for the Web UI.
– StingyJack
Mar 30 '16 at 17:38
add a comment |
I also ran into this issue trying the Microsoft.ServiceModel.Samples.Calculator WCF sample. I am using IIS 5.1. I resolved it by ensuring that the website that was auto-generated (servicemodelsamples) was not an application. Right-click the folder, click "Properties" and click the "Create" button.
add a comment |
I had this problem - my service type was in the GAC. It WOULD work if i added the dll containing the type to the bin folder but as it was in the GAC this was NOT what I wanted. I eventually added this to the web.config for the service
<system.web>
<customErrors mode="RemoteOnly" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="[name in GAC], Version=[version in GAC], Culture=neutral, PublicKeyToken=[ac token]" />
</assemblies>
</compilation>
</system.web>
and it worked without needing any dlls in the bin folder.
add a comment |
I had my service dll's in the bin folder where the svc file was residing. Moving the dll's to the root bin folder solved the problem.
add a comment |
In my case Right Click on Virtual Directory and Select "Convert To Application" worked!
1
Worked for me, thanks to Atul, sounds like thats the solution for most of the requesters here!
– Erdinc Ay
Sep 7 '17 at 13:37
add a comment |
I faced with this error today, reason was; IIS user doesn't have permission to reach to the application folder. I gave the read permissions to the app root folder.
add a comment |
This may sound trivial, but worth mentioning:
You have to build the service (in Visual Studio) - then a DLL will be created in the
bin subfolder.
When the service is "deployed" on a server - that bin folder needs to have that DLL file in it - otherwise this error will be thrown...
add a comment |
Add reference of service in your service or copy dll.
1
Good answers expand on their points to a reasonable extent - maybe you could add in some extra information? For example, how do you do this? Why should you do this?
– Swadq
Dec 11 '12 at 22:49
@Swadq Good answers actually answer the question which this does not; adding a web reference is different from creating a service which is what this question is. You add the reference to the service after the service is created and accessible.
– Richard Barker
Sep 11 '15 at 17:40
add a comment |
Building the solution before adding the service reference solved my problem.
add a comment |
I got this error when trying to add the Service reference for the first Silverlight enabled WCF in the same solution. I just build the .Web project and it started working..
add a comment |
I had the same problem, found this thread, tried all but nogo.
Then I spend another 4 hours wasted time.
Then I found that the compilation settings had changed from 64bits to x86. When I changed it back to 64bits it worked. Don't know exactly why but could be that the IIS application pool was not set to allow 32 bit applications.
add a comment |
Make sure markup (svc) file has service attribute with namespace.classname and codebehind will be classname.svc.cs
Rebuild the solution
Restart the app pools from local IIS once.
add a comment |
protected by Community♦ Dec 29 '11 at 12:47
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
22 Answers
22
active
oldest
votes
22 Answers
22
active
oldest
votes
active
oldest
votes
active
oldest
votes
Option One:
This message is often due to an IIS 7 config problem. If you are used to creating a virtual directory pointing to the folder where your service resides, that no longer works. Now, you need to use the "Create Application..." option instead.
Other Options:
WCF: The type provided as the Service attribute could not be found- The type , provided as the Service attribute value in the ServiceHost directive could not be found.
1
Where can I find this option on IIS 6?
– nandarya
Apr 6 '09 at 9:48
2
Verify that virtual folder in IIS6 is a web application
– Konstantin Tarkus
Apr 6 '09 at 9:53
2
Have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:04
4
Yes, now it works! I missunderstood you before and solved the problem making the subfolder to a virtual app. Thanks a lot!
– nandarya
Apr 6 '09 at 11:27
3
In my case it turned out that project output was out of web site folder (fixed by changing output folder to 'bin')
– Pavel Shkleinik
Dec 4 '13 at 19:09
|
show 10 more comments
Option One:
This message is often due to an IIS 7 config problem. If you are used to creating a virtual directory pointing to the folder where your service resides, that no longer works. Now, you need to use the "Create Application..." option instead.
Other Options:
WCF: The type provided as the Service attribute could not be found- The type , provided as the Service attribute value in the ServiceHost directive could not be found.
1
Where can I find this option on IIS 6?
– nandarya
Apr 6 '09 at 9:48
2
Verify that virtual folder in IIS6 is a web application
– Konstantin Tarkus
Apr 6 '09 at 9:53
2
Have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:04
4
Yes, now it works! I missunderstood you before and solved the problem making the subfolder to a virtual app. Thanks a lot!
– nandarya
Apr 6 '09 at 11:27
3
In my case it turned out that project output was out of web site folder (fixed by changing output folder to 'bin')
– Pavel Shkleinik
Dec 4 '13 at 19:09
|
show 10 more comments
Option One:
This message is often due to an IIS 7 config problem. If you are used to creating a virtual directory pointing to the folder where your service resides, that no longer works. Now, you need to use the "Create Application..." option instead.
Other Options:
WCF: The type provided as the Service attribute could not be found- The type , provided as the Service attribute value in the ServiceHost directive could not be found.
Option One:
This message is often due to an IIS 7 config problem. If you are used to creating a virtual directory pointing to the folder where your service resides, that no longer works. Now, you need to use the "Create Application..." option instead.
Other Options:
WCF: The type provided as the Service attribute could not be found- The type , provided as the Service attribute value in the ServiceHost directive could not be found.
edited Apr 6 '09 at 9:52
answered Apr 6 '09 at 9:47
Konstantin Tarkus
30.1k13115107
30.1k13115107
1
Where can I find this option on IIS 6?
– nandarya
Apr 6 '09 at 9:48
2
Verify that virtual folder in IIS6 is a web application
– Konstantin Tarkus
Apr 6 '09 at 9:53
2
Have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:04
4
Yes, now it works! I missunderstood you before and solved the problem making the subfolder to a virtual app. Thanks a lot!
– nandarya
Apr 6 '09 at 11:27
3
In my case it turned out that project output was out of web site folder (fixed by changing output folder to 'bin')
– Pavel Shkleinik
Dec 4 '13 at 19:09
|
show 10 more comments
1
Where can I find this option on IIS 6?
– nandarya
Apr 6 '09 at 9:48
2
Verify that virtual folder in IIS6 is a web application
– Konstantin Tarkus
Apr 6 '09 at 9:53
2
Have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:04
4
Yes, now it works! I missunderstood you before and solved the problem making the subfolder to a virtual app. Thanks a lot!
– nandarya
Apr 6 '09 at 11:27
3
In my case it turned out that project output was out of web site folder (fixed by changing output folder to 'bin')
– Pavel Shkleinik
Dec 4 '13 at 19:09
1
1
Where can I find this option on IIS 6?
– nandarya
Apr 6 '09 at 9:48
Where can I find this option on IIS 6?
– nandarya
Apr 6 '09 at 9:48
2
2
Verify that virtual folder in IIS6 is a web application
– Konstantin Tarkus
Apr 6 '09 at 9:53
Verify that virtual folder in IIS6 is a web application
– Konstantin Tarkus
Apr 6 '09 at 9:53
2
2
Have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:04
Have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:04
4
4
Yes, now it works! I missunderstood you before and solved the problem making the subfolder to a virtual app. Thanks a lot!
– nandarya
Apr 6 '09 at 11:27
Yes, now it works! I missunderstood you before and solved the problem making the subfolder to a virtual app. Thanks a lot!
– nandarya
Apr 6 '09 at 11:27
3
3
In my case it turned out that project output was out of web site folder (fixed by changing output folder to 'bin')
– Pavel Shkleinik
Dec 4 '13 at 19:09
In my case it turned out that project output was out of web site folder (fixed by changing output folder to 'bin')
– Pavel Shkleinik
Dec 4 '13 at 19:09
|
show 10 more comments
The problem could also be a in a different namespace in svc file as it is in svc.cs file.
In svc file namespace must be in the following format.
Service="Namespace.SvcClassName"
1
This is espcially common in VS Express which does not have refactoring support and the IDE does not easily display the content of the svc file.
– Chriseyre2000
Mar 11 '12 at 11:10
2
This was my exact problem. I went through my solution and seperated out the namespaces between the two projects within the solution and forgot to update the .svc reference.
– Nip
Jul 5 '12 at 18:38
2
You nailed it, most tuitorials on the web are placing a name space around the sample WCF service and interface and it needs to be brought to the service.svc page.
– htm11h
May 16 '14 at 18:54
2
This helped me. I changed my namespace but couldnt figure out how to open the service file (servicename.svc) in VS2010 Express. I ended up going to the file system and opening the file directly into notepad++ and editing it in there.
– Andrew MacNaughton
Nov 7 '14 at 19:13
add a comment |
The problem could also be a in a different namespace in svc file as it is in svc.cs file.
In svc file namespace must be in the following format.
Service="Namespace.SvcClassName"
1
This is espcially common in VS Express which does not have refactoring support and the IDE does not easily display the content of the svc file.
– Chriseyre2000
Mar 11 '12 at 11:10
2
This was my exact problem. I went through my solution and seperated out the namespaces between the two projects within the solution and forgot to update the .svc reference.
– Nip
Jul 5 '12 at 18:38
2
You nailed it, most tuitorials on the web are placing a name space around the sample WCF service and interface and it needs to be brought to the service.svc page.
– htm11h
May 16 '14 at 18:54
2
This helped me. I changed my namespace but couldnt figure out how to open the service file (servicename.svc) in VS2010 Express. I ended up going to the file system and opening the file directly into notepad++ and editing it in there.
– Andrew MacNaughton
Nov 7 '14 at 19:13
add a comment |
The problem could also be a in a different namespace in svc file as it is in svc.cs file.
In svc file namespace must be in the following format.
Service="Namespace.SvcClassName"
The problem could also be a in a different namespace in svc file as it is in svc.cs file.
In svc file namespace must be in the following format.
Service="Namespace.SvcClassName"
answered Nov 4 '09 at 20:56
Peter Stegnar
7,76285175
7,76285175
1
This is espcially common in VS Express which does not have refactoring support and the IDE does not easily display the content of the svc file.
– Chriseyre2000
Mar 11 '12 at 11:10
2
This was my exact problem. I went through my solution and seperated out the namespaces between the two projects within the solution and forgot to update the .svc reference.
– Nip
Jul 5 '12 at 18:38
2
You nailed it, most tuitorials on the web are placing a name space around the sample WCF service and interface and it needs to be brought to the service.svc page.
– htm11h
May 16 '14 at 18:54
2
This helped me. I changed my namespace but couldnt figure out how to open the service file (servicename.svc) in VS2010 Express. I ended up going to the file system and opening the file directly into notepad++ and editing it in there.
– Andrew MacNaughton
Nov 7 '14 at 19:13
add a comment |
1
This is espcially common in VS Express which does not have refactoring support and the IDE does not easily display the content of the svc file.
– Chriseyre2000
Mar 11 '12 at 11:10
2
This was my exact problem. I went through my solution and seperated out the namespaces between the two projects within the solution and forgot to update the .svc reference.
– Nip
Jul 5 '12 at 18:38
2
You nailed it, most tuitorials on the web are placing a name space around the sample WCF service and interface and it needs to be brought to the service.svc page.
– htm11h
May 16 '14 at 18:54
2
This helped me. I changed my namespace but couldnt figure out how to open the service file (servicename.svc) in VS2010 Express. I ended up going to the file system and opening the file directly into notepad++ and editing it in there.
– Andrew MacNaughton
Nov 7 '14 at 19:13
1
1
This is espcially common in VS Express which does not have refactoring support and the IDE does not easily display the content of the svc file.
– Chriseyre2000
Mar 11 '12 at 11:10
This is espcially common in VS Express which does not have refactoring support and the IDE does not easily display the content of the svc file.
– Chriseyre2000
Mar 11 '12 at 11:10
2
2
This was my exact problem. I went through my solution and seperated out the namespaces between the two projects within the solution and forgot to update the .svc reference.
– Nip
Jul 5 '12 at 18:38
This was my exact problem. I went through my solution and seperated out the namespaces between the two projects within the solution and forgot to update the .svc reference.
– Nip
Jul 5 '12 at 18:38
2
2
You nailed it, most tuitorials on the web are placing a name space around the sample WCF service and interface and it needs to be brought to the service.svc page.
– htm11h
May 16 '14 at 18:54
You nailed it, most tuitorials on the web are placing a name space around the sample WCF service and interface and it needs to be brought to the service.svc page.
– htm11h
May 16 '14 at 18:54
2
2
This helped me. I changed my namespace but couldnt figure out how to open the service file (servicename.svc) in VS2010 Express. I ended up going to the file system and opening the file directly into notepad++ and editing it in there.
– Andrew MacNaughton
Nov 7 '14 at 19:13
This helped me. I changed my namespace but couldnt figure out how to open the service file (servicename.svc) in VS2010 Express. I ended up going to the file system and opening the file directly into notepad++ and editing it in there.
– Andrew MacNaughton
Nov 7 '14 at 19:13
add a comment |
I know this is probably the "obvious" answer, but it tripped me up for a bit. Make sure there's a dll for the project in the bin folder. When the service was published, the guy who published it deleted the dlls because he thought they were in the GAC. The one specifically for the project (QS.DialogManager.Communication.IISHost.RecipientService.dll, in this case) wasn't there.
Same error for a VERY different reason.
This seems to make a difference for me - our project outputs its assembly elsewhere. Adding binDebug and copying the dll to it seemed to work.
– Tom W
Jun 27 '13 at 10:42
I was missing a third-party dll...
– Cosmin
Jul 25 '14 at 15:01
Thank you. I forgot to build my application after a branch and was wondering why IIS was throwing those errors. Man, don't i feel silly...
– Dudemanword
Sep 15 '14 at 19:12
add a comment |
I know this is probably the "obvious" answer, but it tripped me up for a bit. Make sure there's a dll for the project in the bin folder. When the service was published, the guy who published it deleted the dlls because he thought they were in the GAC. The one specifically for the project (QS.DialogManager.Communication.IISHost.RecipientService.dll, in this case) wasn't there.
Same error for a VERY different reason.
This seems to make a difference for me - our project outputs its assembly elsewhere. Adding binDebug and copying the dll to it seemed to work.
– Tom W
Jun 27 '13 at 10:42
I was missing a third-party dll...
– Cosmin
Jul 25 '14 at 15:01
Thank you. I forgot to build my application after a branch and was wondering why IIS was throwing those errors. Man, don't i feel silly...
– Dudemanword
Sep 15 '14 at 19:12
add a comment |
I know this is probably the "obvious" answer, but it tripped me up for a bit. Make sure there's a dll for the project in the bin folder. When the service was published, the guy who published it deleted the dlls because he thought they were in the GAC. The one specifically for the project (QS.DialogManager.Communication.IISHost.RecipientService.dll, in this case) wasn't there.
Same error for a VERY different reason.
I know this is probably the "obvious" answer, but it tripped me up for a bit. Make sure there's a dll for the project in the bin folder. When the service was published, the guy who published it deleted the dlls because he thought they were in the GAC. The one specifically for the project (QS.DialogManager.Communication.IISHost.RecipientService.dll, in this case) wasn't there.
Same error for a VERY different reason.
answered Jan 15 '10 at 21:16
baileyrt
566613
566613
This seems to make a difference for me - our project outputs its assembly elsewhere. Adding binDebug and copying the dll to it seemed to work.
– Tom W
Jun 27 '13 at 10:42
I was missing a third-party dll...
– Cosmin
Jul 25 '14 at 15:01
Thank you. I forgot to build my application after a branch and was wondering why IIS was throwing those errors. Man, don't i feel silly...
– Dudemanword
Sep 15 '14 at 19:12
add a comment |
This seems to make a difference for me - our project outputs its assembly elsewhere. Adding binDebug and copying the dll to it seemed to work.
– Tom W
Jun 27 '13 at 10:42
I was missing a third-party dll...
– Cosmin
Jul 25 '14 at 15:01
Thank you. I forgot to build my application after a branch and was wondering why IIS was throwing those errors. Man, don't i feel silly...
– Dudemanword
Sep 15 '14 at 19:12
This seems to make a difference for me - our project outputs its assembly elsewhere. Adding binDebug and copying the dll to it seemed to work.
– Tom W
Jun 27 '13 at 10:42
This seems to make a difference for me - our project outputs its assembly elsewhere. Adding binDebug and copying the dll to it seemed to work.
– Tom W
Jun 27 '13 at 10:42
I was missing a third-party dll...
– Cosmin
Jul 25 '14 at 15:01
I was missing a third-party dll...
– Cosmin
Jul 25 '14 at 15:01
Thank you. I forgot to build my application after a branch and was wondering why IIS was throwing those errors. Man, don't i feel silly...
– Dudemanword
Sep 15 '14 at 19:12
Thank you. I forgot to build my application after a branch and was wondering why IIS was throwing those errors. Man, don't i feel silly...
– Dudemanword
Sep 15 '14 at 19:12
add a comment |
This error occurs due to mismatch of Service name in .SVC file. Probably you might have changed the name of the service class that is implementing the interface.The Solution is to open .SVC file and exactly match the Service attribute and CodeBehind Attribute. So your .SVC file should be like
<%@ ServiceHost Language="Language you are using" Debug="bool value to enable debugging" Service="Service class name that is implementing your Service interface" Codebehind="~/Appcode/Class implementing interface.cs"%>. for eg.
<%@ ServiceHost Language="C#" Debug="true" Service="Product.Service" CodeBehind=~/AppCode/Product.Service.cs"%>
This example is for .svc file that is using C# language, with debugging enabled, Service class implementing interface and this class is within app folder with name Service.cs and Product is namespace for Service class.
Also Please make respective change in service config file.
<system.serviceModel>
<services>
<service name="Product.Service" behaviorConfiguration="ServiceBehavior">
<endpoint address="" binding="wsHttpBinding" contract="Product.Iservice">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<behavior name="ServiceBehavior">
<serviceMetaData httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</behaviors>
</system.serviceModel>
1
This was my problem, I later moved my .svc file into "Client" subfolder. Service directive inside .svc file was missing this new folder/namespace:Service="MyServicesProxy.Client.OpenClientService"
– Iztoksson
Mar 9 '16 at 11:13
Exactly. Thanks
– Bhuwan Pandey
Jul 6 '17 at 7:52
Just note also that the service name is case-sensitive! As a vb.net developer, that tricked me!
– J.Hudler
Aug 9 '17 at 20:17
add a comment |
This error occurs due to mismatch of Service name in .SVC file. Probably you might have changed the name of the service class that is implementing the interface.The Solution is to open .SVC file and exactly match the Service attribute and CodeBehind Attribute. So your .SVC file should be like
<%@ ServiceHost Language="Language you are using" Debug="bool value to enable debugging" Service="Service class name that is implementing your Service interface" Codebehind="~/Appcode/Class implementing interface.cs"%>. for eg.
<%@ ServiceHost Language="C#" Debug="true" Service="Product.Service" CodeBehind=~/AppCode/Product.Service.cs"%>
This example is for .svc file that is using C# language, with debugging enabled, Service class implementing interface and this class is within app folder with name Service.cs and Product is namespace for Service class.
Also Please make respective change in service config file.
<system.serviceModel>
<services>
<service name="Product.Service" behaviorConfiguration="ServiceBehavior">
<endpoint address="" binding="wsHttpBinding" contract="Product.Iservice">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<behavior name="ServiceBehavior">
<serviceMetaData httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</behaviors>
</system.serviceModel>
1
This was my problem, I later moved my .svc file into "Client" subfolder. Service directive inside .svc file was missing this new folder/namespace:Service="MyServicesProxy.Client.OpenClientService"
– Iztoksson
Mar 9 '16 at 11:13
Exactly. Thanks
– Bhuwan Pandey
Jul 6 '17 at 7:52
Just note also that the service name is case-sensitive! As a vb.net developer, that tricked me!
– J.Hudler
Aug 9 '17 at 20:17
add a comment |
This error occurs due to mismatch of Service name in .SVC file. Probably you might have changed the name of the service class that is implementing the interface.The Solution is to open .SVC file and exactly match the Service attribute and CodeBehind Attribute. So your .SVC file should be like
<%@ ServiceHost Language="Language you are using" Debug="bool value to enable debugging" Service="Service class name that is implementing your Service interface" Codebehind="~/Appcode/Class implementing interface.cs"%>. for eg.
<%@ ServiceHost Language="C#" Debug="true" Service="Product.Service" CodeBehind=~/AppCode/Product.Service.cs"%>
This example is for .svc file that is using C# language, with debugging enabled, Service class implementing interface and this class is within app folder with name Service.cs and Product is namespace for Service class.
Also Please make respective change in service config file.
<system.serviceModel>
<services>
<service name="Product.Service" behaviorConfiguration="ServiceBehavior">
<endpoint address="" binding="wsHttpBinding" contract="Product.Iservice">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<behavior name="ServiceBehavior">
<serviceMetaData httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</behaviors>
</system.serviceModel>
This error occurs due to mismatch of Service name in .SVC file. Probably you might have changed the name of the service class that is implementing the interface.The Solution is to open .SVC file and exactly match the Service attribute and CodeBehind Attribute. So your .SVC file should be like
<%@ ServiceHost Language="Language you are using" Debug="bool value to enable debugging" Service="Service class name that is implementing your Service interface" Codebehind="~/Appcode/Class implementing interface.cs"%>. for eg.
<%@ ServiceHost Language="C#" Debug="true" Service="Product.Service" CodeBehind=~/AppCode/Product.Service.cs"%>
This example is for .svc file that is using C# language, with debugging enabled, Service class implementing interface and this class is within app folder with name Service.cs and Product is namespace for Service class.
Also Please make respective change in service config file.
<system.serviceModel>
<services>
<service name="Product.Service" behaviorConfiguration="ServiceBehavior">
<endpoint address="" binding="wsHttpBinding" contract="Product.Iservice">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<behavior name="ServiceBehavior">
<serviceMetaData httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</behaviors>
</system.serviceModel>
edited May 5 '14 at 19:58
Murtaza Mandvi
4,331196294
4,331196294
answered Apr 7 '13 at 5:00
Chandra Malla
2,0591411
2,0591411
1
This was my problem, I later moved my .svc file into "Client" subfolder. Service directive inside .svc file was missing this new folder/namespace:Service="MyServicesProxy.Client.OpenClientService"
– Iztoksson
Mar 9 '16 at 11:13
Exactly. Thanks
– Bhuwan Pandey
Jul 6 '17 at 7:52
Just note also that the service name is case-sensitive! As a vb.net developer, that tricked me!
– J.Hudler
Aug 9 '17 at 20:17
add a comment |
1
This was my problem, I later moved my .svc file into "Client" subfolder. Service directive inside .svc file was missing this new folder/namespace:Service="MyServicesProxy.Client.OpenClientService"
– Iztoksson
Mar 9 '16 at 11:13
Exactly. Thanks
– Bhuwan Pandey
Jul 6 '17 at 7:52
Just note also that the service name is case-sensitive! As a vb.net developer, that tricked me!
– J.Hudler
Aug 9 '17 at 20:17
1
1
This was my problem, I later moved my .svc file into "Client" subfolder. Service directive inside .svc file was missing this new folder/namespace:
Service="MyServicesProxy.Client.OpenClientService"
– Iztoksson
Mar 9 '16 at 11:13
This was my problem, I later moved my .svc file into "Client" subfolder. Service directive inside .svc file was missing this new folder/namespace:
Service="MyServicesProxy.Client.OpenClientService"
– Iztoksson
Mar 9 '16 at 11:13
Exactly. Thanks
– Bhuwan Pandey
Jul 6 '17 at 7:52
Exactly. Thanks
– Bhuwan Pandey
Jul 6 '17 at 7:52
Just note also that the service name is case-sensitive! As a vb.net developer, that tricked me!
– J.Hudler
Aug 9 '17 at 20:17
Just note also that the service name is case-sensitive! As a vb.net developer, that tricked me!
– J.Hudler
Aug 9 '17 at 20:17
add a comment |
Double check that you're referencing the correct type from the ServiceHost directive in the .svc file. Here's how...
- In the VS project containing your web service, open the .svc file in the XML editor (right-click the file, Open With..., choose XML (Text) Editor, OK).
- Note the "Service" attribute value.
- Make sure it matches the fully qualified type name of your service. This includes the namespace + type name. For example, if the namespace is "MyCompany.Department.Services" and the class is called "MyService", then the Service attribute value should be "MyCompany.Department.Services.MyService".
You should open SVC files in the Web Service Editor (the default) because the XML editor will give you XML validation errors.
– DanM7
Jun 5 '15 at 17:29
add a comment |
Double check that you're referencing the correct type from the ServiceHost directive in the .svc file. Here's how...
- In the VS project containing your web service, open the .svc file in the XML editor (right-click the file, Open With..., choose XML (Text) Editor, OK).
- Note the "Service" attribute value.
- Make sure it matches the fully qualified type name of your service. This includes the namespace + type name. For example, if the namespace is "MyCompany.Department.Services" and the class is called "MyService", then the Service attribute value should be "MyCompany.Department.Services.MyService".
You should open SVC files in the Web Service Editor (the default) because the XML editor will give you XML validation errors.
– DanM7
Jun 5 '15 at 17:29
add a comment |
Double check that you're referencing the correct type from the ServiceHost directive in the .svc file. Here's how...
- In the VS project containing your web service, open the .svc file in the XML editor (right-click the file, Open With..., choose XML (Text) Editor, OK).
- Note the "Service" attribute value.
- Make sure it matches the fully qualified type name of your service. This includes the namespace + type name. For example, if the namespace is "MyCompany.Department.Services" and the class is called "MyService", then the Service attribute value should be "MyCompany.Department.Services.MyService".
Double check that you're referencing the correct type from the ServiceHost directive in the .svc file. Here's how...
- In the VS project containing your web service, open the .svc file in the XML editor (right-click the file, Open With..., choose XML (Text) Editor, OK).
- Note the "Service" attribute value.
- Make sure it matches the fully qualified type name of your service. This includes the namespace + type name. For example, if the namespace is "MyCompany.Department.Services" and the class is called "MyService", then the Service attribute value should be "MyCompany.Department.Services.MyService".
answered Jan 5 '11 at 21:13
charlie249
9111
9111
You should open SVC files in the Web Service Editor (the default) because the XML editor will give you XML validation errors.
– DanM7
Jun 5 '15 at 17:29
add a comment |
You should open SVC files in the Web Service Editor (the default) because the XML editor will give you XML validation errors.
– DanM7
Jun 5 '15 at 17:29
You should open SVC files in the Web Service Editor (the default) because the XML editor will give you XML validation errors.
– DanM7
Jun 5 '15 at 17:29
You should open SVC files in the Web Service Editor (the default) because the XML editor will give you XML validation errors.
– DanM7
Jun 5 '15 at 17:29
add a comment |
I had the same Exception, this is due to the Type not correctly mentioned in the .svc file
I corrected with below fix.
if your .svc.cs has class like this
namespace Azh.Services.MyApp
{
public class WcfApp : FI.IWcfAppService
{
...
}
}
for this the .svc file should look like this
<%@ ServiceHost Language="C#" Debug="true" Service="Azh.Services.MyApp.WcfApp" CodeBehind="WcfApp.svc.cs" %>
Life saver! I had renamed my service project and namespace but this hadn't been updated.
– arviman
Aug 15 '15 at 14:36
add a comment |
I had the same Exception, this is due to the Type not correctly mentioned in the .svc file
I corrected with below fix.
if your .svc.cs has class like this
namespace Azh.Services.MyApp
{
public class WcfApp : FI.IWcfAppService
{
...
}
}
for this the .svc file should look like this
<%@ ServiceHost Language="C#" Debug="true" Service="Azh.Services.MyApp.WcfApp" CodeBehind="WcfApp.svc.cs" %>
Life saver! I had renamed my service project and namespace but this hadn't been updated.
– arviman
Aug 15 '15 at 14:36
add a comment |
I had the same Exception, this is due to the Type not correctly mentioned in the .svc file
I corrected with below fix.
if your .svc.cs has class like this
namespace Azh.Services.MyApp
{
public class WcfApp : FI.IWcfAppService
{
...
}
}
for this the .svc file should look like this
<%@ ServiceHost Language="C#" Debug="true" Service="Azh.Services.MyApp.WcfApp" CodeBehind="WcfApp.svc.cs" %>
I had the same Exception, this is due to the Type not correctly mentioned in the .svc file
I corrected with below fix.
if your .svc.cs has class like this
namespace Azh.Services.MyApp
{
public class WcfApp : FI.IWcfAppService
{
...
}
}
for this the .svc file should look like this
<%@ ServiceHost Language="C#" Debug="true" Service="Azh.Services.MyApp.WcfApp" CodeBehind="WcfApp.svc.cs" %>
answered Jan 12 '11 at 18:37
zahirhas
19126
19126
Life saver! I had renamed my service project and namespace but this hadn't been updated.
– arviman
Aug 15 '15 at 14:36
add a comment |
Life saver! I had renamed my service project and namespace but this hadn't been updated.
– arviman
Aug 15 '15 at 14:36
Life saver! I had renamed my service project and namespace but this hadn't been updated.
– arviman
Aug 15 '15 at 14:36
Life saver! I had renamed my service project and namespace but this hadn't been updated.
– arviman
Aug 15 '15 at 14:36
add a comment |
You should configure your bin folder path to service local bin.
1
Indeed, copying the DLL to a folder in the same path as svc file worked.C:FolderSVC_ServiceFolderbin
. I had to remove some duplicate config tags.
– Junior M
Oct 14 '11 at 19:50
add a comment |
You should configure your bin folder path to service local bin.
1
Indeed, copying the DLL to a folder in the same path as svc file worked.C:FolderSVC_ServiceFolderbin
. I had to remove some duplicate config tags.
– Junior M
Oct 14 '11 at 19:50
add a comment |
You should configure your bin folder path to service local bin.
You should configure your bin folder path to service local bin.
answered Mar 1 '10 at 13:13
Kishor
411
411
1
Indeed, copying the DLL to a folder in the same path as svc file worked.C:FolderSVC_ServiceFolderbin
. I had to remove some duplicate config tags.
– Junior M
Oct 14 '11 at 19:50
add a comment |
1
Indeed, copying the DLL to a folder in the same path as svc file worked.C:FolderSVC_ServiceFolderbin
. I had to remove some duplicate config tags.
– Junior M
Oct 14 '11 at 19:50
1
1
Indeed, copying the DLL to a folder in the same path as svc file worked.
C:FolderSVC_ServiceFolderbin
. I had to remove some duplicate config tags.– Junior M
Oct 14 '11 at 19:50
Indeed, copying the DLL to a folder in the same path as svc file worked.
C:FolderSVC_ServiceFolderbin
. I had to remove some duplicate config tags.– Junior M
Oct 14 '11 at 19:50
add a comment |
I practically solved the same issue . Here is my suggestion -- The error means that the object referenced in the Service attribute is not found. For the object to be found, the application or library must build output to the bin folder.
You can edit property page of the application and specify the output path to 'bin'.
Yes, my project properties had "binDebug" for output path - changed it to just "bin". Might be related to the fact that this was a very old project file now used in VS2017.
– joanygaard
Dec 6 '17 at 12:00
add a comment |
I practically solved the same issue . Here is my suggestion -- The error means that the object referenced in the Service attribute is not found. For the object to be found, the application or library must build output to the bin folder.
You can edit property page of the application and specify the output path to 'bin'.
Yes, my project properties had "binDebug" for output path - changed it to just "bin". Might be related to the fact that this was a very old project file now used in VS2017.
– joanygaard
Dec 6 '17 at 12:00
add a comment |
I practically solved the same issue . Here is my suggestion -- The error means that the object referenced in the Service attribute is not found. For the object to be found, the application or library must build output to the bin folder.
You can edit property page of the application and specify the output path to 'bin'.
I practically solved the same issue . Here is my suggestion -- The error means that the object referenced in the Service attribute is not found. For the object to be found, the application or library must build output to the bin folder.
You can edit property page of the application and specify the output path to 'bin'.
answered Oct 19 '10 at 21:57
Dayakumar
211
211
Yes, my project properties had "binDebug" for output path - changed it to just "bin". Might be related to the fact that this was a very old project file now used in VS2017.
– joanygaard
Dec 6 '17 at 12:00
add a comment |
Yes, my project properties had "binDebug" for output path - changed it to just "bin". Might be related to the fact that this was a very old project file now used in VS2017.
– joanygaard
Dec 6 '17 at 12:00
Yes, my project properties had "binDebug" for output path - changed it to just "bin". Might be related to the fact that this was a very old project file now used in VS2017.
– joanygaard
Dec 6 '17 at 12:00
Yes, my project properties had "binDebug" for output path - changed it to just "bin". Might be related to the fact that this was a very old project file now used in VS2017.
– joanygaard
Dec 6 '17 at 12:00
add a comment |
If you have renamed anything verify the (Properties/) AssemblyInfo.cs
is correct, as well as the header in the service file.
ServiceName.svc
<%@ ServiceHost Language="C#" Debug="true" Service="Company.Namespace.WcfApp" CodeBehind="WcfApp.svc.cs" %>
Aligning with your namespace in your Service.svc.cs
add a comment |
If you have renamed anything verify the (Properties/) AssemblyInfo.cs
is correct, as well as the header in the service file.
ServiceName.svc
<%@ ServiceHost Language="C#" Debug="true" Service="Company.Namespace.WcfApp" CodeBehind="WcfApp.svc.cs" %>
Aligning with your namespace in your Service.svc.cs
add a comment |
If you have renamed anything verify the (Properties/) AssemblyInfo.cs
is correct, as well as the header in the service file.
ServiceName.svc
<%@ ServiceHost Language="C#" Debug="true" Service="Company.Namespace.WcfApp" CodeBehind="WcfApp.svc.cs" %>
Aligning with your namespace in your Service.svc.cs
If you have renamed anything verify the (Properties/) AssemblyInfo.cs
is correct, as well as the header in the service file.
ServiceName.svc
<%@ ServiceHost Language="C#" Debug="true" Service="Company.Namespace.WcfApp" CodeBehind="WcfApp.svc.cs" %>
Aligning with your namespace in your Service.svc.cs
answered Oct 23 '12 at 8:18
lko
5,35073050
5,35073050
add a comment |
add a comment |
Two keys to this for certain flavors of the ' Service attribute value in the ServiceHost directive could not be found'-problem: (1) If you're working in Silverlight, you should use the Silverlight WCF-Enabled Service, not the non-Silverlight WCF Service; this will update Web.Config for the bindings and allow the type to be visible; (2) Match the class name in the new service to the Service name -- the goal here is to make a wsdl... so that you know the service's functionality is exposed to your Silverlight client and to the Web; it helps to have the service match the class. If you get the names gummed up, you will have to edit the Web.Config in 3 places (serviceBehaviors, services and bindings).
There were so many sincere attempts to help folks with this problem that were not helpful to me that it should be stressed that this write-up is for a Silverlight solution and it may not apply for someone not using Silverlight 3 in a client/Web configuration.
Hope it helps.
add a comment |
Two keys to this for certain flavors of the ' Service attribute value in the ServiceHost directive could not be found'-problem: (1) If you're working in Silverlight, you should use the Silverlight WCF-Enabled Service, not the non-Silverlight WCF Service; this will update Web.Config for the bindings and allow the type to be visible; (2) Match the class name in the new service to the Service name -- the goal here is to make a wsdl... so that you know the service's functionality is exposed to your Silverlight client and to the Web; it helps to have the service match the class. If you get the names gummed up, you will have to edit the Web.Config in 3 places (serviceBehaviors, services and bindings).
There were so many sincere attempts to help folks with this problem that were not helpful to me that it should be stressed that this write-up is for a Silverlight solution and it may not apply for someone not using Silverlight 3 in a client/Web configuration.
Hope it helps.
add a comment |
Two keys to this for certain flavors of the ' Service attribute value in the ServiceHost directive could not be found'-problem: (1) If you're working in Silverlight, you should use the Silverlight WCF-Enabled Service, not the non-Silverlight WCF Service; this will update Web.Config for the bindings and allow the type to be visible; (2) Match the class name in the new service to the Service name -- the goal here is to make a wsdl... so that you know the service's functionality is exposed to your Silverlight client and to the Web; it helps to have the service match the class. If you get the names gummed up, you will have to edit the Web.Config in 3 places (serviceBehaviors, services and bindings).
There were so many sincere attempts to help folks with this problem that were not helpful to me that it should be stressed that this write-up is for a Silverlight solution and it may not apply for someone not using Silverlight 3 in a client/Web configuration.
Hope it helps.
Two keys to this for certain flavors of the ' Service attribute value in the ServiceHost directive could not be found'-problem: (1) If you're working in Silverlight, you should use the Silverlight WCF-Enabled Service, not the non-Silverlight WCF Service; this will update Web.Config for the bindings and allow the type to be visible; (2) Match the class name in the new service to the Service name -- the goal here is to make a wsdl... so that you know the service's functionality is exposed to your Silverlight client and to the Web; it helps to have the service match the class. If you get the names gummed up, you will have to edit the Web.Config in 3 places (serviceBehaviors, services and bindings).
There were so many sincere attempts to help folks with this problem that were not helpful to me that it should be stressed that this write-up is for a Silverlight solution and it may not apply for someone not using Silverlight 3 in a client/Web configuration.
Hope it helps.
answered Dec 23 '09 at 6:01
kgoldfisher
111
111
add a comment |
add a comment |
I had the same problem but no clue what caused it. I Solved it by changing from Debug to Release and Run using Debug/Start New Instance. After that, it ran in both Release and Debug. It was magic...
This happens to be when I have a Web UI and and Web Service project in the same solution. The Web Service does not compile if its not understood as a dependency for the Web UI.
– StingyJack
Mar 30 '16 at 17:38
add a comment |
I had the same problem but no clue what caused it. I Solved it by changing from Debug to Release and Run using Debug/Start New Instance. After that, it ran in both Release and Debug. It was magic...
This happens to be when I have a Web UI and and Web Service project in the same solution. The Web Service does not compile if its not understood as a dependency for the Web UI.
– StingyJack
Mar 30 '16 at 17:38
add a comment |
I had the same problem but no clue what caused it. I Solved it by changing from Debug to Release and Run using Debug/Start New Instance. After that, it ran in both Release and Debug. It was magic...
I had the same problem but no clue what caused it. I Solved it by changing from Debug to Release and Run using Debug/Start New Instance. After that, it ran in both Release and Debug. It was magic...
answered May 24 '10 at 20:44
Clayton
111
111
This happens to be when I have a Web UI and and Web Service project in the same solution. The Web Service does not compile if its not understood as a dependency for the Web UI.
– StingyJack
Mar 30 '16 at 17:38
add a comment |
This happens to be when I have a Web UI and and Web Service project in the same solution. The Web Service does not compile if its not understood as a dependency for the Web UI.
– StingyJack
Mar 30 '16 at 17:38
This happens to be when I have a Web UI and and Web Service project in the same solution. The Web Service does not compile if its not understood as a dependency for the Web UI.
– StingyJack
Mar 30 '16 at 17:38
This happens to be when I have a Web UI and and Web Service project in the same solution. The Web Service does not compile if its not understood as a dependency for the Web UI.
– StingyJack
Mar 30 '16 at 17:38
add a comment |
I also ran into this issue trying the Microsoft.ServiceModel.Samples.Calculator WCF sample. I am using IIS 5.1. I resolved it by ensuring that the website that was auto-generated (servicemodelsamples) was not an application. Right-click the folder, click "Properties" and click the "Create" button.
add a comment |
I also ran into this issue trying the Microsoft.ServiceModel.Samples.Calculator WCF sample. I am using IIS 5.1. I resolved it by ensuring that the website that was auto-generated (servicemodelsamples) was not an application. Right-click the folder, click "Properties" and click the "Create" button.
add a comment |
I also ran into this issue trying the Microsoft.ServiceModel.Samples.Calculator WCF sample. I am using IIS 5.1. I resolved it by ensuring that the website that was auto-generated (servicemodelsamples) was not an application. Right-click the folder, click "Properties" and click the "Create" button.
I also ran into this issue trying the Microsoft.ServiceModel.Samples.Calculator WCF sample. I am using IIS 5.1. I resolved it by ensuring that the website that was auto-generated (servicemodelsamples) was not an application. Right-click the folder, click "Properties" and click the "Create" button.
answered Oct 20 '10 at 2:14
amgray789
185
185
add a comment |
add a comment |
I had this problem - my service type was in the GAC. It WOULD work if i added the dll containing the type to the bin folder but as it was in the GAC this was NOT what I wanted. I eventually added this to the web.config for the service
<system.web>
<customErrors mode="RemoteOnly" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="[name in GAC], Version=[version in GAC], Culture=neutral, PublicKeyToken=[ac token]" />
</assemblies>
</compilation>
</system.web>
and it worked without needing any dlls in the bin folder.
add a comment |
I had this problem - my service type was in the GAC. It WOULD work if i added the dll containing the type to the bin folder but as it was in the GAC this was NOT what I wanted. I eventually added this to the web.config for the service
<system.web>
<customErrors mode="RemoteOnly" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="[name in GAC], Version=[version in GAC], Culture=neutral, PublicKeyToken=[ac token]" />
</assemblies>
</compilation>
</system.web>
and it worked without needing any dlls in the bin folder.
add a comment |
I had this problem - my service type was in the GAC. It WOULD work if i added the dll containing the type to the bin folder but as it was in the GAC this was NOT what I wanted. I eventually added this to the web.config for the service
<system.web>
<customErrors mode="RemoteOnly" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="[name in GAC], Version=[version in GAC], Culture=neutral, PublicKeyToken=[ac token]" />
</assemblies>
</compilation>
</system.web>
and it worked without needing any dlls in the bin folder.
I had this problem - my service type was in the GAC. It WOULD work if i added the dll containing the type to the bin folder but as it was in the GAC this was NOT what I wanted. I eventually added this to the web.config for the service
<system.web>
<customErrors mode="RemoteOnly" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="[name in GAC], Version=[version in GAC], Culture=neutral, PublicKeyToken=[ac token]" />
</assemblies>
</compilation>
</system.web>
and it worked without needing any dlls in the bin folder.
edited Sep 18 '11 at 22:56
LPL
14.3k53267
14.3k53267
answered Aug 12 '10 at 12:53
Jason9364
111
111
add a comment |
add a comment |
I had my service dll's in the bin folder where the svc file was residing. Moving the dll's to the root bin folder solved the problem.
add a comment |
I had my service dll's in the bin folder where the svc file was residing. Moving the dll's to the root bin folder solved the problem.
add a comment |
I had my service dll's in the bin folder where the svc file was residing. Moving the dll's to the root bin folder solved the problem.
I had my service dll's in the bin folder where the svc file was residing. Moving the dll's to the root bin folder solved the problem.
answered Aug 13 '15 at 12:39
Mikayil Abdullayev
6,7022181162
6,7022181162
add a comment |
add a comment |
In my case Right Click on Virtual Directory and Select "Convert To Application" worked!
1
Worked for me, thanks to Atul, sounds like thats the solution for most of the requesters here!
– Erdinc Ay
Sep 7 '17 at 13:37
add a comment |
In my case Right Click on Virtual Directory and Select "Convert To Application" worked!
1
Worked for me, thanks to Atul, sounds like thats the solution for most of the requesters here!
– Erdinc Ay
Sep 7 '17 at 13:37
add a comment |
In my case Right Click on Virtual Directory and Select "Convert To Application" worked!
In my case Right Click on Virtual Directory and Select "Convert To Application" worked!
answered Jul 14 '16 at 14:35
Atul K.
7112
7112
1
Worked for me, thanks to Atul, sounds like thats the solution for most of the requesters here!
– Erdinc Ay
Sep 7 '17 at 13:37
add a comment |
1
Worked for me, thanks to Atul, sounds like thats the solution for most of the requesters here!
– Erdinc Ay
Sep 7 '17 at 13:37
1
1
Worked for me, thanks to Atul, sounds like thats the solution for most of the requesters here!
– Erdinc Ay
Sep 7 '17 at 13:37
Worked for me, thanks to Atul, sounds like thats the solution for most of the requesters here!
– Erdinc Ay
Sep 7 '17 at 13:37
add a comment |
I faced with this error today, reason was; IIS user doesn't have permission to reach to the application folder. I gave the read permissions to the app root folder.
add a comment |
I faced with this error today, reason was; IIS user doesn't have permission to reach to the application folder. I gave the read permissions to the app root folder.
add a comment |
I faced with this error today, reason was; IIS user doesn't have permission to reach to the application folder. I gave the read permissions to the app root folder.
I faced with this error today, reason was; IIS user doesn't have permission to reach to the application folder. I gave the read permissions to the app root folder.
answered Oct 12 '16 at 9:08
Fatih Çelik
208312
208312
add a comment |
add a comment |
This may sound trivial, but worth mentioning:
You have to build the service (in Visual Studio) - then a DLL will be created in the
bin subfolder.
When the service is "deployed" on a server - that bin folder needs to have that DLL file in it - otherwise this error will be thrown...
add a comment |
This may sound trivial, but worth mentioning:
You have to build the service (in Visual Studio) - then a DLL will be created in the
bin subfolder.
When the service is "deployed" on a server - that bin folder needs to have that DLL file in it - otherwise this error will be thrown...
add a comment |
This may sound trivial, but worth mentioning:
You have to build the service (in Visual Studio) - then a DLL will be created in the
bin subfolder.
When the service is "deployed" on a server - that bin folder needs to have that DLL file in it - otherwise this error will be thrown...
This may sound trivial, but worth mentioning:
You have to build the service (in Visual Studio) - then a DLL will be created in the
bin subfolder.
When the service is "deployed" on a server - that bin folder needs to have that DLL file in it - otherwise this error will be thrown...
edited Jul 18 '17 at 15:05
answered Sep 22 '11 at 15:36
Yuval A.
2,71263751
2,71263751
add a comment |
add a comment |
Add reference of service in your service or copy dll.
1
Good answers expand on their points to a reasonable extent - maybe you could add in some extra information? For example, how do you do this? Why should you do this?
– Swadq
Dec 11 '12 at 22:49
@Swadq Good answers actually answer the question which this does not; adding a web reference is different from creating a service which is what this question is. You add the reference to the service after the service is created and accessible.
– Richard Barker
Sep 11 '15 at 17:40
add a comment |
Add reference of service in your service or copy dll.
1
Good answers expand on their points to a reasonable extent - maybe you could add in some extra information? For example, how do you do this? Why should you do this?
– Swadq
Dec 11 '12 at 22:49
@Swadq Good answers actually answer the question which this does not; adding a web reference is different from creating a service which is what this question is. You add the reference to the service after the service is created and accessible.
– Richard Barker
Sep 11 '15 at 17:40
add a comment |
Add reference of service in your service or copy dll.
Add reference of service in your service or copy dll.
answered Sep 20 '10 at 15:22
JDP
21
21
1
Good answers expand on their points to a reasonable extent - maybe you could add in some extra information? For example, how do you do this? Why should you do this?
– Swadq
Dec 11 '12 at 22:49
@Swadq Good answers actually answer the question which this does not; adding a web reference is different from creating a service which is what this question is. You add the reference to the service after the service is created and accessible.
– Richard Barker
Sep 11 '15 at 17:40
add a comment |
1
Good answers expand on their points to a reasonable extent - maybe you could add in some extra information? For example, how do you do this? Why should you do this?
– Swadq
Dec 11 '12 at 22:49
@Swadq Good answers actually answer the question which this does not; adding a web reference is different from creating a service which is what this question is. You add the reference to the service after the service is created and accessible.
– Richard Barker
Sep 11 '15 at 17:40
1
1
Good answers expand on their points to a reasonable extent - maybe you could add in some extra information? For example, how do you do this? Why should you do this?
– Swadq
Dec 11 '12 at 22:49
Good answers expand on their points to a reasonable extent - maybe you could add in some extra information? For example, how do you do this? Why should you do this?
– Swadq
Dec 11 '12 at 22:49
@Swadq Good answers actually answer the question which this does not; adding a web reference is different from creating a service which is what this question is. You add the reference to the service after the service is created and accessible.
– Richard Barker
Sep 11 '15 at 17:40
@Swadq Good answers actually answer the question which this does not; adding a web reference is different from creating a service which is what this question is. You add the reference to the service after the service is created and accessible.
– Richard Barker
Sep 11 '15 at 17:40
add a comment |
Building the solution before adding the service reference solved my problem.
add a comment |
Building the solution before adding the service reference solved my problem.
add a comment |
Building the solution before adding the service reference solved my problem.
Building the solution before adding the service reference solved my problem.
answered Jul 6 '11 at 23:17
Ratan
4584824
4584824
add a comment |
add a comment |
I got this error when trying to add the Service reference for the first Silverlight enabled WCF in the same solution. I just build the .Web project and it started working..
add a comment |
I got this error when trying to add the Service reference for the first Silverlight enabled WCF in the same solution. I just build the .Web project and it started working..
add a comment |
I got this error when trying to add the Service reference for the first Silverlight enabled WCF in the same solution. I just build the .Web project and it started working..
I got this error when trying to add the Service reference for the first Silverlight enabled WCF in the same solution. I just build the .Web project and it started working..
answered Apr 22 '12 at 7:14
AnoojNair
1862617
1862617
add a comment |
add a comment |
I had the same problem, found this thread, tried all but nogo.
Then I spend another 4 hours wasted time.
Then I found that the compilation settings had changed from 64bits to x86. When I changed it back to 64bits it worked. Don't know exactly why but could be that the IIS application pool was not set to allow 32 bit applications.
add a comment |
I had the same problem, found this thread, tried all but nogo.
Then I spend another 4 hours wasted time.
Then I found that the compilation settings had changed from 64bits to x86. When I changed it back to 64bits it worked. Don't know exactly why but could be that the IIS application pool was not set to allow 32 bit applications.
add a comment |
I had the same problem, found this thread, tried all but nogo.
Then I spend another 4 hours wasted time.
Then I found that the compilation settings had changed from 64bits to x86. When I changed it back to 64bits it worked. Don't know exactly why but could be that the IIS application pool was not set to allow 32 bit applications.
I had the same problem, found this thread, tried all but nogo.
Then I spend another 4 hours wasted time.
Then I found that the compilation settings had changed from 64bits to x86. When I changed it back to 64bits it worked. Don't know exactly why but could be that the IIS application pool was not set to allow 32 bit applications.
answered Jul 16 '14 at 19:01
edelwater
1,10232046
1,10232046
add a comment |
add a comment |
Make sure markup (svc) file has service attribute with namespace.classname and codebehind will be classname.svc.cs
Rebuild the solution
Restart the app pools from local IIS once.
add a comment |
Make sure markup (svc) file has service attribute with namespace.classname and codebehind will be classname.svc.cs
Rebuild the solution
Restart the app pools from local IIS once.
add a comment |
Make sure markup (svc) file has service attribute with namespace.classname and codebehind will be classname.svc.cs
Rebuild the solution
Restart the app pools from local IIS once.
Make sure markup (svc) file has service attribute with namespace.classname and codebehind will be classname.svc.cs
Rebuild the solution
Restart the app pools from local IIS once.
answered Nov 12 '18 at 10:01
Nitin
164
164
add a comment |
add a comment |
protected by Community♦ Dec 29 '11 at 12:47
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Can you show contents of service.svc?
– Konstantin Tarkus
Apr 6 '09 at 10:00
1
If it reference a pre-compiled type in an assembly, have you copy it to the bin directory under the vroot?
– Konstantin Tarkus
Apr 6 '09 at 10:01
2
<%@ ServiceHost Language="C#" Debug="true" Service="QS.DialogManager.Communication.IISHost.RecipientService" CodeBehind="RecipientService.svc.cs" %>
– nandarya
Apr 6 '09 at 10:13
1
Thanks for posting this, your Q&A just fixed the same problem for me.
– Pauk
Jul 22 '09 at 15:59
Comment since I cannot Save apparently...
– Joshua Drake
Jul 9 '13 at 20:13