Hi,
I created a Mail Application using Asp.Net and C#.... The same application when i executed in my friends system is working fine,... But when i execute in my system it is giving error..
But it is delevering mail without any attachment... The error is in attachment part..
When i try to attach any file.. It says the following error.
Server Error in '/MailingApp' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 110: {
Line 111: // gets the file name with the whole path
Line 112: string attachedFile = File1.PostedFile.FileName;
Line 113:
Line 114:
Source File: d:\inetpub\wwwroot\mailingapp\default.aspx.cs Line: 112
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
EmailApplication._Default.Button2_Click(Object sender, EventArgs e) in d:\inetpub\wwwroot\mailingapp\default.aspx.cs:112
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0
Please kindly help me to fix this!!!11
Regards,
Saravanan.M.....
Email ID :
[email protected]