WCF / ASMX :: Data Contract Not Coming Up On Client?

Jul 20, 2010

I have just created my first WCF service and by default it has a datacontract named "Composite type" in it. I tried adding another one but i can't see it in the client application. I have already done update web reference on my client.

Code of the data contract is below.

<ServiceContract()> _
Public Interface IDocumentService
<OperationContract()> _
<FaultContract(GetType(FaultException))> _

[Code]....

View 1 Replies


Similar Messages:

WCF / ASMX :: Data Contract Used As Fault Not Available On Client?

Jul 20, 2010

why the class named "MyFaultException" is not available on my client code.Imports System.Runtime.Serialization

<ServiceContract()> _
Public Interface IDocumentService
<OperationContract()> _

[code]...

View 1 Replies

WCF / ASMX :: Exposing Data Contract Without Passing As Input Or Output Parameter For Any Operation Contract?

Sep 21, 2010

I have a method in wcf which returns stream of custom object. I need to deserialize this stream at client side, but my custom class which is exposed as data contract is not visible through client proxy. When I add a dummy operation contract which returns the custome object I am able to get this custom class. I dont want to write this dummy method as there are many such custom classes.

Is there any way to expose data contract without writing any operation contract that returns or accepts data contract type object?

View 1 Replies

WCF / ASMX :: Difference Between Message Contract And Data Contract ?

Jul 18, 2010

Can some explain me the difference between Message Contract and DataContract .i'm new to wcf.. so please give the brief explanation or provide me some code snippets

View 3 Replies

WCF / ASMX :: Data Contract (consume By Sliverlight Application)

Oct 20, 2010

I have a lot confusion on data contract .I think Data contract will create according to the Service contract and Data Base Table. For Example Let say i have service contract and i have three table product,order,customer

[ServiceContract]
public interface IMembersService
{
[OperationContract]
void insertProductDetails(clsProduct objProduct);
//What about the return type can we make it bool
[OperationContract]
List<clsProduct> getproductInfoByID(int id);
[OperationContract]
List<clsProduct> getproductInfo();
//========================================
[OperationContract]
void insertOrderDetails(clsOrder objOrder);
//What about the return type can we make it bool
[OperationContract]
List<clsOrder> getOrderInfoByID(int id);
[OperationContract]
List<clsOrder> getOrderInfo();
//========================================
[OperationContract]
void insertCustomerDetails(clsOrder objOrder);
//What about the return type can we make it bool
[OperationContract]
List<clsOrder> getCustomerInfoByID(int id);
[OperationContract]
List<clsOrder> getCustomerInfo();
}

For this case can i create three datacontact clsProduct,clsOrder,clsCustomer .i mean data contact depends on ther service contact and the table.

View 1 Replies

WCF / ASMX :: Contract / Method To Consume Many Database Records?

Mar 15, 2011

What is the best way to create a Contract that will consume multiple database records? The database records will have 20 fields and maximun of 1000 rows.

View 1 Replies

WCF / ASMX :: Convert WSDL File To Service Contract Interface?

Feb 15, 2011

I would like to convert WSDL file to Service Contract Interface (WCF).

View 1 Replies

WCF / ASMX :: Webpart - Could Not Find Default Endpoint Element That References Contract

Mar 28, 2011

i am trying to call a webmethod from a webservice within a webpart-project and just cant instanciate the class within my webservice. CongressDataExternalSoapClient wsSAP = new CongressDataExternalSoapClient(); at this line i get the following error message: Could not find default endpoint element that references contract 'com.miltenyibiotec.webservice.congress.CongressDataExternalSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application...

attention should be paid to "SoapClient" at the end of my Class-Name: "CongressDataExternal". VS cannot find the Web-Class CongressDataExternal. in other ASP.NET-Projects, its possible... but not here!!! so the only class i can see is the CongressDataExternalSoapClient. i can also see the interfaces CongressDataExternalSoap and CongressDataExternalSoapChannel. i have already added the needed entries to the webconfig:

<applicationSettings>
<Miltenyi.Complaints.Sharepoint.Properties.Settings>
<setting name="Miltenyi_Complaints_SharePoint_com_miltenyibiotec_webservice_congress_CongressDataExternal" serializeAs="String">
<value>http://webservice.miltenyibiotec.com/CongressDataExternal.asmx</value>
</setting>
</Miltenyi.Complaints.Sharepoint.Properties.Settings>
</applicationSettings>
...
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="Miltenyi.Complaints.Sharepoint.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
...
</configSections>

Miltenyi.Complaints.Sharepoint is the namespace of my sharepoint webpart project. and this entry is in my settings: Name: Miltenyi_Complaints_SharePoint_com_miltenyibiotec_webservice_congress_CongressDataExternal
Type: Webservice URL Scope: App Value: URL to my webservice... what am i doing wrong here?

View 3 Replies

WCF / ASMX :: How To Provide Security / Cleared All The Binding,Endpoint,Contract Concepts

Aug 10, 2010

How I provide Security In wcf . I have Cleared All the binding,Endpoint,Contract Concepts.

View 4 Replies

WCF / ASMX :: Adding A New Contract To Existing Service Error - The Underlying Connection Was Closed

Feb 26, 2011

I have a WCF service which has 4 Operation contracts.

I have added a new contract and it gets the data from database and returns the result set.

I can access the new contract and the service get the correct result set. But while passing the result set to the client I get the error of The underlying connection was closed: The connection was closed unexpectedly.

What are the steps to follow after adding a new contract like new binding etc.

View 3 Replies

WCF / ASMX :: IIS Memory Increasing For Each Client Request In Asmx Web Service?

Nov 8, 2010

A customer reported that our asmx web service is continually increasing in memory (mem usage as well as private bytes). We are able to reproduce the problem in our lab with Windows 2003 Server SP2 (fully patched) on some of the machines. The customer is using Windows 2008.

We created a Hello World web service targeting the 2.0 framework built under VS2005 SP1 and a test client that continues to call it. The memory increases steadily - approximately 40K per client request. If the test app is paused, the memory remains the same. When it is closed, the memory drops. Explicit calling of GC.Collect does not drop the memory.

We have run the memory profiler on the service and the leak is all native memory. We have uninstalled/re-installed the Framework on one of the machines but no difference. To our knowledge all of the security and IIS settings are not modified. We have compared app pool, default web site and virtual directory properties to machines that have no problem and they are identical.

View 11 Replies

WCF / ASMX :: Consume Data Service In Client Application

Sep 7, 2010

I am working on WCF Data service which imported stored procedure, as below.

[WebGet]
public List<GetMTSearchResultTest_Result> GettMTSearchResultTest()
{
MediaMarketResearch_PRODEntities ent = new MediaMarketResearch_PRODEntities();
return ent.GetMTSearchResultTest().ToList();
}

when i consuming this in my client application it says error as "The closed type MMRClient.MMRServiceReference.GetMTSearchResultTest_Result does not have a corresponding element settable property." I am getting this error while bind to the grid view as below.

DataServiceContext context = new DataServiceContext(new [URL])); IEnumerable<GetMTSearchResultTest_Result> empResult = context.Execute<GetMTSearchResultTest_Result>(new Uri [URL];

GridView1.DataSource = empResult;
GridView1.DataBind();

Note: I imported this stored proc as complex type.

View 1 Replies

WCF / ASMX :: Webservice To Import Data From Client Side

Apr 28, 2010

I want to build a webservice that has to get some data as parameter from the client application. the data from the client side are records from there database. my websercie has to send then these data to a soap server through 'HttpWebRequest'. Can i get the data as Datatable? and then send as stream to the soap server? Or maybe there is a better easier ways?

View 2 Replies

WCF / ASMX :: Create A Service To Allow Client Application To Update Their Data

Sep 22, 2010

I want to create a WCF Service to transfer data to our clients application(WPF). The Data I am trying to send is as follows.

ID Code Description unit Rate
1 104200000 LIVE GOAT NOS 25
2 104200000 LIVE GOAT2 NOS 25
3 104200030 LIVE GOAT3 KGS 10
4 104202030 Water LTR 5

and so on till ~ 11000 records.

What I have done so far is. Created a service which return a list of data.

public List<Classes.TariffData> GetTariffData() { var currentTariffData = new List<Classes.TariffData>(); using (var myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString)) { const string query = "select a.ID,a.Code,a.Description,a.unit,a.rate,a.rate3 from tariff.dbo.tariffdata a, tariff.dbo.code_history b where a.id = b.id and b.endofvalidity is null"; using (var myCommand = new SqlCommand(query, myConnection)) { using (var ad = new SqlDataAdapter(myCommand)) { var dt = new DataTable("tariff"); ad.Fill(dt); currentTariffData.AddRange(from DataRow row in dt.Rows select new Classes.TariffData { Id = int.Parse(row["Id"].ToString()), Code = row["Code"].ToString(), Description = row["Description"].ToString(), Unit = row["unit"].ToString(), Rate = row["rate"].ToString(), Rate3 = row["rate3"].ToString() }); return currentTariffData; } } } }
Class is as follows
public class TariffData { public int Id { get; set; } public string Code { get; set; } public string Description { get; set; } public string Unit { get; set; } public string Rate { get; set; } public string Rate3 { get; set; } }

If i Limit the number of data by using const string query = "select top 300 a.ID,a.Code,a.Description. The Service works fine. But if I remove the top 300 part I get an error. What is your advice if I want a service to allow our client applications to update their data by using WCF. (11000 records.) I am using visual Studio 2010. C# .Net 4.0

View 3 Replies

WCF / ASMX :: Client Web Service And Cookie?

Mar 8, 2011

when client call my web service, i read owner cookie?

For example : When Guest browse www.abc.com, i write a cookie that its name BrowseTime.
www.xyz.com using web service on www.abc.com . Can I get abc.com's BrowseTime cookie when xyz.com call WebService? Or alternative solution like (third part cookie or any)

View 3 Replies

WCF / ASMX :: Use Of XSD When Providing Web Services To The Client?

Mar 31, 2010

What is the use of XSD when providing web services to the client.?

How visual studio provieds XSD ?

What will be the situtation where we need to develop XSD mannually instead of use of Visualstudio.

Suppose I have created web services for Add method.

How the XSD will be.?

View 1 Replies

Client IP Address In C# (.asmx) Webservices?

Mar 28, 2010

I am using ASP.NET (.asmx) web services with Silverlight. Since there is no way to find the client IP address in Silverlight, I had to log this on the service end.

These are some methods I have tried:

Request.ServerVariables("REMOTE_HOST")
HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]
HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
Request.UserHostAddress()
Request.UserHostName()
string strHostName = Dns.GetHostName();
string clientIPAddress = Dns.GetHostAddresses(strHostName).GetValue(0).ToString();

All the above methods work fine on my local system, but when I publish my service on a production server, it starts giving errors, Error: Object reference not set to an instance of an object. StackTrace:

at System.Web.Hosting.ISAPIWorkerRequestInProc.GetAdditionalServerVar(Int32 index)
at System.Web.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name)
at System.Web.Hosting.ISAPIWorkerRequest.GetRemoteAddress()
at System.Web.HttpRequest.get_UserHostAddress()

View 2 Replies

WCF / ASMX :: Receive Client Certificate In Web Service?

Oct 15, 2010

I'm trying to receive a Client Certificate in a Web Service and having some problems.

Client

[Code]....

The certificate seems to be correclty loading and added to the client.

The client connects to the server with HTTPS.

Server:

[Code]....

cert.IsPresent is false and all certificate fields are empty.

IIS is configured to Accept Client Certificates.

Reproduced in two environments:

- Windows 7 x64, IIS 7, VS 2008, .NET 3.5
- XP x86, IIS 5, VS 2008, .NET 3.5

Always in the Web Service the Client Certificate is not proesent. I haven't been able to find any other configuration I should do.

View 1 Replies

WCF / ASMX :: Streaming Images From Server To Client

Feb 14, 2011

On the server side i have a folder which contains 2gb of images , i have to implement image streaming to fetch all the images in the folder on the client side using WCF streaming.

