.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

wcf service sending messages

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :WCF
 
hi
can a wcf service send messages to client connected to service?2 clients can send messages to each other using the service,but how can the service send messages by its own to all attached or new clients subscribed to it?what will i have to do for that?do respond..waiting





Mumtaz Surani


View Complete Post


More Related Resource Links

DIME: Sending Files, Attachments, and SOAP Messages Via Direct Internet Message Encapsulation

  

Direct Internet Message Encapsulation (DIME) is a new specification for sending and receiving SOAP messages along with additional attachments, like binary files, XML fragments, and even other SOAP messages, using standard transport protocols like HTTP. In this article, the author explains what DIME is and how it differs from MIME encapsulation. A detailed description of the message format and how it is parsed, as well as working with SOAP and extending it with WSDL, is also included.

Jeannine Hall Gailey

MSDN Magazine December 2002


PollingDuplex ServiceHost stop receiving or sending any messages.

  
Silverlight client talks to .Net server using pollingDuplexhttpBinding. Everything works fine, untill some slow client will try to talk to server. Slow client will stop server from receiving or sending messages  to all the clients. Even mex and point doesn't respond. All the clients get timeout exception. This is my config <system.serviceModel> <extensions> <bindingExtensions> <add name="pollingDuplexHttpBinding" type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement, System.ServiceModel.PollingDuplex, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </bindingExtensions> </extensions> <service behaviorConfiguration="PollingDuplexBehavior" name="Poker2.GameServer.Facades.SGS2Client"> <host> <baseAddresses> <add baseAddress="http://localhost:20018/GS"/> </baseAddresses> </host> <endpoint address="GSHostService" binding="pollingDuplexHttpBinding" bindingConfiguration="multipleMessagesPerPollPollingDuplexHttpBinding" contract="Poker2.CommonInterfaces.WCF.IWCFGS2Client"/> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services&g

sending email using IIS smtp service

  

 I am working on an email that someone will send from one of our main sites requesting an account password.  I am using System.Net.Mail.MailMessage to create the email and then sending it using System.Net.Mail.SmtpClient.  Below is my code: 

	Public Function sendEmail(ByVal address As String) As String
		Dim mailMessage As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
		
		mailMessage.To.Add(New System.Net.Mail.MailAddress("emailAddress"))
		mailMessage.From = (New System.Net.Mail.MailAddress(address))
		
		Dim smtpClient As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient()
		
		Try
			smtpClient.Send(mailMessage)
		Catch ex As Exception
			Throw New ApplicationException("Data Error", ex)
		End Try
	End Function

	Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
		sendEmail("emailAddress")
	End Sub


Then in my web.config file I have the following

		<mailSettings>
			<smtp>
				<network host="cook.CMAP.public" port="25" 
					defaultCredentials="true"/>
			</smtp>
		</mailSettings>
It all looks like it is right bu

net.tcp service does not recieve messages using WCF4 routing service multicast scenario

  

I am trying out the WCF 4.0 multicast scenario. i have two services exposed

Service A- using NetTcpBinding,

Service B-using basichttpbinding.

A WCF 4 Routing service is used to multicast messages to both the services.

When i send a message, only the service with basichttp binding recieves it. the other does not.

I modified service A to use basichttpbinding and it started recieving messages from multicast router.

Am I missing here something that nettcp service is not recieving messages from multicasting routing service.

Thanks


how to get xml messages from service broker?

  

greetings 

 

i wana know how can i get your XML messages from service broker (in case of distributed brokers) and how to parse them to produce our data?

 

thnx


Trouble sending data to WCF service from JQuery

  

Hi there...I am calling a WCF service that is using webHttpBinding from a javascript JQuery call, such as:

    $.ajax({
        async: false,
        type: "POST",             
        url: varUrl,             
        data: varData,        
        contentType: "application/json; charset=utf-8",  
        dataType: "json",       
        processdata: true,
        success: function(msg) {
            ServiceSucceeded(msg);
        },
        error: ServiceFailed
    });

varData is {"x1":3,"x2":"Blah"}

Signature at the service side is:

public string File_Load(short fileType, string name)

question about sending form data to web service

  

