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


Similar Messages:

WCF / ASMX ::pass Xml Document To A Method In WCF Service By Client?

Aug 2, 2010

I would like to pass xml document to a method in WCF service by client that server will get xmldocument,parse it and send back the xml response.What are best practice for thi?The xml document is conform to XSD so i would like to create managed type that represent the schema and then expose thatIf anybody has done it before or know any example please point it out so i can see it.

View 1 Replies

WCF / ASMX :: Expose Certain Methods To Specific Clients?

Apr 9, 2010

I have a WCF service with two operations GetLoan and GetBalance

I want GetBalance to be exposed to all the clients but GetBalance tobe exposed to specific clients

How can this be done?

View 4 Replies

How To Get Classes To Expose The Same Shared / Static Method

Mar 4, 2010

I have a base class with several derived classes. I want all of my derived classes to have the same Public Shared (static) method with their own implementation. How do I do this?

View 3 Replies

WCF / ASMX :: Why Can't Run Silverlight In Iis - VS2010

Aug 25, 2010

Both VS200 and IIS are in my local machine. Suppose they have the same permission. I create a silverlight4 w/ wcf ria service project. The project runs well in VS2010 built-in ASP.Net development server. It doesn't work well after i publish it to IIS. I only can see its static content but not the .svc. i try to browse the .svc, it always show HTTP 500 error. I doubt if i do not open the asp.net runtime setting sth in IIS?

View 1 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

Determine Silverlight Installed On Client?

Feb 25, 2010

IIS 6.0 hosting ASP.NET 3.5. From the Visual Studio 2008 aspx code behind (aspx.cs) running on the server I need to determine if Silverlight is installed on the client and if so which version. I know from Java on the client this can be done. That is not what I need. I know I can put in a control that will render if Silverlight is installed. That is not what I need.

View 3 Replies

C# - Silverlight Process On Client Side?

Feb 23, 2011

i am a php developer, not knowing much about silverlight, i am working on a project which needs to process request on client browser, like post httprequests and process them, its a auto directory submitter, can it be done in silverlight application?

i want the user to open the silverlight application, which will submit the post request from client side, and also process for success and failure. is it possible?

View 1 Replies

WCF / ASMX :: How To Force Each Web Method To Call Another Method By Default

Sep 14, 2010

I want to execute a certain piece of code by default before each web Method.

Without adding any extra code in each method how to achieve this?

I am calling this service from Win application.

View 1 Replies

WCF / ASMX :: Linq To SQL - Silverlight Games Online Card

Oct 22, 2010

I was asked to design an online game of cards (eg poker) multiplayer technology with asp.net mvc, and I went to see other sites like that have asked me. I noticed that many sites dump the game on the platform and then winform can play safely. I thought of using WCF and Silverlight together with asp.net mvc. How to understand the technology associated with the WCF card games online, where can I find examples of online games of cards?

View 1 Replies

How To Push Data To Flash/silverlight Client

Nov 18, 2010

I'm developing chat application. I use flash as front end and asp.net back-end. My question is: can my asp.net web app send data to flash app in browser without post back ?actually it mean asp.net push data to flash client. I don't know much about flash or siverlight, dose flash support to do that ? or other way help me connect direct from server to browser without using post back or Jabber ?

View 4 Replies

C# - Why Does Silverlight Reference To Wcf Service Blow Up When Add Method To The Wcf Service That Returns Generic List

Aug 17, 2010

I have built a WCF Service that is being consumed by a Silverlight app. At first I created one method that was very simple:

public String SfTest()
{
return "SF Test";
}

No poblem. My silverlight app references my service and displays "SF Test" in a textbox. Now I add a method to my wcf service like this:

public List<String> GetTest()
{
List<String> list = new List<string>();
String a = "a";
list.Add(a);
String b = "b";
list.Add(b);
return list;
}

I update the reference to the service in my Silverlight app and the using statement in my xaml cs page throws an error like the service doesn't even exist although it is there. I am assuming the problem has to do with datatypes or serialization or something like that but it is driving me up the wall. Why can't I consume a simple generic list in my Silverlight app through the WCF service.

View 1 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 :: Restrict Particular Method In Service?

Dec 12, 2010

In my WCF service i exposed two services service1 and service2 now consumer/client do not intrest to consume service2 then how he will restrict this?

View 1 Replies

WCF / ASMX :: Method Overloading In Webservices?

Sep 14, 2010

I have following class in webservices, I am not able to override the constructer of webservice. Asp.net always call first method not the one with parameter.

[Code]....

How can i call the second constructer in asp.net? Pls provide vb.net code.

View 11 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 :: 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

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 :: 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 :: 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 :: Write Some XML Data After Web Method Return?

Jul 19, 2010

I am coding a classic .asmx web service. The method get data (as a string) from a server, then assign data to an object, then return that object. But I want to cache that object to a XML file for other request. It's because the data from server is not frequently change. Thus, after some minutes, I have to refresh the XML file. When I refresh XML file, I could write object to XML first, then return that object, but that approach maybe slowly.

How can I return the object for client first, then write this to XML file?

View 5 Replies

WCF / ASMX :: Calling A Class Method On Webmethod?

Dec 10, 2010

i wrote a webmethod on webservice. it will do adding product to shoppingbasket. But it doesn't work. i used a class and its method in this webservice method. error is about it. my code are below:

[Code]....
[Code]....

View 4 Replies







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