Last post Oct 16, 2017 03:20 AM by Edward Z
Oct 11, 2017 12:12 PM|kodnil|LINK
I have created WCF data service Framework 4.6.1 and EF6. I am getting below error when i try to publish the service. Appreciate your inputs as i am new to this:
Operation 'ProcessRequestForMessage' in contract 'IRequestHandler' specifies Method '*' on the WebGetAttribute/WebInvokeAttribute, but the only allowed values for Method are GET or POST. Other values are not supported by 'System.ServiceModel.Description.WebScriptEnablingBehavior'.
My code looks like:
[ServiceBehavior(IncludeExceptionDetailInFaults = true)]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class MyService : DataService<ObjectContext>
public static void InitializeService(IDataServiceConfiguration config)
config.UseVerboseErrors = true;
protected override ObjectContext CreateDataSource()
var context = new RegistryContext();
var objectContext = ((IObjectContextAdapter)context).ObjectContext;
objectContext.ContextOptions.ProxyCreationEnabled = false;
Config file looks like:
<endpoint address="" behaviorConfiguration="Services.MyServiceAspNetAjaxBehavior"
binding="webHttpBinding" contract="System.Data.Services.IRequestHandler" />
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<add binding="basicHttpsBinding" scheme="https" />
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
Oct 12, 2017 06:49 AM|Edward Z|LINK
How did you create WCF Data Service? Could you share us a simple demo which could reproduce your issue?
For your code, it is WCF Data Service, for web.config, it seems to be WCF Rest Service. Did you combine Data Service and Rest Service in the same project?
For a general WCF Rest Service, you could specify “*” on Method, but you could not set it as “*” while you add “<enableWebScript />”. If you need “*”, you need to remove “<enableWebScript />”. If you need “<enableWebScript />”, you need to replace “*” with
Oct 12, 2017 08:42 AM|kodnil|LINK
I used "WCF Service(Ajax Enabled)" in VS 2017 to create WCF Data Service as i did not find specific template for the same. When i removed <enableWebScript />, my this particular error has gone and getting new error about SQL connection which
i think will require different troubleshooting. My question to you : Is it ok if i Remove <enableWebScript /> and use it as WCF data service OR i have to make additional changes to make it work?
Oct 13, 2017 05:20 AM|Edward Z|LINK
>>Is it ok if i Remove <enableWebScript /> and use it as WCF data service OR i have to make additional changes to make it work?
It seems you want to develop WCF Data Service, there is no template for WCF Data Service, you could create a web application, and then add WCF Data Service by adding New Item.
You could follow below link for how to create WCF Data Service.
# Creating the Data Service
Oct 13, 2017 12:14 PM|kodnil|LINK
I tried the steps as per the article. still no luck. I dont see WCF Data Service Template
Oct 16, 2017 03:20 AM|Edward Z|LINK
Do you make a test with VS 2015 or VS 2017? It does not exist under VS 2017.