.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Hosting WCF Service Library in IIS version 5.1

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :WCF


I am having problems running the .svc page in my browser. I followed the instructions on http://www.aspfree.com/c/a/ASP.NET/Developing-a-WCF-Service-Library-and-Hosting-it-as-WCF-Web-Service-Using-VS2K8/

It runs fine only when I run(f5) the service application and then open IE to access : http://localhost/AEDEV_LER_Service/LERService.svc

As soon as the application stops running and I try to access http://localhost/AEDEV_LER_Service/LERService.svc it gives HTTP 400 bad request.

I have IIS 5.1 on Windows XP. Aam I hosting my service right in IIS ?How can I run this http://localhost/AEDEV_LER_Service/LERService.svc independent of running the app. Kindly guide me.

Thank you


View Complete Post

More Related Resource Links

WCF Service Library creation and hosting it in IIS



I have created WCF service library.

I am following these articles : http://msdn.microsoft.com/en-us/library/ms733766.aspx

and http://www.aspfree.com/c/a/ASP.NET/Developing-a-WCF-Service-Library-and-Hosting-it-as-WCF-Web-Service-Using-VS2K8/3/

to test the service locally,I open an instance of Internet Explorer and browse to the service's URL: http://localhost/IISHostedCalc/Service.svc

But it gives HTTp 400 bad request.

It works only when I run the service application. I have also removed the client name from the debug box which  detachs the client from the service.

Can you please tell me If I am on right track. Thank you

Following is my web.config

<?xml version="1.0" 

Convert WCF service to self hosting application


 I created project as a  WCF Service application and now according to recuriment that needs to be converted as a self hosting application

How can i do this?

Converting WCF service app to Self hosting app?

WCF Windows service hosting - not starting

Hi every experts i have WCF Service and a Windows service project for hosting that service when i install the win service with installutil and click start in services it show this message : "Windows could not start the Virtual WCF Service service on Local Computer. Error 5: Access is denied." i have this problem with this sample too : http://rapidshare.com/files/415123228/WCFSample.rar how can i fix this? THX

WCF Workflow Service Hosting

Is there any way I can host a WCF Workflow Service Application in a Windows service instead of IIS?

Shielding Exceptions at WCF Service Boundaries using Microsoft Enterprise Library 4.1

To enable the exception shielding feature in my WCF service I have done the following steps Added references of the following assemblies: Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.dll Microsoft.Practices.EnterpriseLibrary.Common.dll Microsoft.Practices.ObjectBuilder2.dll Added a Using statement for Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF. Added the ExceptionShielding attribute to a service implementation class and specified the name of the exception policy to use as a constructor parameter. Add the Exception Handling Application Block configuration sections to the service's Web.config file. <add name="WCFServicePropogate">         <exceptionTypes>           <add type="System.Exception, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"             postHandlingAction="ThrowNewException" name="Exception">             <exceptionHandlers>               <add exceptionMessage="I created the exception" faultContractType=

Hosting IIS vs Windows Service !!!!

Hi, could you please explain me about the Pros and Cons Between the Hosting the service in IIS vs Windows Service General Term. why iam asking is,my dev server is installed with IIS 7(win 2k8)which ofcourse supports IIS and windows service(netTCPBinding).so please explain me on the same above.

Why windows service Looks for "Classlibrary2.resources Version=" assembly in resolver eve

