Click here to Skip to main content
15,892,768 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionMultilingual support for Web Application Pin
AB777117-Dec-12 23:18
AB777117-Dec-12 23:18 
AnswerRe: Multilingual support for Web Application Pin
Rahul Rajat Singh17-Dec-12 23:43
professionalRahul Rajat Singh17-Dec-12 23:43 
GeneralRe: Multilingual support for Web Application Pin
AB777118-Dec-12 2:27
AB777118-Dec-12 2:27 
AnswerRe: Multilingual support for Web Application Pin
Deflinek17-Dec-12 23:57
Deflinek17-Dec-12 23:57 
SuggestionRe: Multilingual support for Web Application Pin
Chandrabhan Sangale18-Dec-12 18:01
professionalChandrabhan Sangale18-Dec-12 18:01 
Questiongoogle map Pin
cdpsource17-Dec-12 20:52
cdpsource17-Dec-12 20:52 
AnswerRe: google map Pin
ZurdoDev18-Dec-12 4:55
professionalZurdoDev18-Dec-12 4:55 
QuestionProblem to send message from MSMQ Pin
TRAORE cheickna17-Dec-12 10:20
TRAORE cheickna17-Dec-12 10:20 
Hello,

I created a WCF service into my asp.net app in order to store some messages into queue using MSMQ before send them to users. The first part work fine because i can see all messages in a pickup directory with Windows Explorer. I also can see the message number using windows service manager throw my private queue.

The second part don't work i.e my messages aren't sent and i have no error message. I don't understand where the problem come from. The code i use is following :

msmqQueuePath is my Queue name

VB
Public Sub GetMailMessages() Implements ISvcEmailManagement.GetMailMessages

        Try
            ' Create an instance of MessageQueue. Set its formatter.
            Dim _msmqQueue As New MessageQueue(msmqQueuePath)
            '_msmqQueue.Formatter = New XmlMessageFormatter(New Type() {GetType([String])})
            _msmqQueue.Formatter = New BinaryMessageFormatter
            _msmqQueue.MessageReadPropertyFilter.SetAll()
            ' Add an event handler for the ReceiveCompleted event.
            AddHandler _msmqQueue.ReceiveCompleted, AddressOf msmqQueue_ReceiveCompleted
            Dim returnValue As IAsyncResult
            ' Begin the asynchronous receive operation.
            returnValue = _msmqQueue.BeginReceive()
            signal.WaitOne()
            ' Do other work on the current thread.
            Return
        Catch ex As Exception
            Dim Msg As String = ex.Message
            Throw ex
        End Try

    End Sub


The receiveCompleted function is :

VB
Public Sub msmqQueue_ReceiveCompleted(ByVal sender As Object, ByVal e As ReceiveCompletedEventArgs)
        Try
            Dim emailMsg As EmailEntities.CEmailMessage = e.Message.Body
            'Remplir l'objet Message avec TO, FROM, BODY, SUBJECT en supposant que le message soit au bon format
            Dim mailMessage As MailMessage = New MailMessage()
            mailMessage.To.Add(New MailAddress(emailMsg.sTO))
            mailMessage.From = New MailAddress(emailMsg.sFROM)
            mailMessage.Subject = emailMsg.sSUBJECT
            mailMessage.Body = emailMsg.sBODY
            Dim oclient As SmtpClient = New SmtpClient()
            Try
                oclient.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory
                oclient.Send(mailMessage)
            Catch ex As SmtpFailedRecipientsException
                Dim i As Integer
                For i = 0 To ex.InnerExceptions.Length - 1
                    Dim status As SmtpStatusCode = ex.InnerExceptions(i).StatusCode
                    If (status = SmtpStatusCode.MailboxBusy) Or (status = SmtpStatusCode.MailboxUnavailable) Then
                        'Echec à l'envoi du message : tentative dans 5 secondes
                        System.Threading.Thread.Sleep(5000)
                        oclient.Send(mailMessage)
                    Else
                        'Echec d'envoi du message à {0}
                        MsgBox("Failed to deliver message to {0}", MsgBoxStyle.Information, ex.InnerExceptions(i).FailedRecipient)
                    End If
                Next i
            Catch ex As SmtpException
                Dim msstatus As String = ex.Message
            End Try
        Catch ex As SmtpException
            Dim msstatus As String = ex.Message
        Catch ex As Exception
            Dim msstatus As String = ex.Message
            'Catch ex As XmlException
            '    Dim msstatus As String = ex.Message
        End Try
    End Sub



Thanks a lot for any help
Questionexport report failed in crystal report Pin
himadribanik17-Dec-12 6:51
himadribanik17-Dec-12 6:51 
QuestionRefresh particular parts on masterpage Pin
cdpsource17-Dec-12 5:58
cdpsource17-Dec-12 5:58 
AnswerRe: Refresh particular parts on masterpage Pin
Matt U.17-Dec-12 6:51
Matt U.17-Dec-12 6:51 
GeneralRe: Refresh particular parts on masterpage Pin
cdpsource17-Dec-12 6:59
cdpsource17-Dec-12 6:59 
GeneralRe: Refresh particular parts on masterpage Pin
Matt U.17-Dec-12 7:06
Matt U.17-Dec-12 7:06 
GeneralRe: Refresh particular parts on masterpage Pin
cdpsource17-Dec-12 8:23
cdpsource17-Dec-12 8:23 
SuggestionRe: Refresh particular parts on masterpage Pin
Chandrabhan Sangale18-Dec-12 18:04
professionalChandrabhan Sangale18-Dec-12 18:04 
Questionsession variable / temp data Pin
xnaLearner17-Dec-12 4:25
xnaLearner17-Dec-12 4:25 
QuestionSalable Comet (server hang while more user) Pin
vaibhav.baldha17-Dec-12 3:47
vaibhav.baldha17-Dec-12 3:47 
AnswerRe: Salable Comet (server hang while more user) Pin
Chandrabhan Sangale18-Dec-12 17:49
professionalChandrabhan Sangale18-Dec-12 17:49 
QuestionThe underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. Pin
kapil sharma 4917-Dec-12 2:02
kapil sharma 4917-Dec-12 2:02 
AnswerRe: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. Pin
ZurdoDev18-Dec-12 4:58
professionalZurdoDev18-Dec-12 4:58 
QuestionCan only book for yourself and not other users? Pin
xnaLearner17-Dec-12 1:29
xnaLearner17-Dec-12 1:29 
QuestionRe: Can only book for yourself and not other users? Pin
Zaf Khan19-Dec-12 5:49
Zaf Khan19-Dec-12 5:49 
QuestionEval + onclientClick Gridview Error Pin
jojoba201116-Dec-12 20:38
jojoba201116-Dec-12 20:38 
QuestionRe: Eval + onclientClick Gridview Error Pin
ZurdoDev18-Dec-12 4:59
professionalZurdoDev18-Dec-12 4:59 
QuestionSound transmission Pin
leone16-Dec-12 5:16
leone16-Dec-12 5:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.