If AspNetCompatibilityEnabled is set to true, then all of service classes must have AspNetCompatibilityRequirements. and this mode could be allowed or required. On the other hand if you hosted your service in IIS then you might create separate virtual app
that requires asp.net compatibility mode.
As you mentioned that the service stops working after you enable the ASP.NET Compatbility mode, then what is the error you get? Since you have turned on "includeExceptionDetailInFaults" option in the service behavior, you should be able to get the detailed
error info. In addition, you can use the WCF Tracing at server-side to see if there is any further error info you can captured there:
for general troubleshooting, you can also do a simple test by creating a new WCF service(with the same configuration setings as the error one) but do not include any detailed code logic to see if it works. This could help determine if the problem is related
to your service's operation code which might has something wrong when enabling ASP.NET compattiblity mode.
One thing mentioned in the following document is that when using ASP.NET compatiblity mode for WCF service hosted in IIS 7, we cannot expose non-HTTP protocol based WCF endpoints in the service. Is there any non-http endpoint in your case?
BTw, if there is error occuring when the IIS application pool trys to start, you can also check the windows eventlog (under Applications category) to see if there is any related errors .
lommez
0 Points
5 Posts
WCF Service Doesnt Work When aspNetCompatibilityEnabled="true"
May 02, 2012 12:36 PM|LINK
Hi,
When i set the aspNetCompatibilityEnabled to true, my WCF service doesn't work anymore.
Anyone knows why?
Here is my service declaration:
Here is my webconfig:
Any tips?
Thanks
ammasbhatti
Member
124 Points
22 Posts
Re: WCF Service Doesnt Work When aspNetCompatibilityEnabled="true"
May 02, 2012 08:53 PM|LINK
If AspNetCompatibilityEnabled is set to true, then all of service classes must have AspNetCompatibilityRequirements. and this mode could be allowed or required. On the other hand if you hosted your service in IIS then you might create separate virtual app that requires asp.net compatibility mode.
Read this link for reference to understand this.
http://blogs.msdn.com/b/wenlong/archive/2006/01/23/516041.aspx
Hope this could help you to develop a basic understanding.
Steven Cheng...
Contributor
4199 Points
548 Posts
Microsoft
Moderator
Re: WCF Service Doesnt Work When aspNetCompatibilityEnabled="true"
May 03, 2012 02:47 AM|LINK
Hi lommez,
As you mentioned that the service stops working after you enable the ASP.NET Compatbility mode, then what is the error you get? Since you have turned on "includeExceptionDetailInFaults" option in the service behavior, you should be able to get the detailed error info. In addition, you can use the WCF Tracing at server-side to see if there is any further error info you can captured there:
#Service Trace Viewer Tool (SvcTraceViewer.exe) h
ttp://msdn.microsoft.com/en-us/library/ms732023.aspx
for general troubleshooting, you can also do a simple test by creating a new WCF service(with the same configuration setings as the error one) but do not include any detailed code logic to see if it works. This could help determine if the problem is related to your service's operation code which might has something wrong when enabling ASP.NET compattiblity mode.
Feedback to us
Microsoft One Code Framework
lommez
0 Points
5 Posts
Re: WCF Service Doesnt Work When aspNetCompatibilityEnabled="true"
May 03, 2012 11:45 AM|LINK
Hi Steven,
When i set to true, i got a "404 Not Found. The requested document was not found on this server. "
Thanks about the Service Trace Viewer, i will try to use it and find out what is happening to my service.
Best regards,
Marcos Lommez
Steven Cheng...
Contributor
4199 Points
548 Posts
Microsoft
Moderator
Re: WCF Service Doesnt Work When aspNetCompatibilityEnabled="true"
May 04, 2012 08:29 AM|LINK
Hi Lommez,
One thing mentioned in the following document is that when using ASP.NET compatiblity mode for WCF service hosted in IIS 7, we cannot expose non-HTTP protocol based WCF endpoints in the service. Is there any non-http endpoint in your case?
#WCF Services and ASP.NET
http://msdn.microsoft.com/en-us/library/aa702682.aspx
BTw, if there is error occuring when the IIS application pool trys to start, you can also check the windows eventlog (under Applications category) to see if there is any related errors .
Feedback to us
Microsoft One Code Framework