WCF IIS8;*。svc处理程序映射不起作用

时间:2023-01-09 03:30:17

I'm trying to get a wcf service running in IIS8 on 2012 build 8400.

我正在尝试在2012年构建8400时让wcf服务在IIS8中运行。

When installing the web role the wcf stuff (under 3.51) wasn't to be found like in 2008.

在安装web角色时,wcf的内容(在3.51以下)不会在2008年出现。

When installed the svc handler mapping was missing, so i did a:

当安装svc处理程序映射丢失时,我做了一个:

%windir%\Microsoft.NET\Framework\v3.0\WindowsCommunication Foundation\ServiceModelReg.exe –i

Now the handler mapping is there, but I still get:

处理器映射在那里,但我仍然得到:

The resource you are looking for does not have a handler associated with it.

(I removed the static file handler.)

(我删除了静态文件处理程序。)

The site is using the classic pipeline in order to use impersonation.

站点使用经典的管道来使用模拟。

12 个解决方案

#1


496  

More specifically:

更具体地说:

  1. Run Server Manager (on task bar and start menu)
  2. 运行服务器管理器(在任务栏和开始菜单上)
  3. Choose the server to administer (probably local server)
  4. 选择要管理的服务器(可能是本地服务器)
  5. Scroll down to "Roles and Features" section.
  6. 向下滚动到“角色和特性”部分。
  7. Choose "Add Role or Feature" from Tasks drop down
  8. 从下拉菜单中选择“添加角色或特性”
  9. On "Add Role or Feature Wizard" dialog, click down to "Features" in list of pages on the left.
  10. 在“添加角色或特性向导”对话框中,单击左边的页面列表中的“特性”。
  11. Expand ".Net 3.5" or ".Net 4.5", depending on what you have installed. (you can go back up to "roles" screen to add if you don't have.
  12. 扩大”。Net 3.5”或“。Net 4.5",取决于你安装了什么。(如果没有角色,可以回到“roles”屏幕上添加。
  13. Under "WCF Services", check the box for "HTTP-Activation". You can also add non-http types if you know you need them (tcp, named pipes, etc).
  14. 在“WCF服务”下,选中“http -激活”框。如果知道需要非http类型(tcp、命名管道等),也可以添加非http类型。
  15. Click "Install" Button.
  16. 点击“安装”按钮。

#2


196  

I had to enable HTTP Activation in .NET Framework 4.5 Advanced Services > WCF Services

我必须在。net Framework 4.5高级服务> WCF服务中启用HTTP激活

WCF IIS8;*。svc处理程序映射不起作用

#3


39  

turn ON the following on 'Turn Windows Features on or off'

打开以下“打开或关闭窗口功能”

a) .Net Framework 3.5 - WCF HTTP Activation and Non-Http Activation

a) .Net Framework 3.5 - WCF HTTP激活和非HTTP激活

b) all under WCF Services

b)所有在WCF服务下

#4


36  

Windows 8 with IIS8

  • Hit Windows+X
  • 点击Windows + X
  • Select Programs and Features (first item on list)
  • 选择程序和特性(列表中的第一项)
  • Select Turn Windows Features on or off on the left
  • 选择打开或关闭左边的窗口功能
  • Expand .NET Framework 4.5 Advanced Services
  • 扩展。net Framework 4.5高级服务。
  • Expand WCF Services
  • 扩大WCF服务
  • Enable HTTP Activation
  • 启用HTTP激活

#5


27  

I prefer to do this via a script nowadays

我现在更喜欢通过脚本来做这件事

REM install the needed Windows IIS features for WCF
dism /Online /Enable-Feature /FeatureName:WAS-WindowsActivationService
dism /Online /Enable-Feature /FeatureName:WAS-ProcessModel
dism /Online /Enable-Feature /FeatureName:WAS-NetFxEnvironment
dism /Online /Enable-Feature /FeatureName:WAS-ConfigurationAPI
dism /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation
dism /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation45

REM Feature Install Complete
pause

#6


10  

We managed to solve the error under Windows Server 2012 by:

我们成功地解决了Windows Server 2012的错误:

  1. Removing from "Remove Roles and Features Wizard" .NET Framework 4.5 Features/ASP.NET 4.5 and all its dependent features
  2. 删除“删除角色和特性向导”。net Framework 4.5特性/ASP。NET 4.5及其所有相关特性
  3. Re-installing the removed features.
  4. 重新删除功能。

It seams the order of installation is the cause.

它的接缝顺序是安装的原因。

Also, make sure you have HTTP Activation installed under WCF Services.

另外,请确保在WCF服务下安装了HTTP激活。

#7


3  

For Windows 8 machines there is no "Server Manager" application (at least I was not able to find it).

对于Windows 8机器,没有“服务器管理器”应用程序(至少我找不到它)。

Though I was able to resolve the problem. I'm not sure in which sequence I did the following operations but looks like one/few of following actions help:

虽然我能解决这个问题。我不确定我在哪个序列中做了下面的操作,但是看起来以下的一些操作会有所帮助:

  1. Turn ON the following on 'Turn Windows Features on or off' a) .Net Framework 3.5 - WCF HTTP Activation and Non-Http Activation b) all under WCF Services (as specified in one of the answers to this question)

    a) .Net Framework 3.5 - WCF HTTP激活和非HTTP激活b)都在WCF服务下(如问题的一个答案所示)

  2. executed "ServiceModelReg.exe –i" in "%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\" folder

    “ServiceModelReg执行。在"%windir%\ microsoft.\ net Framework\v3.0\Windows通讯基础\"文件夹中的exe -i "

  3. Registered ASP.NET 2.0 via two commands ( in folder C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727):

    注册的ASP。NET 2.0通过两个命令(在文件夹C:\WINDOWS\ Microsoft.NET \ Framework \ v2.0.50727):

    aspnet_regiis -ga "NT AUTHORITY\NETWORK SERVICE" aspnet_regiis -iru

    aspnet_regiis -ga“NT AUTHORITY\网络服务”aspnet_regiis -iru

  4. Restarted PC... it looks like as a result as actions ## 3 and 4 something got broken in my ASP.NET configuration

    重新启动电脑…它看起来像行动# 3和4在我的ASP中被破坏了。网络配置

  5. Repeat action #2

    重复行动# 2

  6. Install two other options from the "Programs and Features": .Net Framework 4.5 Advanced Services. I checked both sub options: ASP.NET 4.5 and WCF services

    从“程序和特性”中安装另外两个选项:. net Framework 4.5高级服务。我检查了两个子选项:ASP。NET 4.5和WCF服务

  7. Restart App Pool.

    重启应用程序池。

Sequence is kind of crazy, but that helped to me and probably will help to other

顺序有点疯狂,但这对我很有帮助,可能会对其他人有所帮助。

#8


2  

Order of installation matters a lot when configuring IIS 8 on Windows 8 or Windows Server 2012.

在Windows 8或Windows Server 2012上配置IIS 8时,安装顺序非常重要。

I faced lot of issues configuring IIS 8 but finally these links helped me

配置IIS 8时我遇到了很多问题,但最终这些链接帮助了我

#9


1  

using PowerShell you can install the required feature with:

使用PowerShell,您可以安装以下所需的特性:

Add-WindowsFeature 'NET-HTTP-Activation'

#10


1  

On windows 10 (client) you can also script this using

在windows 10(客户端)上,您也可以使用这个脚本

Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName WCF-HTTP-Activation45 -All

Note that this is a different command from the server skus

注意,这是与服务器skus不同的命令

#11


0  

It's HTTP Activation feature of .NET framework Windows Process Activation feature is required too

它是。net框架Windows过程激活特性的HTTP激活特性。

#12


0  

This was a really silly one for me. Adding this here as it's one of the more popular threads on svc 404 issues.

这对我来说真的很傻。在这里添加这个,因为它是svc 404问题上比较流行的线程之一。

I had in my Project Settings' \ Web \ Project URL, pasted:

我有在我的项目设置' \ Web \项目URL,粘贴:

http://blah.webservice.local.blahblah.com/Blah.svc

And for some unknown reason (having done this a thousand times) didn't spot straight away that the name of the .svc file was at the end.

由于某些未知的原因(已经这样做了一千次),并没有立即指出.svc文件的名称在末尾。

DOH!

哎!

I had just pasted the address from my WCF test client and hadn't checked it sufficiently. What this did in the background was create an IIS application at the .svc address and I was getting nothing out of IIS. I couldn't work out how I couldn't even hit the .svc file.

