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

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

Publishing a WCF service in VS2010 and IIS7

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :ASP.Net
OK, there is probably a really simple answer to this, but I have the flu and can't think straight.I am taking advantage of being out sick by downloading VS2010RC and playing around with it.I created a simple WCF service (my first in this foundation, but not my first service).  Its a redo of an existing asmx service I created a while ago.  I commented out all the processes, and am simply trying to publish the service to my local IIS7 to see the discovery working.I have setup a new site to host the service ( I tried using Default as well, with the same results).  I right click the project in VS and select publish.  It is prompting me for a login even though the site is setup for anonymous access.  If I try to use WebDeploy, it can't find my site, and if I use FileSystem, it give me a simple "Publish failed" with no details.Can someone point me to a tutorial or something that describes the publish process in VS2010 or give me some leads as to what setup needs to happen either in VS or ISS to let me publish?  Thanks. 

View Complete Post

More Related Resource Links

Metadata publishing for this service is currently disabled Problem under IIS7



I am struggling with an issue that I haven't seen before, at least not without a simple resolution. I have seen numerous articles about this issue but I haven't found one that actually gives a solution that works and its really becoming a royal pain.

I am getting the message, "Metadata publishing for this service is currently disabled" when attempting to host my service in IIS7 on windows 7. I have only seen this problem since I migrated to VS2010 using the .NET 4 Framework.

I have adjusted my web.config file in effort of resolving the problem but to no avail. Anyone here able to help me out on this one? I am totally exhausted on going in circles for this issue.

Here is my code:

<?xml version="1.0"?>
    <compilation debug="true" targetFramework="4.0" />
        <behavior name ="MapServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>

How to Deploy WCF service(developed using VS2010) on IIS7.0 as a RESTful Service.


Hi Guys,


I am new to WCF development, and i just developed a WCF service using VS2010 as per my client's urgent requirement. They need a RestFul service , which reads data from an Publishing ShraePoint Library which has anonymous access. Intially i tried using the sharePoint built in restful service (LISTDATA.SVC), but as it looks for authentication, it is failing to provide data.

Coming back to the problem, I have developed the wcf service and its working well on wcfclient. I need to deploy this on IIS7.0 as a restful service.

Any guidence and leads would be helpful. This is a bit urgent too.




Ashish, MOSS Learner

VS2005 calling VS2010 asmx service returns empty string


Anyone have any experience with this?

We are using VS 2005 for the front end, and vs 2010 for the web services part (asmx), not wcf yet.


Web service works just like the vs2005 when run locally, no problems.


Connecting to it from a test app returns an empty string. Connecting to a 2005 app doesn't!

Anyone run into this before or have a suggestion? Surely vs 2005 can connect to web services from a later version?






Cannot get service reference for Net.tcp service hosted in IIS7

HiI've got a service that I want to host in IIS7. The service runs over net.tcp (currently without security), but I am unable to create a service reference to it, or call it, using the net.tcp protocol. My event log is populated with lots of errors related to ASP.NET and System.ServiceModel, relevant services are installed and running (net.tcp port sharing service and net.tcp listener adapter).O/S : Window7 RTMDevStudio: 2008I publish the webservice to IIS7 and I get a valid page when navigating to the published .svc file (which tells me to use svtutil.exe and point it at the net.tcp endpoint).For that, I get this error :    The message could not be dispatched because the service at the endpoint address 'net.tcp://gedm-desktop.profiledc01.appdevelop.local/ManageAVMEP/ManageAVMAgent.svc/mex' is unavailable for the protocol of the address.Googling the problem leads me down several blind alleys :(I cannot determine what is causing the net.tcp listener to keep stopping? Everything is fine if I use the wsHttpBinding.Any tips or pointers to a course of action would be appreciated.ThanksGed My event log is full of errors (here is a sample) :-------An error occurred while trying to listen for the URL '/LM/W3SVC/1/ROOT/ManageAVMEP'. This worker process will be terminated. Sender Information: net.tcp Exception: System.ServiceModel.WasHos

