Comments are closed for this post.
Posted by
Darren Jefford
@
12 Aug 2008
3:12 PM
Fusion Log Viewer (FusLogVw) can also help in these circumstances - always one of the first tools I bring out to see what Fusion is up to..
Posted by
Matt McGregor
@
06 Jan 2009
3:22 AM
Thanks Josh. This was really stumping me, using your ASPX route pointed out the missing reference I had. You gotta love WCF error messaging!
Cheers
Matt
Posted by
Charles
@
12 Jan 2009
1:08 PM
Thanks Josh! In trying to find out why asp.net couldn't find my assembly, I tried your code - and the surprising thing is that it didn't throw an exception! I'm still getting a "The type 'YourType', provided as the Service attribute value in the ServiceHost directive could not be found." error, and I have no idea why.
I see that you used the both the service type and assembly name in your ServiceHost directive, separated by ", " - I have tried that also, but I end up getting the following error:
"An error occurred during the parsing of a resource required to service this request ... The required directive 'ServiceHost' is missing."
Any suggestions? My .svc looks like this:
<%@ServiceHost Service=”BWC.NetServices.Ordering.OrderService, BWC.NetServices.Ordering” %>
Thanks in advance!
-Charles
Posted by
Charles
@
12 Jan 2009
1:17 PM
Doh! Nevermind... Somehow I was using quotes like ”, as opposed to " :D.
Smooth...
Thanks again!
-Charles
Posted by
Robert Hellestrae
@
26 Feb 2009
9:16 AM
Thanks for the insight!
What is the missing assembly that is required in the GAC?
Best regards, Rob
Posted by
James
@
07 Apr 2009
5:46 PM
Actually, the parameters are ("Assembly", "Type"). :)
Posted by
pdschuller
@
22 May 2009
10:54 AM
I had a similar problem that required me to do two things in order to resolve it:
1.) the dll that my web service project created had to be dragged over to the bin directory of the web-site-to-which-I-was-deploying. (The reason I hadnt done this was that "Microsoft .NET Framework 3.5 - Windows Communication Foundation" (p.106) had said that was optional.
2.) when it came time to create a Service Reference in the VS 2008 I was using the IP number like
http://123.123.12.1/Service1.svc/wsdl and I needed to use
http://www.MyDomainName.com/Service1.svc?wsdlbtw, I got that correct url when I browsed to
http://123.123.12.1/Service1.svc The IP worked in that case.
HTH
Posted by
ongle
@
29 May 2009
4:48 PM
thanks, useful tip
Posted by
Smith
@
27 Jul 2009
2:11 PM
Does this method really work?
I just used in my WCF test and all in GAC. I compiled a DLL called "IHelloWorldService.ll"
using System;
using System.Runtime.Serialization;
using System.ServiceModel;
and test.aspx always complianed
<%@ Page Language="C#" Debug="true" %>
<%@ Import Namespace="System.Runtime.Remoting" %>
<%
ObjectHandle oh = Activator.CreateInstance("IHelloWorldService.dll", "IHelloWorldService");
Response.Write(oh.Unwrap().ToString() + " loaded OK");
%>
also tried
("IHelloWorldService", "IHelloWorldService.dll");
Compile error:
System.IO.FileNotFoundException: Could not load file or assembly 'IHelloWorldService.dll' or one of its dependencies. The system cannot find the file specified.
Posted by
kapil
@
04 Nov 2009
4:22 AM
I added your code and I got a message
Assembly loaded OK
Not sure why the error is coming while I am trying to run WCF
Posted by
vicent
@
15 Nov 2009
5:07 PM
hi ,i met the erroe today,may be you can try add the the the refrence of dll file which implement the ServiceContract
Posted by
Henrik
@
15 Sep 2010
2:31 PM
Thanks! You saved my day.
Posted by
Bryan
@
12 Oct 2010
9:11 PM
This post just kept me from insanity. Thanks
Posted by
Ram
@
29 Nov 2010
6:22 AM
Thanks , it solved my problem
Posted by
Sundar Rajan
@
19 Aug 2011
5:44 AM
Hi,
I also had the same issue. I checked with the namespace, interface, te class wich implements that particular service to check if there is any name mismatch, but everything was correct and still i had the issue. Finally i identified that the DLL(assembly whic has thhe implementation for this service) reference was missing in the project where i had the .SVC file ten i added the dll reference and the problem was resolved. Basically this is an example. i ave 2 projects 1 is the servicehost project which host all the services and the 2nd project has the implementation for all services. So, in the 1st project there should be a ALL reference to the second project when the service (.SVC) is hosted in browser as it expects the reference to the original class which implements the service.
Posted by
Richard
@
06 Dec 2011
3:18 PM
Parameters to the method CreateInstance are in the wrong order. CreateInstance("YourAssemblyName", "YourTypeName")
Posted by
josh
@
17 Jan 2012
5:51 AM
Thanks to Richard (commenter) and Clark Roberts for the fix to the CreateInstance parameter order.