Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 16th, 2006, 10:07 AM
Registered User
 
Join Date: Oct 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default File Share App Error

Each time I try to send a file using the file share program this error pops up.


Server Error in '/FileShare' Application.
The parameter 'from' cannot be an empty string.
Parameter name: from
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.ArgumentException: The parameter 'from' cannot be an empty string.
Parameter name: from

Source Error:

Line 54: Dim SmptCl As New SmtpClient(SmtpSettings.MailServer, SmtpSettings.MailPort)
Line 55: SmptCl.Credentials = GetCredentials(SmtpSettings)
Line 56: Dim MailMsg As New MailMessage(MsgFrom, MsgTo)
Line 57: MailMsg.Subject = MsgSubject
Line 58: MailMsg.Body = MsgText


Source File: D:\Documents and Settings\Administrator\My Documents\Mybooks\ASP Result\File Share\FileShare\App_Code\Utilities.vb Line: 56

Stack Trace:

[ArgumentException: The parameter 'from' cannot be an empty string.
Parameter name: from]
   System.Net.Mail.MailMessage..ctor(String from, String to) +867990
   Utilities.SendEmail(String MsgTo, String MsgFrom, String MsgSubject, String MsgText) in D:\Documents and Settings\Administrator\My Documents\Mybooks\ASP Result\File Share\FileShare\App_Code\Utilities.vb:56
   ContentFiles_Default.btnSend_Click(Object sender, EventArgs e) in D:\Documents and Settings\Administrator\My Documents\Mybooks\ASP Result\File Share\FileShare\ContentFiles\Default.aspx.vb:40
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
   System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +107
   System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

 
Old October 16th, 2006, 03:32 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

When you set a break point at the line that uses MsgFrom, what values does MsgFrom contain?

AFAIK, MsgFrom gets a value from a TextBox right? Are you sure you filled in everything correctly?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
File share website cluce BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 February 18th, 2008 06:24 PM
Wrox File Share - 1g file size limit b67 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 May 7th, 2007 04:24 PM
file in a share mode m_rajib74 C# 1 January 24th, 2007 03:26 PM
file in a share mode m_rajib74 C# 1 January 24th, 2007 03:25 PM
Error wriring to File Share bquery BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 January 2nd, 2006 07:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.