How to create simple web service in VS2010, NOT WCF service

How to create simple web service in VS2010 Professional (trial version). There is no template to do this.  I am not trying to create WCF service here.

MVC doesn't work once is published in the WEB, "Error 404 Page Not Found" vs2010 iis7 mvc 2rc2 I up


Hi Everyone.

 I'm doing the samething in my two differents pc.

1) Windows 7,  vs2010 rc, mvc 2rc2, .Net 3.5

2) Winodws xp, vs2008, mvc 2rc2, .Net 3.5

My Hosting is in GOdaddy IIS 7, .Net 3.5.

I created a new project in both computers, i build it, i copied the 3 dll's files in the bin folder (System.Web.Mvc,  System.Web.Routing, system.Web.Abstractions), and i publish them...., i go to my website (www.luisbragagnolo) both same problem "Page Not Found"

 I tried many blogs...many advices...nothing yet....

 Any other new Advice people? Thankssssssss

Publishing xbap with partial trust, using WCF service for data backend, getting System.Net.WebPermis


It looks like these are very picky when it comes to how and where everything is setup. I've only got this to work when launching from visual studio. If I publish, I keep getting the System.Net.WebPermission exception. I am using .Net 4.0


IIS 7.5 (on my local machine)
Default Website
  --- QuoteTest (Application, ASP.net hosted website)
             ---Xbap(Was virtual directory, turned it into an application)

I'm thinking it's some magical order of settings in the publish tab that I need to do right.

  • Should I use localhost or my ip in the publishing location?
  • For the WCF service, is publishing to a File System Acceptable?
  • Any other security settings that I should set/be aware of?

VB WCF Workflow Service Application - WcfTestClient.exe different to C# in VS2010



I was following the simple introduction to WWF at http://msdn.microsoft.com/en-us/netframework/ff802403.aspx and I've noticed that a new C# WCF Workflow Service Application project created will then compile and run WcfTestClient.exe.  If I create the VB Version of that same project I get a Browser web page, not the WCF client. Is this a bug in the VS2010 VB bits?  How do I change the project to correctly execute WcfTestClient.exe manually in my VB Project?

Jamie Clayton http://www.jenasysdesign.com.au

Hosting WCF Service with netTcpBinding on IIS7

The article Hosting WCF Service with netTcpBinding on IIS7 was added by malav_rajendra on Saturday, September 25, 2010.

Web.Config should have following configuration settinggs to hosting WCF service on IIS7(WAS): bindings> netTcpBinding> binding name="tcpbinding" portSharingEnabled="true"> security mode="None">/security> !

Metadata publishing for this service is currently disabled.


I have tried to do what some have suggested to have the metadata publishing enabled but cant figure this out. Could anyone assist in what i could be doing wrong here? Ive read a few blogs and nothing seems to work. Im running as an admin, Win 7, VS2010 + all updates. My Web.Config file under my ASP .net site is:

<?xml version="1.0"?>
  <compilation debug="false" strict="false"

"Metadata publishing for this service is currently disabled" yet again!


I've followed all of the suggestions described in the other Q&As on this subject but so far nothing has worked - I still get the "Metadata publishing for this service is currently disabled" page.  Here is my web.config file:

   <service name="StationCasinos.Workflow.RuntimeService.WorkflowRuntimeService" behaviorConfiguration="StandardBehavior">
      <add baseAddress="http://localhost:6555/EnterpriseWorkflow/MessagingServic

Problem with getting client's IP address in WCF service on IIS7



I have deployed a WCF duplex service on IIS7 that gets the client's IP address and based on that if the IP address repeats, the client is not given access to service. The problem is that when I deploy it on IIS7 and try to access it from another PC on LAN, it identifies the new PC having the same IP address as the one that the service is deployed in(just for testing purpose, I am returning the retrieved IP address to client), and So, I am not able to access the service from another PC. 

