|
-
March 13th, 2012, 05:01 AM
#1
Runtime error after hosting the website
hello
i have developed a website it's works properly in my own pc but after hosting it it gives error in inquiry module.whenever inquiry send it gives error as shown below
Server Error in '/' Application
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
-
March 13th, 2012, 09:29 AM
#2
Re: Runtime error after hosting the website
That is a standard error message. Please show us your code and give details as to when this error occurs. At this starge, it can be anything, like martians attacking your PC for instance...
-
March 13th, 2012, 11:55 PM
#3
Re: Runtime error after hosting the website
actually error occur when i am sending inquiry...so on that page i am sending mail to admin at that time this error occur. here is the code for the mail sending.
Code:
protected void btnadd_Click(object sender, EventArgs e)
{
System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
msg.Sender = new MailAddress(txtmail.Text.ToString(),txtname.Text.ToString());
msg.Subject = "RADHIKA INQUIRY";
msg.To.Add("[email protected]");
msg.From = new MailAddress(txtmail.Text.Replace("''","'").ToString(),txtname.Text.ToString());
msg.SubjectEncoding = System.Text.Encoding.UTF8;
msg.Body ="Name:="+txtname.Text+"<br/>"+"Compny Name:="+txtcname.Text+"<br/>"+"State:="+txtstate.Text+"<br/>"+"Address:="+txtadrs.Text+"<br/>"+"E-MAIL:="+txtmail.Text+"<br/>"+"Mobile no:="+txtmobile.Text+"<br/>"+"Office no:="+txttel.Text+"<br/>"+"Inqury:="+txtquiry.Text;
msg.BodyEncoding = System.Text.Encoding.UTF8;
msg.IsBodyHtml = true; // if msg is in html format
msg.Priority = MailPriority.High;
//Add the Creddentials
SmtpClient client = new SmtpClient();
client.Credentials = new System.Net.NetworkCredential("***************@gmail.com", "*************");
client.Port = 587;
client.Host = "smtp.gmail.com";
client.EnableSsl = true;
object userState = msg;
try
{
client.Send(msg);
txttel.Text="";
txtstate.Text = "";
txtpin.Text = "";
txtname.Text = "";
txtmobile.Text = "";
txtmail.Text="";
txtcname.Text = "";
txtadrs.Text = "";
txtquiry.Text = "";
}
catch (System.Net.Mail.SmtpException ex)
{
//MessageBox.Show(ex.Message, "Send Mail Error");
}
}
i am using SQL server 2008 as back end and MS visual stdio 2010
Last edited by GremlinSA; March 14th, 2012 at 12:15 PM.
Reason: removed Mail login Details..
-
March 14th, 2012, 12:21 PM
#4
Re: Runtime error after hosting the website
I suspect that the server this is now running on has been firewalled, and possibly cannot connect through to Gmail server..
Try using telnet to test if the server can connect to gmail..
on the Server or Via RDP .. start telnet and enter
open smtp.gmail.com 587
and you should get a reply like this ..
220 mx.google.com ESMTP
If not you found the problem...
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
March 16th, 2012, 04:19 AM
#5
Re: Runtime error after hosting the website
can you tell me how to start telnet? n do all the things that you have said... and firewall would be off only for gmail? if i change yahoo then it will be done?
-
March 16th, 2012, 04:30 AM
#6
Re: Runtime error after hosting the website
Start > Run > Telnet
It's a console app (Old dos text layout)...
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
March 19th, 2012, 05:13 PM
#7
Re: Runtime error after hosting the website
Hi CSharpque
I guess you are reviewing your web project from a client pc.
if you want to see detailed error message I suggest you have to go to web server and review for error message from there. it has to give you some idea clear. which is possible issue.
now if your web app is going to send email from server web you'd have to see performance there.
best regards
-
March 19th, 2012, 11:57 PM
#8
Re: Runtime error after hosting the website
sir i have write "telnet" in Run but it's can't find.....error occur "Windows can not find telnet. Make sure you typed name correctly and then try again".
-
March 19th, 2012, 11:58 PM
#9
Re: Runtime error after hosting the website
actually hosting done by someone else
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|