Showing posts with label received. Show all posts
Showing posts with label received. Show all posts

Saturday, March 31, 2012

Strange "Object reference not set to an instance of an object" error in webform

I suddenly received an unexpected error in my project. I have been working
on this project for some time without this issue. Nothing has changed in the
form that caused the exception. A little experimentation shows that I cannot
run ANY .NET web project without getting this error:

-----------------------
--

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 1: <%@dotnet.itags.org. Page Language="vb" AutoEventWireup="false"
Codebehind="Login.aspx.vb" Inherits="DataBayWeb.Login" %>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Line 3: <HTML
Source File: c:\inetpub\wwwroot\DataBayWeb\login.aspx Line: 1

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
System.Web.UI.Control.get_Controls()
System.Web.UI.Control.AddParsedSubObject(Object obj)

System.Web.UI.Control.System.Web.UI.IParserAccesso r.AddParsedSubObject(Objec
t obj)
ASP.Login_aspx.__BuildControlTree(Control __ctrl) in
c:\inetpub\wwwroot\DataBayWeb\login.aspx:1
ASP.Login_aspx.FrameworkInitialize()
System.Web.UI.Page.ProcessRequest()
System.Web.UI.Page.ProcessRequest(HttpContext context)

System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication+IExecutionSte
p.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously)

Other developers on my team can run the latest version of the project
without an issue. What has happened?

ChrisVery strange indeed. It might sound obscure, but try removing the
space in <%@. Page...

Otherwise, I would be tempted to do the inevitable and reinstall the
framework.

Simon.

Strange "Object reference not set to an instance of an object" error in web

I suddenly received an unexpected error in my project. I have been working
on this project for some time without this issue. Nothing has changed in the
form that caused the exception. A little experimentation shows that I cannot
run ANY .NET web project without getting this error:
----
--
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 1: <%@dotnet.itags.org. Page Language="vb" AutoEventWireup="false"
Codebehind="Login.aspx.vb" Inherits="DataBayWeb.Login" %>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Line 3: <HTML>
Source File: c:\inetpub\wwwroot\DataBayWeb\login.aspx Line: 1
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an
object.]
System.Web.UI.Control.get_Controls()
System.Web.UI.Control.AddParsedSubObject(Object obj)
System.Web.UI.Control.System.Web.UI.IParserAccessor.AddParsedSubObject(Objec
t obj)
ASP.Login_aspx.__BuildControlTree(Control __ctrl) in
c:\inetpub\wwwroot\DataBayWeb\login.aspx:1
ASP.Login_aspx.FrameworkInitialize()
System.Web.UI.Page.ProcessRequest()
System.Web.UI.Page.ProcessRequest(HttpContext context)
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionSte
p.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
Other developers on my team can run the latest version of the project
without an issue. What has happened?
ChrisVery strange indeed. It might sound obscure, but try removing the
space in <%@. Page...
Otherwise, I would be tempted to do the inevitable and reinstall the
framework.
Simon.

Tuesday, March 13, 2012

Strange problem in sending emails by asp.net

I use the following code to send email, and strange thing that I received the message at hotmail mail, and failed to receive it at yahoo mail , can you help me and explain what this happen and how to overcome this.


Regards
Serag Farag
PrivateSub Button1_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles Button1.Click

Dim msgmailAs System.Web.Mail.MailMessage

Dim SmtpMailAs System.Web.Mail.SmtpMail

msgmail =New System.Web.Mail.MailMessage

' SmtpMail =

msgmail.To = "elomah@dotnet.itags.org.yahoo.com"

msgmail.Cc = "ahmed_serageldin@dotnet.itags.org.hotmail.com"

msgmail.From = "ahmed_serageldin@dotnet.itags.org.hotmail.com"

msgmail.Subject = "subject of ggggggggggggggmsg"

msgmail.BodyFormat = System.Web.Mail.MailFormat.Html

msgmail.Body = " what u send mail ofgh ghgf ghr msgs"

SmtpMail.SmtpServer = "serag-0ivd22eow"

smtpmail.send(msgmail)

Response.Write("msg recived")

EndSub

Hello Serag and welcome to the forums.
First of all, if your email is received by Hotmail, then I don't thinkthere is a problem with your code. Maybe some wrong happened on its wayto Yahoo. Try to upload your script to a live server and then send theemail again.
Regards,


i saw the same problem in a diffirent thread i will check if i can find it for you but any way try what bilal suggest

try one of those links it might helps
http://forums.asp.net/916696/ShowPost.aspx
http://forums.asp.net/ShowPost.aspx?PageIndex=2&PostID=719622#719622
http://forums.asp.net/846879/ShowPost.aspx
and let me know if you solve it
good luck !!!