WCF used as service reference: how do it? - c#

I've my RESTful service hosted here .
I can use it perfectly with get&post http request.
How can I use as "service reference" in a Visual Studio project? I have added it in my test project and I see the methods correctly, but, when I try to call on of them, I get the "could not find default endpoint element that references contract in the servicemodel client" error, with http code 404.
So, I'm trying to modify my web.config file, but I get only different errors. For example, now I have try to add a SOAP endpoint,but I get a "bad request" error.
This is one of my methods (they are defined in the same way)
[OperationContract]
[WebGet(UriTemplate = "impianto.json?retista={codret}&storeID={storeID}&H={hashedString}", ResponseFormat = WebMessageFormat.Json)]
List<WrapImpianti> GetImpiantoJSON(string codret, string storeID, string hashedString);
and this is the web.config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="ServerAddress" value="37.59.146.241:8099/isOverviewExport.svc" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<system.serviceModel>
<services>
<service name="isOverviewExport.Service1" behaviorConfiguration="MyBehavior">
<endpoint address="soap" behaviorConfiguration="soapBehavior" binding="basicHttpBinding" name="s" contract="isOverviewExport.isOverviewExport"/>
<endpoint address="rest" behaviorConfiguration="restBehavior" binding="webHttpBinding" name="base" contract="isOverviewExport.isOverviewExport">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="SecurityByTransport" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" />
</security>
</binding>
</webHttpBinding>
</bindings>
<extensions>
<behaviorExtensions>
<add name="CorsSupport" type="WebHttpCors.CorsSupportBehaviorElement, WebHttpCors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</behaviorExtensions>
</extensions>
<behaviors>
<endpointBehaviors>
<behavior name="restBehavior">
<!--<enableWebScript/>-->
<webHttp helpEnabled="true" />
<CorsSupport />
</behavior>
<behavior name="soapBehavior">
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="MyBehavior">>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="123456" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
</system.serviceModel>
<system.webServer>
<directoryBrowse enabled="true" />
</system.webServer>
<connectionStrings>
<add name="Entities" connectionString="metadata=res://*/AccessData.Model.csdl|res://*/AccessData.Model.ssdl|res://*/AccessData.Model.msl;provider=System.Data.SqlClient;provider connection string="data source=myds;initial catalog=mydb;persist security info=True;user id=myuser;password=mypwd;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
You can also try yourself adding the service reference (the link is the same as above, http://37.59.146.241:8097/isOverviewExport.svc ). Why the second line of this snippet gives me the error I wrote above?
var svc = new ServiceReference5.isOverviewExportClient();
var ret = svc.GetImpiantoXML("123456", "AAA111", "test");
So, how can I use it as service reference in VS? I was thinking I have to set the soap endpoint, but maybe it isn't correct. Can you help me? :)

Related

Buffer exceeded limit WCF despite adding maRecievedMessageSize attribute to binding element

I keep getting this error when debugging my WCF service in VS17
Buffer Exceeded limit error picture
However, I have gone through all of this before and it was working up until I re-installed VS. I double checked to make sure I was connected to my database in the ServerWindow and I definitely have the buffer set to more than 65536.
[EDIT] Also I have checked the client projects I have built that are referencing and consuming this service, just in case, they are all set to the same endpoint as is detailed in this app.config and their buffer sizes are set the same as this service as well.
Here is my app.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<system.web>
<compilation debug="true" />
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider"
type="System.Web.ClientServices.Providers.
ClientFormsAuthenticationMembershipPro vider, System.Web.Extensions,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider"
type="System.Web.ClientServices.Providers.ClientRoleProvider,
System.Web.Extensions, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>
<!-- When deploying the service library project, the content of the config
file must be added to the host's
app.config file. System.Configuration does not support config files for
libraries. -->
<system.serviceModel>
<services>
<service name="MBM.Services.MBMExtClientService">
<endpoint address="" binding="basicHttpBinding"
contract="MBM.Services.IMBMExtClientService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add
baseAddress="http://localhost:8733/Design_T
ime_Addresses/MBMServices/MBMExtClientService/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />
<!-- To receive exception details in faults for debugging
purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="LargeBuffer" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>

RESTful windows authentication

I've set up a RESTful WCF web service on our server (IIS 8.5 running on Windows Server 2012 R2). I can connect remotely and run exposed methods no problem.
I get a problem when the method contains a connection to a database. Despite having windows authentication set up in IIS, the username passed through to the database is defaulting to the machine default, which is wrong.
I'm currently using this web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<identity impersonate="true"/>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" />
</system.web>
<system.serviceModel>
<services>
<service name="AriaRestFul2.Service1" behaviorConfiguration="AriaRestFul2.Service1Behavior">
<endpoint address="../Service1.svc" binding="webHttpBinding" contract="AriaRestFul2.IService1" behaviorConfiguration="webBehaviour" bindingConfiguration="restbinding">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="webHttpBinding" contract="IMetadataExchange" bindingConfiguration="restbinding"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="AriaRestFul2.Service1Behavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="webBehaviour">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<webHttpBinding>
<binding name="restbinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows"/>
</security>
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
<system.webServer>
<httpErrors errorMode="Detailed" />
<modules runAllManagedModulesForAllRequests="true" />
<validation validateIntegratedModeConfiguration="false"/>
<directoryBrowse enabled="true" />
</system.webServer>
<connectionStrings>
<add name="AriaEntities" connectionString="metadata=res://*/Aria.csdl|res://*/Aria.ssdl|res://*/Aria.msl;provider=System.Data.SqlClient;provider connection string="data source=<instance>;initial catalog=Aria;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
The database I'm connecting to is through EF6. I'm using chrome as the client to pass in the URL to the service. I'm worried that this setup might require the credentials to be assigned in code in a client. If this is the case, is there anyway I can configure the service to just pass through the current user from the browser?

IIS 7 ERR_CONNECTION_TIMED_OUT only with public IP

I'm working with WCF on IIS 7.
Previously, I have done a WCF library and set it to work on IIS 7. It works well, also if I use it with our public IP.
Then, I have done a WCF application and set it to work on the same IIS 7. The address is the same, the difference is in the port. This WCF works when I call it with the internal IP, but is I use the external IP, I get a timed out error.
You can try yourself, this is the pubblic address:
http://77.108.40.77:8096/
(if you put 8095 as port, it works).
Why am I getting this? (ERR_CONNECTION_TIMED_OUT)
This is my web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.``0, Culture=neutral, ``PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<system.serviceModel>
<services>
<service name="MultipayOnline.Service1" >
<!--bindingConfiguration="SecurityByTransport"-->
<!--<endpoint address="" binding="basicHttpBinding" bindingConfiguration="SecurityByTransport" name="base" contract="CardServiceLib.ICardService">-->
<endpoint address="" name="base"
behaviorConfiguration="restBehavior"
binding="webHttpBinding"
contract="MultipayOnline.IMultiPOService" >
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="SecurityByTransport" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" >
<readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic"/>
</security>
</binding>
</webHttpBinding>
</bindings>
<extensions>
<behaviorExtensions>
<add name="CorsSupport" type="WebHttpCors.CorsSupportBehaviorElement, WebHttpCors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</behaviorExtensions>
</extensions>
<behaviors>
<endpointBehaviors>
<behavior name="restBehavior">
<!--<enableWebScript/>-->
<webHttp helpEnabled="true"/>
<CorsSupport />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="123456" />
</behavior>
<!--<behavior name="customBehavior">
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="True"/>
<dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="123456" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="MultipayOnline.CustomPass, MultipayOnline"/>
</serviceCredentials>
</behavior>-->
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<!--
Per sfogliare la directory radice dell'applicazione Web durante il debug, impostare il valore riportato sotto su true.
Impostarlo su false prima della distribuzione per evitare di diffondere informazioni sulla cartella dell'applicazione Web.
-->
<directoryBrowse enabled="true" />
<!--<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>-->
</system.webServer>
<connectionStrings><add name="isMultiPayOnLineEntities" connectionString="..." providerName="System.Data.EntityClient" /> </connectionStrings>
Can you help me? Can I post something to you for make clearer the trouble?
I think your port is closed .Check your IP and Port in http://ping.eu/port-chk/ if its status is closed then this msg will be shown . Plz open this Port to solve this problem..

WCF Security Mode TransportWithMessageCredential

I've not a WCF service running as a windows service that I've converted to use the Custom UserNamePasswordValidator.
This all worked perfectly on the original setting of SecurityMode = "Transport".
However the only problem is that none of the faultexceptions would come back correctly.
I guessed this was because it needs to be a security mode of TransportWithMessageCredential.
The problem I have is when I set the security mode to be TransportWithMessageCredential the UserNamePasswordValidator validate method is now not hit.
Below is my app.config. Any advice would be greatly appreciated.
Thanks.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<connectionStrings>
<!-- hidden -->
</connectionStrings>
<system.serviceModel>
<services>
<service name="ThisApp.Global.Service.ServiceImpl" behaviorConfiguration="serviceBehaviour">
<host>
<baseAddresses>
<add baseAddress="https://testapi.ThisApp.com" />
</baseAddresses>
</host>
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="ThisApp.Global.Service.IServiceImpl" />
</service>
</services>
<!--WCF Service Binding Configurations-->
<bindings>
<wsHttpBinding>
<binding name="TransportSecurity">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehaviour">
<serviceMetadata httpGetEnabled="False" httpsGetEnabled="True" />
<serviceDebug includeExceptionDetailInFaults="True"/>
<serviceAuthorization principalPermissionMode="Custom">
<authorizationPolicies>
<add policyType="ThisApp.Global.Service.Security.AuthorizationPolicy, ThisApp.Global.Service" />
</authorizationPolicies>
</serviceAuthorization>
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="ThisApp.Global.Service.Security.CustomUserNameValidator, ThisApp.Global.Service" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.diagnostics>
<trace autoflush="true" indentsize="2">
<listeners>
<add name="myListener"
type="System.Diagnostics.EventLogTraceListener"
initializeData="ThisApp Global API" />
</listeners>
</trace>
</system.diagnostics>
</configuration>
You need to include transport in the binding security section, thus:
<binding name="TransportSecurity">
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName" />
<transport clientCredentialType="Basic" />
</security>
</binding>

Ajax Enabled WCF service with Windows Authentication works on Local But not when Hosted

I have a WCF ajax enabled web service that uses Windows Authentication, when I run the application on my local PC it works perfectly, but when I host it does not want to pass through the client credentials to the service.
I keep getting this error:
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
I believe I have included all the necessary configuration but I am not sure.
My Web Config:
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<system.web>
<authentication mode="Windows"/>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
</compilation>
</system.web>
<connectionStrings>
<add name="reportEntities" connectionString="metadata=res://*/Entities.TNTReport.csdl|res://*/Entities.TNTReport.ssdl|res://*/Entities.TNTReport.msl;provider=System.Data.SqlClient;provider connection string="data source=UECZATNT02;initial catalog=report;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
<!--<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="PassThrough">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="TNTQueryEngine.Services.InformationServicesAspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
<services>
<service name="TNTQueryEngine.Services.InformationServices">
<endpoint address="" behaviorConfiguration="TNTQueryEngine.Services.InformationServicesAspNetAjaxBehavior"
binding="webHttpBinding" contract="TNTQueryEngine.Services.InformationServices" />
</service>
</services>
</system.serviceModel>-->
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="MyBindingForWindowsAuth">
<security mode="TransportCredentialOnly">
<!-- For Ntlm to work do => IIS right click Win Auth => Providers => Move NTLM up -->
<transport clientCredentialType="Windows" />
</security>
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceTypeBehaviors" >
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceAuthorization principalPermissionMode="UseAspNetRoles" impersonateCallerForAllOperations="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="XYZ">
<enableWebScript />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="TNTQueryEngine.Services.InformationServices" behaviorConfiguration="MyServiceTypeBehaviors">
<endpoint address="" binding="webHttpBinding" bindingConfiguration="MyBindingForWindowsAuth"
contract="TNTQueryEngine.Services.InformationServices" behaviorConfiguration="XYZ" />
<endpoint address="mex" binding="webHttpBinding" bindingConfiguration="MyBindingForWindowsAuth" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
My WCF Service with 1 Method:
namespace TNTQueryEngine.Services
{
[ServiceContract(Namespace = "InfoServices")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class InformationServices
{
reportEntities RP = new reportEntities();
[OperationContract, WebGet(ResponseFormat = WebMessageFormat.Json)]
[OperationBehavior(Impersonation = ImpersonationOption.Required)]
public List<Receiving> GETReceiving(DateTime DATE)
{
return (from SS in RP.spQueryEngineGETReceivingSummary(DATE)
where SS.QTY > 0
select new Receiving
{
ReceivedDate = DATE,
Model = SS.Model,
Qty = (int)SS.QTY
}
).ToList();
}
}
}
Really not sure what could be going wrong. Thanks in advance for the assistance

Categories