我刚刚从WCF测试客户端粘贴了地址,没有充分检查它。在后台做的是在。svc地址创建一个IIS应用程序,而我没有从IIS中得到什么。我搞不懂怎么连。svc文件都打不进去。

Simple fix, obviously, just remove the application in IIS and change the project URL.

很明显,只需删除IIS中的应用程序并更改项目URL。

After almost 20 years at this, you can still make schoolboy errors / rookie mistakes. Hope this helps someone.

在这样做了将近20年之后,你仍然可以犯小学生的错误/新手的错误。希望这可以帮助别人。

#1


496  

More specifically:

更具体地说:

  1. Run Server Manager (on task bar and start menu)
  2. 运行服务器管理器(在任务栏和开始菜单上)
  3. Choose the server to administer (probably local server)
  4. 选择要管理的服务器(可能是本地服务器)
  5. Scroll down to "Roles and Features" section.
  6. 向下滚动到“角色和特性”部分。
  7. Choose "Add Role or Feature" from Tasks drop down
  8. 从下拉菜单中选择“添加角色或特性”
  9. On "Add Role or Feature Wizard" dialog, click down to "Features" in list of pages on the left.
  10. 在“添加角色或特性向导”对话框中,单击左边的页面列表中的“特性”。
  11. Expand ".Net 3.5" or ".Net 4.5", depending on what you have installed. (you can go back up to "roles" screen to add if you don't have.
  12. 扩大”。Net 3.5”或“。Net 4.5",取决于你安装了什么。(如果没有角色,可以回到“roles”屏幕上添加。
  13. Under "WCF Services", check the box for "HTTP-Activation". You can also add non-http types if you know you need them (tcp, named pipes, etc).
  14. 在“WCF服务”下,选中“http -激活”框。如果知道需要非http类型(tcp、命名管道等),也可以添加非http类型。
  15. Click "Install" Button.
  16. 点击“安装”按钮。

#2


196  

I had to enable HTTP Activation in .NET Framework 4.5 Advanced Services > WCF Services

我必须在。net Framework 4.5高级服务> WCF服务中启用HTTP激活

WCF IIS8;*。svc处理程序映射不起作用

#3


39  

turn ON the following on 'Turn Windows Features on or off'

打开以下“打开或关闭窗口功能”

a) .Net Framework 3.5 - WCF HTTP Activation and Non-Http Activation

a) .Net Framework 3.5 - WCF HTTP激活和非HTTP激活

b) all under WCF Services

b)所有在WCF服务下

#4


36  

Windows 8 with IIS8

  • Hit Windows+X
  • 点击Windows + X
  • Select Programs and Features (first item on list)
  • 选择程序和特性(列表中的第一项)
  • Select Turn Windows Features on or off on the left
  • 选择打开或关闭左边的窗口功能
  • Expand .NET Framework 4.5 Advanced Services
  • 扩展。net Framework 4.5高级服务。
  • Expand WCF Services
  • 扩大WCF服务
  • Enable HTTP Activation
  • 启用HTTP激活

#5


27  

I prefer to do this via a script nowadays

我现在更喜欢通过脚本来做这件事

REM install the needed Windows IIS features for WCF
dism /Online /Enable-Feature /FeatureName:WAS-WindowsActivationService
dism /Online /Enable-Feature /FeatureName:WAS-ProcessModel
dism /Online /Enable-Feature /FeatureName:WAS-NetFxEnvironment
dism /Online /Enable-Feature /FeatureName:WAS-ConfigurationAPI
dism /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation
dism /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation45

REM Feature Install Complete
pause

#6


10  

We managed to solve the error under Windows Server 2012 by:

我们成功地解决了Windows Server 2012的错误:

  1. Removing from "Remove Roles and Features Wizard" .NET Framework 4.5 Features/ASP.NET 4.5 and all its dependent features
  2. 删除“删除角色和特性向导”。net Framework 4.5特性/ASP。NET 4.5及其所有相关特性
  3. Re-installing the removed features.
  4. 重新删除功能。

It seams the order of installation is the cause.

它的接缝顺序是安装的原因。

Also, make sure you have HTTP Activation installed under WCF Services.

另外,请确保在WCF服务下安装了HTTP激活。

#7


3  

For Windows 8 machines there is no "Server Manager" application (at least I was not able to find it).

对于Windows 8机器,没有“服务器管理器”应用程序(至少我找不到它)。