Hello, i have some web service in outsource server (not on the form server) and i need to send to this web service few text boxes fill by the user (text only - no files) i need to send the data + the number 1 + some guid string (that not changing - the same guid always) is anyone have an idea how im doing that? ( all the data need to be sending to asmx file.


web service for sending email

  

I have different web applications and I want to ask if it's advisable to create a web service to send emails through it so all my web applications will go there instead of having the Mail class or code in every web application...
what do you think?

I have different web applications and I want to ask if it's advisable to create a web service to send emails through it so all my web applications will go there instead of having the Mail class or code in every web application...


what do you think?


Error while sending messages

  

Hi,

I tried resending the messages with errors three additional times and got the same error message: "The connection to the SMTP server failed or the operation timed out."

we tried to upload a CSV file that contained a distribution list of 156,000 recipients

Please see details below:

Message #1:
Subject: Message Sent in Error
Status: Processed with Errors
Completed on: Not completed.
Sent to: 29987 recipients
200 - The connection to the SMTP server failed or the operation timed out.
29787 - OK

 


problems with trace.writeline not writing output messages on multiple instance/thread service

  

Hi,

I've come across something strange and can't quite figure out what could be going wrong. I have a windows service which processes queue items in a threadpool (default 5 threads).

So, during testing, i "debug, start new instance" and spin up about 4-5 instances of the service, and on average there is about 25 threads going at same time.

My trace code:
Trace.WriteLineIf(traceOutput.TraceVerbose, string.Format("processing Item for {0}", item.id));

 

this seems to work for a while and writes the trace code to the output window, but after a while, the trace output just stops being output to the window.. has anyone else experienced this before or could know what might be going wrong?

 

thanks,

Paul


Sending XML Data from WCF Web Service for VBA Excel

  

i have created dal layer and a function to return getxml from dataset. i am able to print that data on the aspx page however i want send this data through wcf web service so that it can be accessed through excel vba.

 

I am new to web service concept and to the wcf. i want to send this xml data through wcf web service. i am not able to send this xml formatted data. Please advise how to achieve this.

My Code for DAL layer

Created two different funtions

Public Class CustomersDAO
        Inherits BaseDAO
        Public Const LOAD_CUSTOMERS As String = "GetCustomers"
        Public Const LOAD_CUSTOMERSXML As String = "GetCustomers"
        Public Shared Function LoadCustomers() As Customers()
            Dim CustomersData As DataSet = ExecuteDataset(LOAD_CUSTOMERS)
            Dim CustomersArray As Customers() = New Customers(CustomersData.Tables(0).Rows.Count - 1) {}
            For i As Integer = 0 To CustomersData.Tables(0).Rows.Count - 1
      &nbs

Sending XML Data from WCF Web Service for VBA Excel

  

i have created dal layer and a function to return getxml from dataset. i am able to print that data on the aspx page however i want send this data through wcf web service so that it can be accessed through excel vba.

 

I am new to web service concept and to the wcf. i want to send this xml data through wcf web service. i am not able to send this xml formatted data. Please advise how to achieve this.

My Code for DAL layer

Created two different funtions

Public Class CustomersDAO
        Inherits BaseDAO
        Public Const LOAD_CUSTOMERS As String = "GetCustomers"
        Public Const LOAD_CUSTOMERSXML As String = "GetCustomers"
        Public Shared Function LoadCustomers() As Customers()
            Dim CustomersData As DataSet = ExecuteDataset(LOAD_CUSTOMERS)
            Dim CustomersArray As Customers() = New Customers(CustomersData.Tables(0).Rows.Count - 1) {}
            For i As Integer = 0 To CustomersData.Tables(0).Rows.Count - 1
      &nbs

How to create a WCF service that is in compliance with Soap Messages with Attachments

  
Hi, I know that there are many ways to send attachments, but unfortunately i need to create a webservice that follows the "SOAP messages with Attachments" specification (http://www.w3.org/TR/SOAP-attachments). This specification can be sumarrizing as and Multipart MIME message that groups a Soap Envelope and more files as attachmens in differnent MIME parts, such as SOAP with Attachments MIME envelope -Root Body MIME part --Soap Envelope ---Soap Header ---Soap Body - Mime Part 2 --First File - Mime part 3 --Second File .... Hopefully that structure can be helpful,otherwise you can easily check in the specification page. I don't know how to do that: - Creating a Contract with one parameter that will a Message that will encapsules all the information, but this means that I need to create all the MIME parts manually. and lqater in the client I'll have to split the information and deserialized in objects. Any help would be great, Thanks in advance for your help. Cheers

Windows Service Applications Tutorials

  
You can easily create services by creating an application that is installed as a service. For example, suppose you want to monitor performance counter data and react to threshold values. You could write a Windows Service application that listens to the performance counter data, deploy the application, and begin collecting and analyzing data.

WCF Tip: Using Properties in Service Contracts

  
you'll notice all of the Service Contracts are implemented with interfaces containing only methods. For the longest time I thought that's all that was supported, until I thought about it a little more. In C# land, properties are simply wrappers around a get method and set method, so why wouldn't we be able to use properties in a service contract? Well the answer is we can.

Realizing a Service-Oriented Architecture with .NET

  
This article is meant to be a practical discussion guide to building a .NET application in a service-oriented architecture. We will consider real-world goals, real-world obstacles, and experience-based solutions. I quickly concede the approaches discussed here are not exhaustive or infallible. This paper is focused on application development, not application integration. We will specifically consider architectural issues and component design issues.

The Potential of Web Services
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend