Solved

How to solve " BC30390" error?

Posted on 2002-07-29
5
959 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
  • 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 100 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Syntax Error 2 62
.Net Web Site IIS Web.Config Content-Security-Policy 1 60
Javascript and Jquery not firing 9 48
.NET tools for adding thread safety to a web app? 3 31
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

816 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now