尝试访问WCF服务时出错(Error trying to access WCF Service)

问题已得到修复 遵循MSDN教程 - 我使用Northwind数据库创建并访问了WCF服务。 使用不同的数据,我遵循相同的过程:定义我的ADO.NET实体模型,创建数据服务,并启用对资源的访问,但我收到错误。 网页上的错误仅显示“请求错误”。 我安装了IIS 8.0 Express,两个web.configs都相似,并且启用了WCF服务。

我在InitializeService()上设置了一个断点,但它永远不会击中那个sub。 我不知道从哪里开始。

IIS日志文件

软件:Microsoft Internet Information Services 8.0 版本:1.0 字段:日期时间s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip vcs(User-Agent)cs(Referer)sc-status sc-substatus sc-win32-status花时间2013-09-14 09:47:04 :: 1 GET /tinytrots.svc - 50274 - :: 1 Mozilla / 5.0 + >>(Windows + NT + 6.1)+ AppleWebKit / 537.36 +(KHTML,+ like + Gecko)+ Chrome / 29.0.1547.66 + Safari / 537.36 - > 307 0 0 769 2013-09-14 09:47:04 :: 1 GET /tinytrots.svc/ - 50274 - :: 1 Mozilla / 5.0 +>( Windows + NT + 6.1)+ AppleWebKit / 537.36 +(KHTML,+ like + Gecko)+ Chrome / 29.0.1547.66 + Safari / 537.36 - > 500 0 0 608

IIS TraceLogFiles

ModuleName:ManagedPipelineHandler 通知:EXECUTE_REQUEST_HANDLER HttpStatus:500 HttpReason:内部服务器错误 HttpSubStatus:0 ErrorCode:操作成功完成。(0x0)

活动Viwer

我的应用程序日志显示“指定用于缓存压缩内容的指令C:\ Users \ Me \ AppData \ Local \ Temp \ iisexpress \ ISS临时压缩文件\ Clr4IntegratedAppPool无效。静态压缩正在被禁用。”

数据服务

Public Class tinytrots Inherits DataService(Of TinyTrotsDBEntities) Public Shared Sub InitializeService(ByVal config As DataServiceConfiguration) config.SetEntitySetAccessRule("Activities", EntitySetRights.All) config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3 End Sub End Class

Problem had been Fixed Following a tutorial on MSDN- I created and accessed a WCF services with the Northwind database just fine. With different data, I followed the same process: defined my ADO.NET entity model, created the data service, and enabled access to resources, but I am receiving an error. The error on the webpage only says "Request Error." I have IIS 8.0 express installed, both web.configs are similar, and WCF service is enabled.

I put a break point on InitializeService(), but it never hits that sub. I am not sure where to go from here.

IIS Log file

Software: Microsoft Internet Information Services 8.0 Version: 1.0 Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip vcs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken 2013-09-14 09:47:04 ::1 GET /tinytrots.svc - 50274 - ::1 Mozilla/5.0+>>(Windows+NT+6.1)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/29.0.1547.66+Safari/537.36 -> 307 0 0 769 2013-09-14 09:47:04 ::1 GET /tinytrots.svc/ - 50274 - ::1 Mozilla/5.0+> (Windows+NT+6.1)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/29.0.1547.66+Safari/537.36 - >500 0 0 608

IIS TraceLogFiles

ModuleName: ManagedPipelineHandler Notification: EXECUTE_REQUEST_HANDLER HttpStatus: 500 HttpReason: Internal Server Error HttpSubStatus: 0 ErrorCode: The operation completed successfully.(0x0)

Event Viwer

My Application logs says "The direcoty specified for caching compressed content C:\Users\Me\AppData\Local\Temp\iisexpress\ISS Temporary Compressed Files\ Clr4IntegratedAppPool is invalid. Static compression is being disabled."

The Data Service

Public Class tinytrots Inherits DataService(Of TinyTrotsDBEntities) Public Shared Sub InitializeService(ByVal config As DataServiceConfiguration) config.SetEntitySetAccessRule("Activities", EntitySetRights.All) config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3 End Sub End Class

最满意答案

必须运行此命令才能在IIS中注册所需的脚本映射:>“%WINDIR%\ Microsoft.Net \ Framework \ v4.0.30319 \ ServiceModelReg.exe”-r

http://www.msdn.microsoft.com/en-us/library/ms751527.aspx

http://www.msdn.microsoft.com/en-us/library/ms752252.aspx

Had to run this command to register the required script maps in IIS: >"%WINDIR%\Microsoft.Net\Framework\v4.0.30319\ServiceModelReg.exe" -r

http://www.msdn.microsoft.com/en-us/library/ms751527.aspx

http://www.msdn.microsoft.com/en-us/library/ms752252.aspx