In a simple Windows Service project, I have got below code. namespace WindowsService1 {     static class Program     {         /// <summary>         /// The main entry point for the application.         /// </summary>         static void Main()         {             System.Diagnostics.Debugger.Launch();             AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);             ClassLibrary2.Class1.Hello();         }         private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)         {             return null;         }     } } Here "ClassLibrary2" is a simple class library project with couple resources and single class. No other settings are set. After installing WindowsService1, on starting the s

Need help understanding why to use 'ServiceBase.Run' in Windows Service hosting a WCF service

A year or 2 ago I successfully implemented a WCF service hosted in a Windows Service.  Now I am going to do another one, so I went back to my 1st project.  Based on the following links example (http://msdn.microsoft.com/en-us/library/ms733069.aspx) and my 1st project I implmented the following code: Public Shared Sub Main() ServiceBase.Run(New MyWindowsService()) End Sub Now, I read up on this in the MSDN and understand that registers the service with the SCM and calls the onStart method, correct?  The way I read it, this code is necessary.However, now I am looking at a few newer examples of hosting a WCF service in a Windows Service, and the 'Main' Sub with that 'ServiceBase.Run' call is not even included, but apparently still works.  For example the following MSDN tutorial doesn't use that call at all:  http://msdn.microsoft.com/en-us/library/cc949080.aspx#    It just has the onStart method overloaded which I also do.So my questions are, is that code in Sub Main needed and why?  Doesn't pressing start from the 'Services Manager' console call the onStart method anyways of the service?Thank you,

Security Update for Microsoft .NET Framework, Version 1.1 Service Pack 1 (KB928366)

I have been trying to install   Security Update for Microsoft .NET Framework, Version 1.1 Service Pack 1 (KB928366)   since it was released but downloads ok but it will not install. Everytime installation of this update fails!   Help...

Hosting web service inside Windows Application

  I would like to host my web service inside windows application. I prepared a short example basing on: http://msdn.microsoft.com/en-us/library/aa529311.aspx I have 2 projects created with default templates: Web Service project where I did not change anything: namespace WebService1 { [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class Service : System.Web.Services.WebService { public Service() { } [WebMethod] public string HelloWorld() { return "Hello World"; } } } Windows Project in which I changed only the main form class: public partial class Form1 : Form { public Form1() { InitializeComponent(); Uri address = new Uri("soap.tcp://localhost/TestService"); SoapReceivers.Add(new EndpointReference(address), typeof(WebService1.Service)); } } The problem is that when I compile and run this Windows Application, I can`t discover this Web Service. There must be something wrong in my solution. Could you please help me by telling what may be wrong? Thank you for help in advance.MCP

Is it possible to implement your own version of the Managed Metadata Service?

Hi, It would be nice to provision a new instance of the Managed Metadata Service where the service is not implemented by Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication, but a custom provider. Is it possible to expose your own service as a Managed Metadata Service?

how to create a doc library item using web service

Hi, I think this is a common question, but I coulnd't come up with anything at this point. I'd like to create an item in a document library using SP web service. - no uploading a file. I have created an item using ../copy.asmx web service. Using the WS function(copyWebService.CopyIntoItems function), it seems suitable to create an item AND at the same time to upload a file. I don't think I can just create an item with this function. How do i just create an item? any reply is appreciated.  

Problem with hosting wcf service using window service in window 7

Hi all! I have a wcf service, I hosted susessfuly in winxp, but in window 7, it throw an excaption like that Message="HTTP could not register URL http://+:8000/EchoService/. Your process does       not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). After that, I tried to run the  following command on window 7  to configure HTTP:             netsh http add urlacl url=http://+:8000/MyUri user=DOMAIN\userid I get error  Then, I run as Administrator and execute the above command, I get an error like here Create SDDL failed, Error: xxx The parameter is incorrect. I dont know why, and  how to fix the problem. Please help me!   Thanks all.    

Error 400 when hosting windows streaming service.

WCF, .NET 3.5:I'm sorry if this is redundant, but I'm having problems receiving error: 400 requests. My particular issue is this: If I select my service library within VS the library is test hosted and I can stream large files. My problem is getting a windows service configured to host this service library. I can transfer small files but larger ones are failing with the following stacktrace: <E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"> <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"> <EventID>262155</EventID> <Type>3</Type> <SubType Name="Error">0</SubType> <Level>2</Level> <TimeCreated SystemTime="2009-11-18T19:58:07.7808550Z" /> <Source Name="System.ServiceModel" /> <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" /> <Execution ProcessName="ExtractorTestClient.vshost" ProcessID="10768" ThreadID="9" /> <Channel /> <Computer>MyComputer</Computer> </System> <ApplicationData> <TraceData> <DataItem> <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error"> <TraceIdentifier>http://msdn.microsoft.com/en-US/library/Syste

WCF Window Service Hosting



now i am developing wcf services those will host on window service .In my project,there are several wcf services,                                                                          for example,CustomerService,SupplierService,SaleService,PurchaseService and TransferService.How i host those services on window service?                                 Will Each service acts as distinct window service?so,i have 20 services,are there 20 services in window service?After hosting,if i change some methods of  one service,do i need to uninstall all service?Please guide me and help me.I m not familiar with wcf configuration.sorry for poor of my english.



Config Hosting multiple WCF services in one NT service


Hello there,


I've a question about hosting a service in a selfhosting scenario (not IIS or WAS).


For example, I have one WCFService with a config file (web.config). In this config file a system.serviceModel section exists, but also several appSettings.


Hosting in IIS is very simple. I created a svc file and voila, you can call the service. I do not have to place the configsettings of the WCFService into IIS.


Now I turn to host the WCFService in another host, a Windows NT service (or a win/console app).


Why do I have to place all of the WCFService configuration settings in the app.config of the NT Service? Why not just a reference to the physical path of the WCFService.


In the case of three WCFServices hosted by one NT Service, I have to place three web.config contents into the app.config of the NT Service. (Am I wrong? I hope so.)


tnx for reply!




Document Library version restore not behaving as expected on the "Name" column (file name)


After a rollback to a previous version, the value of the column "Name" in a document library is not restored. All other columns are restored properly. It seems that the column "Name" (file name) is excluded from the process of versioning.

I didn't find information on this behaviour on the internet. Any suggestions ?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend