Feedback form PROBLEM

Z

Zagor

I have a feedback form in my website with three TextBoxes and a SEND button
in a user control.
Below is a piece of the code:
//On click event for the send LinkButton

private void SendClicked(object sender, EventArgs e){

try{

if (Page.IsValid){

SendMail();

Response.Redirect("notify.aspx?Notify:pass");}

}

catch(Exception ex){..................whatever}

//Actual code for sending the EMail

private void SendMail()

{

MailMessage objEmail = new MailMessage();


objEmail.From = this.tbEMail.Text;

objEmail.Priority = System.Web.Mail.MailPriority.High;

objEmail.To = TO_ADDRESS;//whatever

objEmail.Subject = SUBJECT_TEXT ;//whatever

objEmail.Body = "\nName :" + this.tbFullName.Text + "\nEMail: " +
this.tbEMail.Text +"\n\nMessage:"+this.tbMessage.Text;

objEmail.BodyFormat = MailFormat.Text;

SmtpMail.SmtpServer = SMTP_SERVER; //whatever is the smtp


SmtpMail.Send( objEmail );

objEmail = null;

}

if I use it with my ISP on my IIS everything is fine I can send the form
without any problem. When I upload it to my host service (obviously
modifying accordingly the SMTP) I



Server Error in '/' Application.
--------------------------------------------------------------------------------

The transport failed to connect to the server.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The
transport failed to connect to the server.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x80040213): The transport failed to connect to the server.
etc.etc.


The Hosting Service claims that is my code , but I cannot find anything
wrong with it.( considering that works with my IIS).but I don't like to say
that they are wrong until I am positive that I am not.

Can anybody help me please and give me more information on how to solve this
problem?



thank you in advance for your help
 
F

Frank Mamone

Zagor,

I don't have any suggestions for you but I'm wondering why you are getting
an Interop services exception. Is the mail object a COM object?


-Frank Mamone
 
K

Karl

Like Frank I have little to offer.

Some people have had luck solving mail issues by setting the smtp server
via:
SmtpMail.SmtpServer.Insert(0, SMTP_SERVER);

The first question that popped into my mind was "are you sure you have the
correct SMTP_SERVER" and "does it require authentication" ? Also, you could
ask your ISP to look into their smtp server logs to help identify the
problem. If they don't go for that, use a 3rd party mailserver dll which
supports logging and look at the logs. For example you could use
http://www.exclamationsoft.com/exclamationsoft/smtp.net/default.asp which
has a demo and supports logging..dunno if you'll get any additional
information, but worth a try.

Karl


--
MY ASP.Net tutorials
http://www.openmymind.net/


Zagor said:
I have a feedback form in my website with three TextBoxes and a SEND button
in a user control.
Below is a piece of the code:
//On click event for the send LinkButton

private void SendClicked(object sender, EventArgs e){

try{

if (Page.IsValid){

SendMail();

Response.Redirect("notify.aspx?Notify:pass");}

}

catch(Exception ex){..................whatever}

//Actual code for sending the EMail

private void SendMail()

{

MailMessage objEmail = new MailMessage();


objEmail.From = this.tbEMail.Text;

objEmail.Priority = System.Web.Mail.MailPriority.High;

objEmail.To = TO_ADDRESS;//whatever

objEmail.Subject = SUBJECT_TEXT ;//whatever

objEmail.Body = "\nName :" + this.tbFullName.Text + "\nEMail: " +
this.tbEMail.Text +"\n\nMessage:"+this.tbMessage.Text;

objEmail.BodyFormat = MailFormat.Text;

SmtpMail.SmtpServer = SMTP_SERVER; //whatever is the smtp


SmtpMail.Send( objEmail );

objEmail = null;

}

if I use it with my ISP on my IIS everything is fine I can send the form
without any problem. When I upload it to my host service (obviously
modifying accordingly the SMTP) I



Server Error in '/' Application.
-------------------------------------------------------------------------- ------

The transport failed to connect to the server.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The
transport failed to connect to the server.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x80040213): The transport failed to connect to the server.
etc.etc.


The Hosting Service claims that is my code , but I cannot find anything
wrong with it.( considering that works with my IIS).but I don't like to say
that they are wrong until I am positive that I am not.

Can anybody help me please and give me more information on how to solve this
problem?



thank you in advance for your help
 
Z

Zagor

Hi Frank,
the MailMessage is not an COM object,

actually is a memeber of System.Web.Mail.MailMessage

"Provides properties and methods for constructing an e-mail message" in C#

I do not know the origin of this kind of exception.

I am trying to read everywhere to see if anybody had the same or similar
problem.

Thank you for your time

Francesco


Frank Mamone said:
Zagor,

I don't have any suggestions for you but I'm wondering why you are getting
an Interop services exception. Is the mail object a COM object?


-Frank Mamone

Zagor said:
I have a feedback form in my website with three TextBoxes and a SEND button
in a user control.
Below is a piece of the code:
//On click event for the send LinkButton

private void SendClicked(object sender, EventArgs e){

try{

if (Page.IsValid){

SendMail();

Response.Redirect("notify.aspx?Notify:pass");}

}

catch(Exception ex){..................whatever}

//Actual code for sending the EMail

private void SendMail()

{

MailMessage objEmail = new MailMessage();


objEmail.From = this.tbEMail.Text;

objEmail.Priority = System.Web.Mail.MailPriority.High;

objEmail.To = TO_ADDRESS;//whatever

objEmail.Subject = SUBJECT_TEXT ;//whatever

objEmail.Body = "\nName :" + this.tbFullName.Text + "\nEMail: " +
this.tbEMail.Text +"\n\nMessage:"+this.tbMessage.Text;

objEmail.BodyFormat = MailFormat.Text;

SmtpMail.SmtpServer = SMTP_SERVER; //whatever is the smtp


SmtpMail.Send( objEmail );

objEmail = null;

}

if I use it with my ISP on my IIS everything is fine I can send the form
without any problem. When I upload it to my host service (obviously
modifying accordingly the SMTP) I



Server Error in '/' Application.
-------------------------------------------------------------------------- ------

The transport failed to connect to the server.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The
transport failed to connect to the server.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x80040213): The transport failed to connect to the
server.
etc.etc.


The Hosting Service claims that is my code , but I cannot find anything
wrong with it.( considering that works with my IIS).but I don't like to say
that they are wrong until I am positive that I am not.

Can anybody help me please and give me more information on how to solve this
problem?



thank you in advance for your help
 
Z

Zagor

Hi Karl,

I will try your suggestion.

Regarding the SMTP_SERVER is correct , this is the one supplied by the
Hosting Service ( which is for the last 10 days) I am trying to understand
where the problem is. As I said , If use the IIS and the SMTP server
provided by my ISP, everything works fine. The problem arises when I upload
the file to the Hosting company.

Anyhow, thank you for your time

Francesco


Karl said:
Like Frank I have little to offer.

Some people have had luck solving mail issues by setting the smtp server
via:
SmtpMail.SmtpServer.Insert(0, SMTP_SERVER);

The first question that popped into my mind was "are you sure you have the
correct SMTP_SERVER" and "does it require authentication" ? Also, you
could
ask your ISP to look into their smtp server logs to help identify the
problem. If they don't go for that, use a 3rd party mailserver dll which
supports logging and look at the logs. For example you could use
http://www.exclamationsoft.com/exclamationsoft/smtp.net/default.asp which
has a demo and supports logging..dunno if you'll get any additional
information, but worth a try.

Karl


--
MY ASP.Net tutorials
http://www.openmymind.net/


Zagor said:
I have a feedback form in my website with three TextBoxes and a SEND button
in a user control.
Below is a piece of the code:
//On click event for the send LinkButton

private void SendClicked(object sender, EventArgs e){

try{

if (Page.IsValid){

SendMail();

Response.Redirect("notify.aspx?Notify:pass");}

}

catch(Exception ex){..................whatever}

//Actual code for sending the EMail

private void SendMail()

{

MailMessage objEmail = new MailMessage();


objEmail.From = this.tbEMail.Text;

objEmail.Priority = System.Web.Mail.MailPriority.High;

objEmail.To = TO_ADDRESS;//whatever

objEmail.Subject = SUBJECT_TEXT ;//whatever

objEmail.Body = "\nName :" + this.tbFullName.Text + "\nEMail: " +
this.tbEMail.Text +"\n\nMessage:"+this.tbMessage.Text;

objEmail.BodyFormat = MailFormat.Text;

SmtpMail.SmtpServer = SMTP_SERVER; //whatever is the smtp


SmtpMail.Send( objEmail );

objEmail = null;

}

if I use it with my ISP on my IIS everything is fine I can send the form
without any problem. When I upload it to my host service (obviously
modifying accordingly the SMTP) I



Server Error in '/' Application.
-------------------------------------------------------------------------- ------

The transport failed to connect to the server.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The
transport failed to connect to the server.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x80040213): The transport failed to connect to the
server.
etc.etc.


The Hosting Service claims that is my code , but I cannot find anything
wrong with it.( considering that works with my IIS).but I don't like to say
that they are wrong until I am positive that I am not.

Can anybody help me please and give me more information on how to solve this
problem?



thank you in advance for your help
 
G

Greg Burns

This site is usually recommended for trouble shooting:

http://www.systemwebmail.com/

HTH,
Greg

Zagor said:
Hi Frank,
the MailMessage is not an COM object,

actually is a memeber of System.Web.Mail.MailMessage

"Provides properties and methods for constructing an e-mail message" in C#

I do not know the origin of this kind of exception.

I am trying to read everywhere to see if anybody had the same or similar
problem.

Thank you for your time

Francesco


Frank Mamone said:
Zagor,

I don't have any suggestions for you but I'm wondering why you are
getting
an Interop services exception. Is the mail object a COM object?


-Frank Mamone

Zagor said:
I have a feedback form in my website with three TextBoxes and a SEND button
in a user control.
Below is a piece of the code:
//On click event for the send LinkButton

private void SendClicked(object sender, EventArgs e){

try{

if (Page.IsValid){

SendMail();

Response.Redirect("notify.aspx?Notify:pass");}

}

catch(Exception ex){..................whatever}

//Actual code for sending the EMail

private void SendMail()

{

MailMessage objEmail = new MailMessage();


objEmail.From = this.tbEMail.Text;

objEmail.Priority = System.Web.Mail.MailPriority.High;

objEmail.To = TO_ADDRESS;//whatever

objEmail.Subject = SUBJECT_TEXT ;//whatever

objEmail.Body = "\nName :" + this.tbFullName.Text + "\nEMail: " +
this.tbEMail.Text +"\n\nMessage:"+this.tbMessage.Text;

objEmail.BodyFormat = MailFormat.Text;

SmtpMail.SmtpServer = SMTP_SERVER; //whatever is the smtp


SmtpMail.Send( objEmail );

objEmail = null;

}

if I use it with my ISP on my IIS everything is fine I can send the form
without any problem. When I upload it to my host service (obviously
modifying accordingly the SMTP) I



Server Error in '/' Application.
-------------------------------------------------------------------------- ------

The transport failed to connect to the server.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The
transport failed to connect to the server.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the
exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x80040213): The transport failed to connect to the
server.
etc.etc.


The Hosting Service claims that is my code , but I cannot find anything
wrong with it.( considering that works with my IIS).but I don't like to say
that they are wrong until I am positive that I am not.

Can anybody help me please and give me more information on how to solve this
problem?



thank you in advance for your help
 
Z

Zagor

Thanks, Greg I hope I can find some light there.

Greg Burns said:
This site is usually recommended for trouble shooting:

http://www.systemwebmail.com/

HTH,
Greg

Zagor said:
Hi Frank,
the MailMessage is not an COM object,

actually is a memeber of System.Web.Mail.MailMessage

"Provides properties and methods for constructing an e-mail message" in
C#

I do not know the origin of this kind of exception.

I am trying to read everywhere to see if anybody had the same or similar
problem.

Thank you for your time

Francesco


Frank Mamone said:
Zagor,

I don't have any suggestions for you but I'm wondering why you are
getting
an Interop services exception. Is the mail object a COM object?


-Frank Mamone

I have a feedback form in my website with three TextBoxes and a SEND
button
in a user control.
Below is a piece of the code:
//On click event for the send LinkButton

private void SendClicked(object sender, EventArgs e){

try{

if (Page.IsValid){

SendMail();

Response.Redirect("notify.aspx?Notify:pass");}

}

catch(Exception ex){..................whatever}

//Actual code for sending the EMail

private void SendMail()

{

MailMessage objEmail = new MailMessage();


objEmail.From = this.tbEMail.Text;

objEmail.Priority = System.Web.Mail.MailPriority.High;

objEmail.To = TO_ADDRESS;//whatever

objEmail.Subject = SUBJECT_TEXT ;//whatever

objEmail.Body = "\nName :" + this.tbFullName.Text + "\nEMail: " +
this.tbEMail.Text +"\n\nMessage:"+this.tbMessage.Text;

objEmail.BodyFormat = MailFormat.Text;

SmtpMail.SmtpServer = SMTP_SERVER; //whatever is the smtp


SmtpMail.Send( objEmail );

objEmail = null;

}

if I use it with my ISP on my IIS everything is fine I can send the
form
without any problem. When I upload it to my host service (obviously
modifying accordingly the SMTP) I



Server Error in '/' Application.
--------------------------------------------------------------------------
------

The transport failed to connect to the server.
Description: An unhandled exception occurred during the execution of
the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The
transport failed to connect to the server.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the
exception can be identified using the exception stack trace below.

Stack Trace:

[COMException (0x80040213): The transport failed to connect to the
server.
etc.etc.


The Hosting Service claims that is my code , but I cannot find anything
wrong with it.( considering that works with my IIS).but I don't like to
say
that they are wrong until I am positive that I am not.

Can anybody help me please and give me more information on how to solve
this
problem?



thank you in advance for your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top