Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I wrote a small website in VWD. I am running it on my home machine using the localhost features of VWD. It runs flawlessly.

Now the backstory. I had a linux server with gatorhost. I had them switch my domain and my server type to windows because i decided to learn asp.net(c#). I had a million problems with them hours on the phone. Issues with unable to connect when you search for my domain and my e-mail features and ftp features where all messed up took them hours to figure it out in multiple calls and tickets.

So now i think i got it all working i load my site through VWD onto my server (www.contentiousweb.com) All of my front end code works fine as far as form validation and links.

When i hit my submit buttons that would execute my c# code nothing happens at all. not a thing. When the forms are filled out wrong the validation works. I got no errors or anything. i like dont know where to start. Is it my code there server how much can i rely on VWD in being right because i cannot rely on my self lol.

Webconfig file. (i swapped out my pw and e-mail)

<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="Ralph &lt;*********.com&gt;">
<network enableSsl="true" host="smtp.live.com" userName="*************@hotmail.com" password="***********" port="587" />
</smtp>
</mailSettings>
</system.net>

Bellow is the button.

protected void Button1_Click(object sender, EventArgs e)
{

if (Page.IsValid)
{
string fileName = Server.MapPath("_TextFiles/ContactForm.txt");
string mailBody = File.ReadAllText(fileName);

mailBody = mailBody.Replace("##Name##", nameBox.Text);
mailBody = mailBody.Replace("##Email##", emailBox.Text);
mailBody = mailBody.Replace("##Subject##", subBox.Text);
mailBody = mailBody.Replace("##Message##", MsgField.Text);

MailMessage myMessage = new MailMessage();
myMessage.Subject = "Response from  Contact Page";
myMessage.Body = mailBody;

myMessage.From = new MailAddress("********", " Contact");
myMessage.To.Add(new MailAddress("********", " Server"));

SmtpClient mySmtpClient = new SmtpClient();
mySmtpClient.Send(myMessage);

Message.Visible = true;
ContactTable.Visible = false;
System.Threading.Thread.Sleep(5000);

}
}

}

Any help would be greatly appresciated. i am new and learning but with my experince and problems with hostgator i think that it is something on there end because everything else has been. i am clueless.

Please let me know if there is anymore information i can provide. Thank you for any help

share|improve this question
    
[18:41:42.938] Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 @ http://contentiousweb.com/ScriptResource.axd?d=EJBSV2JIVC3wCtbtVqDWEZfeOsqUeA-l1‌​kZnjjZKvx15e0cjnzPdj4H78hvszmtfrIhAM96VdUstdDjn1xGAbsydMzIjEQeNWDOz2tihnjEjxDW5es‌​VemHLoHR01oIyUBoZTNPd7atx4-EPBnuVlWYbQIeLdoH_eBXy1j9kav6ac2ptv4Cl8sraaDBGXntVH0&t‌​=ffffffff940d030f:1507 I found this error using firefox wed dev tools. if anyone knows what i means? –  jackncoke May 29 '12 at 22:46

1 Answer 1

try code after removing validations or setting cause validation property to false in .aspx page. If your code works fine then you have to redo all validations as you have put some wrong validation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.