Hi,
I am building on a dnn 6.0 C# webforms website using .NET 4.0.
I am hosting a WCF Restful service (without a svc file) within the application with the following settings in the Web.config.:
targetFramework="4.0"
aspNetCompatibilityEnabled = true
runAllManagedModulesForAllRequests="true"
<standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true"/>
<validation validateIntegratedModeConfiguration="false"/>
The service methods are then invoked using the WebInvoke and WebGet annotations.
This setup works perfectly fine when running from within VS2010 and I am able to login to the site and also call the RESTful service methods.
But the exact same website in localhost environment using IIS 7(application pool - integrated .NET v4.0.30319) does not allow me to log into the website, but the service methods remain functional. The error message says
"Endpoint not found. Please see the service help page for constructing valid requests to the service." and the details of my service methods are displayed.
**This leads me to believe that for some reason the SQL membership call is trying to find its target method in my web service methods.**
So I tried routing only my particular request for the service methods in order to ignore the other requests as below, which was ineffective as well:
routes.Ignore("{resource}.axd/{*pathInfo}");
System.Web.Routing.RouteTable.Routes.Add("/Register", new System.ServiceModel.Activation.ServiceRoute("", new System.ServiceModel.Activation.WebServiceHostFactory(), typeof(ServicesProject.Services)));
System.Web.Routing.RouteTable.Routes.Add("/Person({id})", new System.ServiceModel.Activation.ServiceRoute("", new System.ServiceModel.Activation.WebServiceHostFactory(), typeof(ServicesProject.Services)));
When I turn runAllManagedModulesForAllRequests="**false**" then I can log into the website but the web service methods turn dysfunctional.
Thus, I now want to detect the particular requests from aspnet_membership control in DNN so that I can explicitly add the URL to the list of "ignore routes" so that it does not try to look for the target method in the webservice methods.
Please point it out if there is a fundamental misunderstanding regarding the root cause of the problem.
Kindly clarify why there is a difference in the execution of the same application in VS2010 and IIS 7?
Please help me detect and aspnet_membership requests and add them to ignore routes list.
Any help will be deeply appreciated.
Thanks!