Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 30th, 2007, 04:04 PM
rav rav is offline
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error: Capter 3 in ASP.Net 2.0 web prog

Hello:
I am newbie and now compleated reading chapter 3 of asp.net 2.0 web programming problem-design-solution.
I am doing with C#.
Not able to send eamil message with contract.aspx page.
I am running the site in my localhost. I am trying to send email to myself and doing the following in web.config file. It shows the label message that my email is sent, but i did not receive it in my yahoo email. Why is that???

<system.net>
††<mailSettings>
†††<smtp deliveryMethod="PickupDirectoryFromIis"††from="rza idi1@yahoo.com">
    <network defaultCredentials="true" host="(localhost)" port="25"/>
†††</smtp>
††</mailSettings>
</system.net>

Also, I tried setting up smtp deliveryMethod="Network" , then my error label shows that unable sending message...
I will appreciate your help.
Thank you
  #2 (permalink)  
Old August 30th, 2007, 04:50 PM
Authorized User
 
Join Date: Mar 2007
Location: , , .
Posts: 39
Thanks: 0
Thanked 1 Time in 1 Post
Default

You need to have Internet Information Services (IIS) running on your local machine, with SMTP enabled in order to send mail.

Here is link to IIS site:
http://www.iis.net/default.aspx?tabid=1

  #3 (permalink)  
Old August 31st, 2007, 01:40 PM
rav rav is offline
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you
I am running IIS 5.1 and i have now enabled SMTP and allowed my computer to relay through this virtual server. Still when I run my application I get the Exception: ((System.Net.Mail.SmtpException)(ex))={"Failure sending mail."}
ex._innerException._message ="The remote name could not be resolved: '(localhost)'" "

I am not able to send eamil to myself from contact page..

I am specifying the following in web.config
<TheWebHouse defaultConnectionStringName="LocalSqlServer">
        <contactForm mailTo="rzaidi1@yahoo.com"/>
    </TheWebHouse>

<smtp deliveryMethod="Network" >
<network defaultCredentials="true" host="(localhost)" port="25"/>
            </smtp>


Why do I get this message??? Is it bec. I am not running MSSQL?? I closed MSSQL from computer management and now not able to start up agian..
Need Your help.
Thx


  #4 (permalink)  
Old August 31st, 2007, 03:42 PM
Authorized User
 
Join Date: Mar 2007
Location: , , .
Posts: 39
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try host="localhost"

Also, SQL has nothing to do with SMTP server, so that is not your problem.

  #5 (permalink)  
Old August 31st, 2007, 04:58 PM
rav rav is offline
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I did as you said and this time I get a different error..

{"Mailbox unavailable. The server response was: 5.7.1 Unable to relay for rzaidi1@yahoo.com"}
Why do I get this error?? I have this email address that I just checked...
waiting for reply
thx

  #6 (permalink)  
Old August 31st, 2007, 06:31 PM
Friend of Wrox
 
Join Date: Mar 2006
Location: , , Portugal.
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you trying to send email messages from your local machine?

If so... Not every email accounts allow that!

If you can, try to use some gmail account!

  #7 (permalink)  
Old September 1st, 2007, 11:44 AM
rav rav is offline
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you
I tried Gmail account too and still get the errors...
Anyways, I will wait to fix this error untill I get a web hosting...I will check it later after I host it...
Now, my another problem is when I am doing health management code of chapter 3 where it asks for creating custom events in seperate asembly then the solution... How to do it?? How to create a seperate solution for main code??
I tried adding new solution and then deleted default form, added cs file named CustomEvents.cs with the code given in chapter 3, then Build the solution... I get an error saying starting Main is not found...HOw to fix it??
Am I doing it correct?? Is there any other method of doing it?
waiting for your reply..
Thanks


  #8 (permalink)  
Old September 2nd, 2007, 08:18 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Copenhagen, , Denmark.
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default

rav, concerning your second question, I asnwered you here:

http://p2p.wrox.com/topic.asp?TOPIC_ID=64591

  #9 (permalink)  
Old September 3rd, 2007, 02:56 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Copenhagen, , Denmark.
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default

rav,

I had the same problem as you. Managed to solve it this night.

Check my blog for a post that might help you out :)

Cheers,

Peter

http://entropia-online.blogspot.com/
  #10 (permalink)  
Old September 5th, 2007, 07:51 PM
rav rav is offline
Authorized User
 
Join Date: Feb 2007
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks all
I am finally not getting any errors sending email...but still I don't receieve the eamil that I am sending via contact page.. I tried sending to both yahoo and gmail accounts... I have also set Relay Access of SMTP in IIS for 127.0.1........
I don't know why...If any other suggestions to fix this problem then please let me know..
As I said I will wait to upload the site on the hosting server and then check if I am able to receive eamil from contact page...
Thanks..

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET E-Commerce Prog Problem - Design - gapoce All Other Wrox Books 42 February 9th, 2011 02:06 AM
Difference between ASP.NET programmer v/s C# prog myquery General .NET 1 October 20th, 2007 06:43 AM
ERROR using ASP.net Web Site Administration Tool erictamlam ASP.NET 2.0 Basics 0 April 5th, 2007 02:52 AM
ERROR using ASP.net Web Site Administration Tool erictamlam C# 2005 0 April 3rd, 2007 01:28 AM
ASP.NET E-Commerce Prog Problem - Design -Solution cat2123 All Other Wrox Books 1 December 29th, 2003 05:27 AM



All times are GMT -4. The time now is 04:10 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.