p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=560)
-   -   Access to a socket in a way forbidden by its access permissions (http://p2p.wrox.com/showthread.php?t=88704)

ASP4student October 29th, 2012 06:49 PM

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?

Imar October 29th, 2012 07:14 PM

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

ASP4student November 1st, 2012 06:59 AM

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).


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

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