Can anyone help me with this?



'Metadata publishing for this service is currently disabled' message with WCF service


Whenever I try to add a web reference to the WCF service in my project, I get an error:

'The HTML document does not contain Web service discovery information.
There was an error downloading 'http://localhost/OFTestSite/Service.svc/$metadata'.
The request failed with HTTP status 400: Bad Request.'

When I browse Service.svc directly from the IIS, the page opens with the statement 'Metadata publishing for this service is currently disabled.'

I followed all the steps correctly to make metadata publishing enabled, but still I get the same message and I'm not able to add the web refernce.

Could anyone please help me? 

(I am using VS 2010 Professional on Windows XP machine with IIS 5.1)

WCF service IIS7 Server 2008 custom User Name Authentication performance



I have WCF service. Nothing special. Everithing from "best-practice".

  • WCF Service hosted on Server2008(64)\IIS7
  • Application pool - integrated\.NET 4.0
  • binding: basicHttpBinding; security:TransportWithMessageCredential
  • transport clientCredentialType="None"
  • message clientCredentialType="UserName
  • custom class inherited from UserNamePasswordValidator provide simple validation.

Everything works as designed. But I have a performance issue.

I traced and logged the server and WCF class and figured out that there is no new "http request" in process until previous one passed "Verification". It looks like concurrent calls do not have any sense because UserName Password Validator may serve them one by one only.

It can't be a true. I hope I just missed some settings.

I will appreciate any help.


Silverlight calling WCF service on IIS 5.1, deployed by VS2010



Hi everyone,

I just started to learn silverlight. I had no choice then to learn web deployment applications and WCF services.

So I created a Silverlight application calling a WCF services functions storing and retrieving informations on a Database.

So I installed IIS 5.1 on my XP Pro and I published the Web project using VS 2010. Everything is fine so far with some settings I made on IIS.

But when I run the aspx page the Silverlight code runs good except when it is time to call the WCF services functionnalities.

Nothing happen.

Calls to the WCF services don't work. I cannot figure out why.

It's been hours I search on the net but nothing helps.

Thanks for your help.

Publishing the Managed Metadata Service, through a firewall to another AD Forrest - fun and games...


Hi People,

we've got two SP2010 Farms in two separate AD Domains/Forrests, which are connected via a firewall and there is no trust at the AD level.

Both farms consist of an App Server (Central Admin and all Service Applications) and a WFE (Content plus Query/Index role).

The Managed Metadata Service on Farm A is published through to Farm B and so we've had to open up ports through the firewall so the App Server in Farm B can talk to the SharePoint Web Services on Farm A (32843, 32844 and 32845) and that all appears to be working properly, even to the extent that the Content Deployment from Farm A to Farm B is also working and the managed properties in the content are all being mapped/managed correctly.

However I'm now seeing requests by the the WFE in Farm B to access the topology service running on WFE in Farm A! Hold on!
As it was, I already had to allow both the App Server and the WFE in Farm B to be able to access the SharePoint Web Service ports on the App Server in Farm A, and now I have to do the same for the WFE in Farm A?!?!? That can't be right.

Isn't the whole point of having proxy services, Central Admin and an App Server (hosting all the services) that you only have to open up a single server? Why does every machine in one farm have to know about every machine in another farm?

Talk about a firewall mana

IIS7 access rights to SQL Express 2008 (both use Network Service)



I have IIS7 and SQL Express 2008 running on Windows Server 2008.  IIS7's application pool that my app belongs to is configured for Network Service account.  The SQL Server also uses the same account.  I noticed that MS no longer discourages use of Network Service account for SQL 2008 (as it used to for 2005).

In IIS5 I used to give ASPNET account selected rights to my app's database.  With IIS7/SQL 2008 - both using the same Network Service account - giving access rights to the database does not seem to be necessary.  All app's running in the pool that uses Network Service account have full access to all resources in the database.

Is this expected?  If yes, what are the risks?



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