help host WCF in IIS

M

MR

I am trying to write my first WCF Service. I am using VS2008 beta 2 on a
Vista Business machine

I have written and installed my service on the local IIS. I have defined a
service.svc file
when i try to access the service thru my browser i get the following error
response:

HTTP Error 404.3 - Not Found
Description: The page you are requesting cannot be served because of the
Multipurpose Internet Mail Extensions (MIME) map policy that is configured
on the Web server. The page you requested has a file name extension that is
not recognized, and is not allowed.

Error Code: 0x80070032

Notification: ExecuteRequestHandler

Module: StaticFileModule

Requested URL:
http://localhost:80/MSOMEAnalysisService/MSOMEAnalysisService.svc

Physical Path: D:\MSOMEAnalysisService\MSOMEAnalysisService.svc

Logon User: Anonymous

Logon Method: Anonymous

Handler: StaticFile


I figured because svc is not defined as a valid MIME extension. I added the
..svc extension as "application/octet-stream". now when i access the site i
the contents of the file are returned.

What do I need to do to get the service activated?

(I am using John Sharp's book WCF Step by Step as a tutorial. I think i
followed the example very closely but it doesn't mention the need to
configure the MIME)

thanks for your help
m
 
M

Marc Gravell

Some things to check:

IIS (sometimes doesn't configure itself correctly):
In the "Configuration..." option (Application Configuration) [for me
on the Virtual Directory tab], ensure that .svc is linked to
aspnet_isapi.dll, and does not have the "verify that file exists"
option checked.
On the ASP.NET tab, ensure that ASP.NET 2.0.blah is selected.

global web.config (doesn't get automatically updated if you have
customised the file prior to upgrade):
Ensure that there is a .svc entry in the buildProviders section,
linking to System.ServiceModel
Ensure that there is a .svc entry in the httpHandlers section, linking
to System.ServiceModel
Ensure that there is a ServiceModel entry in the httpModules
Ensure that System.IdentityModel and System.ServiceModel are in the
compilation assemblies
(for the last 3, the changes are a little tricky to describe - post
back if you need the gory details...)

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top