Question

Problems hosting .Net Service (WCF) in IIS6 on Windows 2003 Server

Asked by: raggedyboo

Hello there Experts,

On my development server (Win2003 Server) I can test host my WCF Service, writtne in VB .Net 2008 and use it as planned from my client apps on my development machine.

However, when I upload the content to my live server (Win2003 Server), I only get error messages displayed instead of the content I'm expecting.  Here's what I get...

Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

I have checked and double-checked the user permissions, and have made sure that the ASPNET user is the one that IIS uses, as well as checked that the remote server has .Net Framework 3.x installed.  I am baffled by this and urgently need some assistance.

Any help would be greatly appreciated!

Kind regards,

Brett

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-05-31 at 08:30:50ID23446978
Tags

Microsoft

,

IIS

,

6.0

Topics

Visual Studio

,

Web Application Hosting

,

Microsoft IIS Web Server

Participating Experts
2
Points
500
Comments
15

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Mail API & Retrying Host
    I have a working app that send mail successfully when the mail server is ok (obvious so far!). What I want to be able to do is detect that the host is not available and retry with a second host. I'd like to be able to detect this before sending a message, such as in the cod...
  2. debugging ASP.NET unde win2003 server
    under Win2003 server and IIS6 there is no more the aspnet_wp.exe process. on what process must I hook the debugger?
  3. So strange - Win2003 / IIS6 and PERL 5.8.6
    I have a PERL application. It's running just fine on one Windows 2003 / IIS6 / ActivePERL 5.8.6 boxes. Now I'm trying to move it to another box. Same setup - Windows 2003 / IIS6 / ActivePERL 5.8.6. However, now it won't run. I'm not a PERL expert, but know a thing or two...
  4. Rename hostname for IIS6 win2003 server
    Our web serverice is running on a IIS6/Win2003Enterprice Server, we are considering to change the host name, Can I just rename the host without uninstall the IIS6? Please advise.
  5. AWSTATS on Win2003 IIS6
    Hi, I'm battling to get AWSTATS installed on a Windows 2003 server box running IIS6. I've installed the latest version of Active Perl, and awstats6.6 and followed all the installation instructions to a T, but no luck... When installing the awstats.exe, I already get strange...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: sjors1309Posted on 2008-05-31 at 14:19:39ID: 21685084

Is your .svc file in the root directory of your application on the live server?

 

by: elimesikaPosted on 2008-05-31 at 14:20:03ID: 21685085

 

by: raggedybooPosted on 2008-06-01 at 01:39:00ID: 21686386

Thanks for the replies.

sjors1309: Yes, the files are exactly as published by VB .Net 2008.  To confirm this, here are files and their structure on my webserver...

\bin
\Service1.svc
\Web.config

The code itself is simply the demo code provided when creating a WCF Service in VB2008.

elimesika: Yes, this is one of the first pages I found when first looking into the problem.  The page basically says that if you have changed the password of the ASPNET user account, then you need to log that username/password combination in the machine.config file.   The result is still the same.

Any more ideas? (Other than reformat the server and start again!!)

Cheers

Brett

 

by: sjors1309Posted on 2008-06-01 at 03:18:32ID: 21686507

Can you provide the entry in the application log that is generated?

Maybe your bindings aren't what they should be. The svc file points to a service-location, maybe it uses localhost instead of the address of the production server. So when you call the service your client isn't able to consume it.

 

by: raggedybooPosted on 2008-06-01 at 05:24:08ID: 21686748

You might be onto something there with the bindings...

I have attached the system.serviceModel section of the web.config file...

At present, the dns value of the endpoint is set to 'localhost' - should this be my machine name, or IP Address, or fully qualified domain name, etc?

<system.serviceModel>
    <services>
      <service name="WcfService3.Service1" behaviorConfiguration="WcfService3.Service1Behavior">
        <!-- Service Endpoints -->
        <endpoint address="" binding="wsHttpBinding" contract="WcfService3.IService1">
          <!--
              Upon deployment, the following identity element should be removed or replaced to reflect the 
              identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity 
              automatically.
          -->
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WcfService3.Service1Behavior">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:

Select allOpen in new window

 

by: sjors1309Posted on 2008-06-01 at 05:39:19ID: 21686780

Yes, it should point to the server onto which the service is deployed.
If that's not enough please post your svc file.

 

by: raggedybooPosted on 2008-06-01 at 05:42:29ID: 21686782

Ok... I've been trying to set the DNS setting to my machine name and also to machine.domain, but neither of these makes any difference - the same error appears.

Below should be the contents of the Service1.svc file, taken from the webserver...

