.NET WCF SVC 文件下载而不是执行 [英] .NET WCF SVC file downloaded instead of being executed

查看:26
本文介绍了.NET WCF SVC 文件下载而不是执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在访问 jquery 的 Web 应用程序中使用了 WDF 服务.在本地它工作正常,但在我的测试服务器(IIS7)上却没有.

I am using a WDF Service in my web application which I am accessing very jquery. Locally it works fine, but on my test server (IIS7) it does not.

我尝试通过 url (www.mydomain.de/Services/MyService.svc) 访问 .svc 期望我得到与离线相同的页面(这是一个 WCF 服务,元数据发布被禁用......".相反,.svc 文件被下载并在 Visual Studio 中打开.

I tried accessing the .svc via the url (www.mydomain.de/Services/MyService.svc) expecting that I get the same page as offline ("This is a WCF service, metadata publishing is disabled ....". Instead, the .svc file gets downloaded and opens in Visual Studio.

这是一个 web.config 问题(它可以离线工作,但我没有离线 II7)还是 IIs7 中的文件关联不正确的问题?我的测试服务器在共享主机环境中运行,我只有非常有限的访问权限(Parallels Plesk Panel 9),所以如果这是 IIS7 问题,我需要通过网络主机...

Is this a web.config problem (it works offline but I don't have II7 offline) or is it a problem that file associations in IIs7 are not correct? My Testserver is running in a shared hosting environment and I have only very limited access (Parallels Plesk Panel 9), so if this is an IIS7 problem I need to go through the webhoster...

欢迎任何反馈.

推荐答案

检查机器级别的 web.config.....可能是 .svc 文件的注册被删除了.有限的访问意味着托管商可能出于白痴,由于业务决策而一无所知,只是没有启用/禁用 .svc 文件.没有注册...文件将被提供"(传输).

Check the web.config.... on the machine level. Can be the regtistration for .svc files got delted. Limited access means likely the hoster, out of idiocy, cluelessness of due to a business decision simply did not enable / disabled .svc files. Without the registration... the file will be "served" (transmitted).

您无能为力 - 在他们的支持下接受..NET 4.0 可能没有正确安装.或者,正如我所说,这是一个自愿的决定.

Not a lot you can do - take it with their support. .NET 4.0 may not be properly installed. or, as I said, it is a willfull decision.

他们使用 IIS 7 的事实说明了很多 - 他们现在应该使用 7.5.

The fact that they use IIS 7 says a lot - they should use 7.5 for quite a time now.

这篇关于.NET WCF SVC 文件下载而不是执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