Batuta
Batuta

Reputation: 1714

WCF in Windows 8 and IIS 8 - SVC file gets downloaded

I am trying to run a simple WCF service application on a Windows 8 machine with IIS 8.

When I try to view the svc file in the browser, the SVC file only gets downloaded.

I have checked the MIME type for *.svc in IIS and there's an entry for it:

.svc
application/octet-stream

I also checked the Handler Mappings in IIS and there's an entry for svc-integrated as follows:

svc-Integrated
*.svc
Enabled
System.ServiceModel.Activation.HttpHandler

I've also tried some stuff as suggested from these other sites:

.NET WCF SVC file downloaded instead of being executed

but cannot get around this.

Appreciate any other areas which I should be looking at. Really stumped with this.

Note: The reason I am asking this is because I can see that the application I have is able to call the service and it is getting a 200 response, but there seems to be no data being served. So I thought of checking the .svc from the browser and instead I am getting the file automatically downloaded.

UPDATE: For some reason, the svc file only gets downloaded when using Chrome. When using IE, the svc works properly. So perhaps this is not an IIS problem, but rather some browser settings in Chrome?

Upvotes: 0

Views: 5376

Answers (3)

Tech Jay
Tech Jay

Reputation: 434

I know this is quite old post to be answered. But i recently faced the same issue and could not find a solution to it. So checked the settings in Turn on-off Windows features. Enabled some WCF settings and was able to get it working. Here is the detailed link of the settings:

WCF .svc file getting downloaded, when hosted in IIS

Upvotes: 4

Kumar Ambuj
Kumar Ambuj

Reputation: 129

If the file is getting downloaded, there must be a default program associated with it. Try removing the default program associated with the .svc file, then browse it. This link would help remove the default program http://www.sevenforums.com/general-discussion/318473-file-type-change-back-unknown-application.html

Upvotes: -1

Mike
Mike

Reputation: 11

Everybody should consider the browser question because it happened the same to me... then after some hours of real pain and frustration I switched to firefox and it FINALLY worked!!!

Upvotes: 1

Related Questions