<%@ ServiceHost Language="VB" Debug="true" Service="WcfService3.Service1" CodeBehind="Service1.svc.vb" %>

                                              
1:

Select allOpen in new window

 

by: sjors1309Posted on 2008-06-01 at 06:07:05ID: 21686890

Your machine name? Or the name of the live server, which it should be

 

by: raggedybooPosted on 2008-06-01 at 06:10:42ID: 21686904

Sorry - I've been using the name of the live server, not my dev machine.

 

by: raggedybooPosted on 2008-06-01 at 06:37:14ID: 21687040

Ok - I'm getting somewhere now...

My error has changed somewhat, and depending upon which machine I use to test it, depends on what error i get...

From my client (dev) machine, if I access the URL: www.mydomain.com/services/Service1.svc I get this error:

     Server Error in '/Services' Application
     Runtime Error
     (It goes on then to say that the CustomErrors section in the web.config file is invalid)

OR if I try the same URL from within my remote (live) server, I get this error:
 
     Server Error in '/Services' Application.
     Failed to access IIS metabase.

Either way, this (below) is what appears in my Application Log...

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 01/06/2008 14:31:23 
Event time (UTC): 01/06/2008 13:31:23 
Event ID: 7cd3f18e23144b6e8d1b2538d3ca6e14 
Event sequence: 1 
Event occurrence: 1 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/910693420/Root/Services-29-128568006831747500 
    Trust level: Full 
    Application Virtual Path: /Services 
    Application Path: D:\Sites\testwebsite\wcf\ 
    Machine name: DS18764 
 
Process information: 
    Process ID: 5480 
    Process name: aspnet_wp.exe 
    Account name: DS18764\ASPUser 
 
Exception information: 
    Exception type: HostingEnvironmentException 
    Exception message: Failed to access IIS metabase. 
 
Request information: 
    Request URL: http://www.mydomainname.com/services/Service1.svc 
    Request path: /services/Service1.svc 
    User host address: 217.x.x.x
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: DS18764\ASPUser 
 
Thread information: 
    Thread ID: 1 
    Thread account name: DS18764\ASPUser 
    Is impersonating: False 
    Stack trace:    at System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String siteID, VirtualPath path)
   at System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath2.MapPath(String siteID, VirtualPath vpath)
   at System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull)
   at System.Web.CachedPathData.GetConfigPathData(String configPath)
   at System.Web.CachedPathData.GetConfigPathData(String configPath)
   at System.Web.CachedPathData.GetApplicationPathData()
   at System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp)
   at System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath path)
 
 
Custom event details: 
 
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:

Select allOpen in new window

 

by: sjors1309Posted on 2008-06-01 at 07:18:07ID: 21687222

Seems that ASPNet user on your live machine doesn't have enough permissions to execute this service.
Does this user have read/write permissions to virtual dir?
Does your service consume other resources that need a permission set?

 

by: raggedybooPosted on 2008-06-01 at 14:26:24ID: 21688457

Good point... my ASPUser account didn't have write permissions set on the folder that the Virtual directory points to...  And now my error page has changed again.

I think I'm on a mission to find each and every error message possible here...! Ha Ha...

Here's part of the output from the event log... it seems that a chunk of my framework is missing.

Exception information: 
    Exception type: ConfigurationErrorsException 
    Exception message: Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (D:\Sites\testwebsite.com\wcf\web.config line 104) (D:\Sites\testwebsite.com\wcf\web.config line 104) 
 

                                              
1:
2:
3:
4:

Select allOpen in new window

 

by: raggedybooPosted on 2008-06-01 at 14:31:24ID: 21688473

"Does your service consume other resources that need a permission set?"

No, don't think so...  This is just a very basic WCF service to get everything up and running.  THEN, I'll complicate it!!

 

by: sjors1309Posted on 2008-06-02 at 03:22:05ID: 21690754

The missing assembly is the Ajax Extensions framework. You probably use some of Ajax's functionality in your code? This seems to be yet another question...:)
Maybe you didn't install the Ajax framework onto the live server. Then this assembly is not in de Gac and therefore cannot be loaded.
Install Ajax on this server, or copy System.Web.Extensions.dll to the applications bin folder (if applicable) and see what happens.

 

by: raggedybooPosted on 2008-06-22 at 00:24:27ID: 21839952

After days of looking at this from as many different angles as I can, it seems that I have inadvertently uninstalled the .Net Framework 3.0 and 3.5... but despite numerous attempts to reinstall it, either manually or using Microsoft Update, it won't go on.

I get this:
The following updates were not installed: Microsoft .NET Framework 3.0: x86 (KB928416)

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...