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 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 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 October 16th, 2006, 11:07 AM
Registered User
 
Join Date: Oct 2006
Location: , , .
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

  #2 (permalink)  
Old October 16th, 2006, 04:32 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,960
Thanks: 79
Thanked 1,559 Times in 1,536 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.
 


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
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 05: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



All times are GMT -4. The time now is 10:50 AM.


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