Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to solve " BC30390" error?

Posted on 2002-07-29
5
Medium Priority
?
995 Views
Last Modified: 2007-11-27
Good morning everybody,
I am trying to incorporation E-mail into my application. At the beginning of project, I already import System.Web.Mail Namespace, but when I compiled my project, it showed me this error: BC30390: 'System.Web.Mail.SmtpMail.Private Overloads Sub New()' is not accessible in this context because it is 'Private'.
 Dim MyMailConnection as new SmtpMail
How can I solve this problem?

Thank you very much,I am looking forward to your response.

0
Comment
Question by:lily66
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 23

Expert Comment

by:naveenkohli
ID: 7185282
Smtp class does not have a public constructor. Therefore you are getting these compile errors. You can't instantiate a new object of this class. To use this class you don't reuire to create a new instance. Send method of this class is static or shared (in VB terms). You call it directly call it on class. HEre is a small sample from docs.

Dim from As String = "from@microsoft.com"
Dim mailto As String = "to@microsoft.com"
Dim subject As String = "UtilMailMessage001"
Dim body As String = "<html><body>UtilMailMessage001 - success</body></html>"
SmtpMail.Send(from, mailto, subject, body)
0
 

Author Comment

by:lily66
ID: 7185388
hi, naveenkahli
Thanks for your reply. I tried you code sample. It showed me this error as followings:
The "SendUsing" configuration value is invalid.
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.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid.

Source Error:

Line 38: Dim subject as string ="Welcome"
Line 39: Dim body as string ="<html><body>Welcome to be our new user, We hope you will enjoy your studying.</body></html>"
Line 40: SmtpMail.Send(from,mailto,subject,body)

Can you help me figure out what it means. I really appreciat your help.

Lily
 
0
 
LVL 23

Accepted Solution

by:
naveenkohli earned 400 total points
ID: 7185462
Try setting Smptp mail server as "localhost" or IP address of the machine that will have SMTP server hosted. If its your local machine, then set IP of your machine as SMTP server.
give it a shot
0
 

Author Comment

by:lily66
ID: 7186022
Hi, naveenkohli

I really appreciate you, right now it works properly.

lily
0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 7186039
I am glad i could help.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question