Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 29th, 2012, 06:49 PM
Authorized User
Points: 135, Level: 2
Points: 135, Level: 2 Points: 135, Level: 2 Points: 135, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2012
Posts: 27
Thanks: 4
Thanked 2 Times in 2 Posts
Default Access to a socket in a way forbidden by its access permissions

I cannots end an email (ch. 09), getting the following error message:

An attempt was made to access a socket in a way forbidden by its access permissions 206.46.232.100:25
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.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 206.46.232.100:25

Source Error:
Code:
Line 18: 
Line 19:       SmtpClient mySmtpClient = new SmtpClient();
Line 20:       mySmtpClient.Send(myMessage);
Line 21:     }
Line 22: }
Source File: c:\BegASPNETCS\SiteCS\Demos\Email.aspx.cs Line: 20

My email account is with Verizon.net.
I tried all the options suggested in ch.09 for the web.config file.
What may cause that? Could it be because of Norton 360 settings?
Reply With Quote
  #2 (permalink)  
Old October 29th, 2012, 07:14 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

It could be Norton (although I would assume it allows for port 25 to go out by default; try turning it off to make sure), but I think it's more likely that Verizon needs other setup data to work correctly. Check out their FAQs (if any) or contact their support department to find out more.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
ASP4student (October 30th, 2012)
  #3 (permalink)  
Old November 1st, 2012, 06:59 AM
Authorized User
Points: 135, Level: 2
Points: 135, Level: 2 Points: 135, Level: 2 Points: 135, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2012
Posts: 27
Thanks: 4
Thanked 2 Times in 2 Posts
Default

The resolved all the issues and the email message passed now. Here below is the full description.

I resolved the error:
"An attempt was made to access a socket in a way forbidden by its access permissions ...25"
by changing Norton 360 settings:
Norton, Settings, "Scans and Risks" tab, click "Email Antivirus Scan": uncheck "Scan outgoing email messages", select "Permanent".

Another error appeared:
"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ...25"
which I resolved by changing:
host="smtp.verizon.net" to host="outgoing.verizon.net".

I also mention that the user name does not contain "@verizon.net",but only what's before it. In fact, all the settings must be exaclty as in the email account properties (Tools, Accounts, select account, click Properties).
Reply With Quote
The Following User Says Thank You to ASP4student For This Useful Post:
Imar (November 2nd, 2012)
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Access Forbidden jfbesq BOOK: Professional Search Engine Optimization with PHP: A Dev's Guide to SEO ISBN: 978-0-470-10092-9 1 May 2nd, 2010 05:39 PM
VB. NET HTTP/1.1 403 ACCESS FORBIDDEN spaxton111757 Classic ASP Professional 0 July 8th, 2007 08:03 AM
Forbidden access chapter12 page 361 chokk BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 March 22nd, 2005 05:07 PM
Access Permissions problem Meanwhile Classic ASP Databases 8 February 15th, 2005 11:39 PM
Getting Access permissions mont2004 Access ASP 1 February 12th, 2004 02:35 PM



All times are GMT -4. The time now is 02:27 AM.


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