Though I was able to resolve the problem. I'm not sure in which sequence I did the following operations but looks like one/few of following actions help:

虽然我能解决这个问题。我不确定我在哪个序列中做了下面的操作,但是看起来以下的一些操作会有所帮助:

  1. Turn ON the following on 'Turn Windows Features on or off' a) .Net Framework 3.5 - WCF HTTP Activation and Non-Http Activation b) all under WCF Services (as specified in one of the answers to this question)

    a) .Net Framework 3.5 - WCF HTTP激活和非HTTP激活b)都在WCF服务下(如问题的一个答案所示)

  2. executed "ServiceModelReg.exe –i" in "%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\" folder

    “ServiceModelReg执行。在"%windir%\ microsoft.\ net Framework\v3.0\Windows通讯基础\"文件夹中的exe -i "

  3. Registered ASP.NET 2.0 via two commands ( in folder C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727):

    注册的ASP。NET 2.0通过两个命令(在文件夹C:\WINDOWS\ Microsoft.NET \ Framework \ v2.0.50727):

    aspnet_regiis -ga "NT AUTHORITY\NETWORK SERVICE" aspnet_regiis -iru

    aspnet_regiis -ga“NT AUTHORITY\网络服务”aspnet_regiis -iru

  4. Restarted PC... it looks like as a result as actions ## 3 and 4 something got broken in my ASP.NET configuration

    重新启动电脑…它看起来像行动# 3和4在我的ASP中被破坏了。网络配置

  5. Repeat action #2

    重复行动# 2

  6. Install two other options from the "Programs and Features": .Net Framework 4.5 Advanced Services. I checked both sub options: ASP.NET 4.5 and WCF services

    从“程序和特性”中安装另外两个选项:. net Framework 4.5高级服务。我检查了两个子选项:ASP。NET 4.5和WCF服务

  7. Restart App Pool.

    重启应用程序池。

Sequence is kind of crazy, but that helped to me and probably will help to other

顺序有点疯狂,但这对我很有帮助,可能会对其他人有所帮助。

#8


2  

Order of installation matters a lot when configuring IIS 8 on Windows 8 or Windows Server 2012.

在Windows 8或Windows Server 2012上配置IIS 8时,安装顺序非常重要。

I faced lot of issues configuring IIS 8 but finally these links helped me

配置IIS 8时我遇到了很多问题,但最终这些链接帮助了我

#9


1  

using PowerShell you can install the required feature with:

使用PowerShell,您可以安装以下所需的特性:

Add-WindowsFeature 'NET-HTTP-Activation'

#10


1  

On windows 10 (client) you can also script this using

在windows 10(客户端)上,您也可以使用这个脚本

Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName WCF-HTTP-Activation45 -All

Note that this is a different command from the server skus

注意,这是与服务器skus不同的命令

#11


0  

It's HTTP Activation feature of .NET framework Windows Process Activation feature is required too

它是。net框架Windows过程激活特性的HTTP激活特性。

#12


0  

This was a really silly one for me. Adding this here as it's one of the more popular threads on svc 404 issues.

这对我来说真的很傻。在这里添加这个,因为它是svc 404问题上比较流行的线程之一。

I had in my Project Settings' \ Web \ Project URL, pasted:

我有在我的项目设置' \ Web \项目URL,粘贴:

http://blah.webservice.local.blahblah.com/Blah.svc

And for some unknown reason (having done this a thousand times) didn't spot straight away that the name of the .svc file was at the end.

由于某些未知的原因(已经这样做了一千次),并没有立即指出.svc文件的名称在末尾。

DOH!

哎!

I had just pasted the address from my WCF test client and hadn't checked it sufficiently. What this did in the background was create an IIS application at the .svc address and I was getting nothing out of IIS. I couldn't work out how I couldn't even hit the .svc file.

我刚刚从WCF测试客户端粘贴了地址,没有充分检查它。在后台做的是在。svc地址创建一个IIS应用程序,而我没有从IIS中得到什么。我搞不懂怎么连。svc文件都打不进去。

Simple fix, obviously, just remove the application in IIS and change the project URL.

很明显,只需删除IIS中的应用程序并更改项目URL。

After almost 20 years at this, you can still make schoolboy errors / rookie mistakes. Hope this helps someone.

在这样做了将近20年之后,你仍然可以犯小学生的错误/新手的错误。希望这可以帮助别人。