Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T.

This error ("Failed to access IIS metabase") can occur when you try to access your WCF when you have added for hosting within IIS.

To solve this problem do this:

  1. Reregister ASP.NET for IIS:  Open an Visual Studio Command Prompt (or a regular command prompt and cd into the .Net dir - usually: C:\WINNT\Microsoft.NET\Framework\v2.0.50727) then type:
       aspnet_regiis -i
  2. When complete, from the same command prompt run: iisreset

Verify your IIS virtual/app dir is setup correctly (uses .Net 2).  If you don't already have one...

To Host a WCF Service within IIS:

  1. Develop your service in IIS (I'm not going to tell you how to do that!) and build it.
  2. Within your computer management/MMC console (compmgmt.msc), open the Internet Information Service node and right click on the site you want to use and select New - Virtual Directory...
  3. Enter the name you want.
  4. Point this to the directory you created your WCF service project in (the project root dir - not the bin dir).
  5. Complete the wizard then back in the MMC window right click on your new virtual dir and select Properties.
  6. On the ASP.NET tab make sure uses version 2.0.50727 (or whatever your v2 is).

To test:  within the MMC console - open your new virtual dir, right click on one of your services (eg MyService.svc) and select Browse.

HTH

Tim

Posted on Thursday, May 14, 2009 3:13 PM Off Topic , ASP.NET , IIS , Web Development, JavaScript & CSS | Back to top


Comments on this post: Error: Failed to access IIS metabase. Hosting WCF Service in IIS

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
great article... it worked for me ..thanks alot
Left by rizwan on Jul 02, 2009 1:39 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Hi Tim

Thanks for your article it solved my problem.

Regards,

Tim Kruger
Left by Timothy Kruger on Aug 25, 2009 7:37 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Thanks, it worked for me.
Left by s on Sep 25, 2009 6:29 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Hi.... it worked.... thanks a lot.......
Left by arul on Nov 12, 2009 2:28 PM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Thanks for this article. It helped me :)
Left by Shweta on Nov 23, 2009 12:52 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Thanks dude wrking for me ... thanks a lot
Left by Vaibhav Gupta on Nov 25, 2009 1:07 PM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Great Article Thanks A Lot
Left by Harsh Upadhyay on Dec 10, 2009 5:33 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Wov..Thanks.Great article.Works for me...
Left by Tech27systems on Dec 16, 2009 6:13 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
It's really great article.. thanks for saving my 1 day . :-)
Left by payal on Dec 30, 2009 3:20 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
That's so good. So many thanks
Left by my name on Jan 08, 2010 1:06 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
That's very good.thanks a lot
Left by Maleki.Yahya on Jan 10, 2010 2:48 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Thanks for this article. it's Works for me...
Left by Bharat Patel on Jan 20, 2010 5:32 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Thanks,

For Your Support

sunil
Left by sunil on Feb 12, 2010 8:24 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Ya , It's work fine.
Left by Muths on Mar 03, 2010 5:53 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Yes it's work fine.
thanks
Left by Atul on Mar 18, 2010 3:24 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
chal hat bhsdke
Left by kk on Mar 24, 2010 4:13 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
ya,its work......
thanks a lot......
Left by nani on Apr 05, 2010 10:46 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Great TIM,

Thanks, It helped me solve the problem.
Left by Prasad on Apr 20, 2010 6:05 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
thanks for your post and it worked.
Left by satya on Mar 04, 2011 9:44 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Glad it worked for everyone else, not me though :(
Left by Mike on Apr 06, 2011 9:33 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
it worked for me..Thanx a lot
Left by Suneeta on Apr 08, 2011 4:40 PM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Thanks a lot... it worked
Left by Raksha on Jun 06, 2011 6:51 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
Hi Tim

Thanks for your article it solved my problem.
Save my time..

Regards,
Vipin Kumar
Left by vipin chauhan on Oct 17, 2011 2:31 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
This worked with ASP.Net 4 also (using the ...Framework\v4... folder).
Left by Brendan McAllister on Nov 17, 2011 5:49 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
finally i found a soln
Left by vinod on Feb 17, 2012 9:35 PM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
no its not working..
guide me...
Left by nisha on Mar 29, 2012 6:46 AM

# re: Error: Failed to access IIS metabase. Hosting WCF Service in IIS
Requesting Gravatar...
To convey in fact My business enterprise is quite content around the things anyone proposed. Just one show you some sort of pack regarding invaluable information, effectively build and in many cases amazing preferences you’ve procured below.
Left by Nandroid Backup on Apr 10, 2012 4:46 PM

Your comment:
 (will show your gravatar)


Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net