尝试访问WCF服务时出错(Error trying to access WCF Service)

问题已得到修复 遵循MSDN教程 - 我使用Northwind数据库创建并访问了WCF服务。 使用不同的数据,我遵循相同的过程:定义我的ADO.NET实体模型,创建数据服务,并启用对资源的访问,但我收到错误。 网页上的错误仅显示“请求错误”。 我安装了IIS 8.0 Express,两个web.configs都相似,并且启用了WCF服务。

我在InitializeService()上设置了一个断点,但它永远不会击中那个sub。 我不知道从哪里开始。

IIS日志文件

软件:Microsoft Internet Information Services 8.0 版本:1.0 字段:日期时间s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip vcs(User-Agent)cs(Referer)sc-status sc-substatus sc-win32-status花时间2013-09-14 09:47:04 :: 1 GET /tinytrots.svc - 50274 - :: 1 Mozilla / 5.0 + >>(Windows + NT + 6.1)+ AppleWebKit / 537.36 +(KHTML,+ like + Gecko)+ Chrome / 29.0.1547.66 + Safari / 537.36 - > 307 0 0 769 2013-09-14 09:47:04 :: 1 GET /tinytrots.svc/ - 50274 - :: 1 Mozilla / 5.0 +>( Windows + NT + 6.1)+ AppleWebKit / 537.36 +(KHTML,+ like + Gecko)+ Chrome / 29.0.1547.66 + Safari / 537.36 - > 500 0 0 608

IIS TraceLogFiles

ModuleName:ManagedPipelineHandler 通知:EXECUTE_REQUEST_HANDLER HttpStatus:500 HttpReason:内部服务器错误 HttpSubStatus:0 ErrorCode:操作成功完成。(0x0)

活动Viwer

我的应用程序日志显示“指定用于缓存压缩内容的指令C:\ Users \ Me \ AppData \ Local \ Temp \ iisexpress \ ISS临时压缩文件\ Clr4IntegratedAppPool无效。静态压缩正在被禁用。”

数据服务

Public Class tinytrots Inherits DataService(Of TinyTrotsDBEntities) Public Shared Sub InitializeService(ByVal config As DataServiceConfiguration) config.SetEntitySetAccessRule("Activities", EntitySetRights.All) config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3 End Sub End Class

Problem had been Fixed Following a tutorial on MSDN- I created and accessed a WCF services with the Northwind database just fine. With different data, I followed the same process: defined my ADO.NET entity model, created the data service, and enabled access to resources, but I am receiving an error. The error on the webpage only says "Request Error." I have IIS 8.0 express installed, both web.configs are similar, and WCF service is enabled.

I put a break point on InitializeService(), but it never hits that sub. I am not sure where to go from here.

IIS Log file

Software: Microsoft Internet Information Services 8.0 Version: 1.0 Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip vcs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken 2013-09-14 09:47:04 ::1 GET /tinytrots.svc - 50274 - ::1 Mozilla/5.0+>>(Windows+NT+6.1)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/29.0.1547.66+Safari/537.36 -> 307 0 0 769 2013-09-14 09:47:04 ::1 GET /tinytrots.svc/ - 50274 - ::1 Mozilla/5.0+> (Windows+NT+6.1)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/29.0.1547.66+Safari/537.36 - >500 0 0 608

IIS TraceLogFiles

ModuleName: ManagedPipelineHandler Notification: EXECUTE_REQUEST_HANDLER HttpStatus: 500 HttpReason: Internal Server Error HttpSubStatus: 0 ErrorCode: The operation completed successfully.(0x0)

Event Viwer

My Application logs says "The direcoty specified for caching compressed content C:\Users\Me\AppData\Local\Temp\iisexpress\ISS Temporary Compressed Files\ Clr4IntegratedAppPool is invalid. Static compression is being disabled."

The Data Service

Public Class tinytrots Inherits DataService(Of TinyTrotsDBEntities) Public Shared Sub InitializeService(ByVal config As DataServiceConfiguration) config.SetEntitySetAccessRule("Activities", EntitySetRights.All) config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3 End Sub End Class

最满意答案

必须运行此命令才能在IIS中注册所需的脚本映射:>“%WINDIR%\ Microsoft.Net \ Framework \ v4.0.30319 \ ServiceModelReg.exe”-r

http://www.msdn.microsoft.com/en-us/library/ms751527.aspx

http://www.msdn.microsoft.com/en-us/library/ms752252.aspx

Had to run this command to register the required script maps in IIS: >"%WINDIR%\Microsoft.Net\Framework\v4.0.30319\ServiceModelReg.exe" -r

http://www.msdn.microsoft.com/en-us/library/ms751527.aspx

http://www.msdn.microsoft.com/en-us/library/ms752252.aspx