View 2 Replies

WCF / ASMX :: Service Reference On Client Side?

Dec 15, 2010

I am having a strange issue in my C# Console Application:

Name Space: WcfConsoleApp
Main Class: Program.cs
Name Space: WcfConsoleApp.ServiceReference
this namespace contains the WCF service reference

After building the project, the Program.exe avaliable in Debug folder is executing fine as expected.But when i move the exe to Client, where i need to actually run this exe, it works fine up to the line where i am referencing the Service, the line is:

WcfConsoleApp.ServiceReference.ServiceClient service = new WcfConsoleApp.ServiceReference.ServiceClient();

the consoel app crashes on the client machine at this line. (i know this because before this line, i display some mesage on the console)the same .exe and works fine at my development machine.I am sure it has to do some thing with reference path, i think the program is not getting to the path where service reference is avaliable. I have copied the full project folder as it is to the client, but still its is not working.

View 4 Replies

WCF / ASMX :: Expose A Method To The Silverlight Client?

Nov 22, 2010

I'm having trouble exposing a method to a silverlight client from a WCF service although I can expose properties.

My WCF service has a LoadDeal method which returns a Deal object

public Deal LoadDeal(int dealerId)
{
Deal d = new Deal();
d.LoadDeal(dealerId);
return d;

[Code]....

This works fine and the Refernce property can be accessed from the silverlight client.

But when I try to expose a method such as the CancelEdit method below, I can't find a way to expose this method to the silverlight client:

public void CancelEdit()
{
//Add logic to cancel changes here.
}

I've tried adding the DataMember annotation but the compiler complains. I've re-compiled without an annotation and then updated the service reference but nothing seems to be working.

View 1 Replies

WCF / ASMX :: Error In Consuming Web Service Using WCF Client?

Aug 30, 2010

I have consumed an external webservice in my client application using WCF. And every thing works great in my Dev box(XP with IIS5.1)But when the same application is moved to Prod server(Win Server 2003 with IIS6.0) it fails. Below is the exception caught:

There was no endpoint listening at http://MyExternalWebServiceUrlWithSessionId could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.And the InnerException is: Unable to connect to the remote server.My Config file has the below settings:

[Code]....

View 1 Replies

WCF / ASMX :: While Consuming The Java Web Service, Getting The Error In Client?

May 20, 2010

I am consuming the java web service in .net client, when i sent a request to that web service, i am getting one exception in response object.It says "Client found response content type of 'text/plain', but expected 'text/xml'", along with this message i am getting the response in that exception.

View 2 Replies

WCF / ASMX :: Test Client Doesn't Allow Null Values

Mar 11, 2011

I've created a WCF Service that Performs Insert User, What it does is, it'l get user name, age,gender,address,phone no and inserts these values into SQL database.

Problem is :

These things are working fine, if i give all the values in the WCF Test Client, It's Not working when i din't enter value for Address and click "Invoke" Button, It's throwing an Exception Procedure or Function "Insert_User" Expects

ADDRESS' Which was not supplied. I've created the SQL table Which allow Null Values for Address.

I've did the same Operaion in WebService also, there it's working fine, if i din't enter any value for tha Allow Null Colums, it's accepting the Null value and inserting into Database.

Why this Problem comes in WCF Test client, Guide me to Get rid of this Problem.

View 1 Replies

WCF / ASMX :: Unable To Make Connection Between Client And Service

Apr 30, 2010

I receive the following error, when trying to consume Wcf service:

"An existing connection was forcibly closed by the remote host". Consuming the service works fine when the host and the client are on the same machine. When I move the client to Hyper-V virtual machine (I didn't try it on a real computer) - it throws the error. Both firewalls are turned off Do you know what can cause such behaviour? Here are the details:

Both the client (hyper-v) and the service are on Windows server 2008 R2

Service url - http://wcftest/CalculatorService.svc (wcftest is the website and is mapped in the hosts file to localhost)

Service config:

[Code]....

Client config:

[Code]....

Are there any configuration settings which I'm missing?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved