Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Server database mail with ASP.net

Posted on 2009-05-14
6
Medium Priority
?
368 Views
Last Modified: 2012-05-07
I am having a problem using SQL Server 2005 database mail from ASP.net (w/ VB.net).

I can run the stored procedure that sends the mail in SQL Server and it works perfect.

However, when I run the same stored procedure in ASP.net the email is not sent.

I obviously am missing something somewhere, any help????
0
Comment
Question by:yonbret
  • 3
  • 3
6 Comments
 
LVL 6

Expert Comment

by:bull_rider
ID: 24388030
Its actually the user who is running it from asp.net. His permissions are not set accordingly.
0
 

Author Comment

by:yonbret
ID: 24388047
I was guessing that.

Does it run using the Network Service account, like most ASP.net processes?

What permissions need to be set?
0
 

Author Comment

by:yonbret
ID: 24389262
I have discovered one other thing that is helpful to know.

If I run the stored proc using Windows Authentiacation, the email is sent without a problem.

If I run the stored proc using SQL Authentication, the email is not sent.
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
LVL 6

Expert Comment

by:bull_rider
ID: 24391749
Could you please mark this question answered then if it did resolve your actual issue?
0
 

Author Comment

by:yonbret
ID: 24396280
The question is not answered.

I need to know why SQL Authentication is not working, but Windows Authentication is working?

What account is used by SQL Authentication? What permissions need to be set for this account on the SMTP server?
0
 
LVL 6

Accepted Solution

by:
bull_rider earned 1500 total points
ID: 24397582
Please follow the below link:

http://www.sqlserverspecialists.co.uk/blog/_archives/2007/10/18/3299690.html

Let me know if you still face this issue.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

916 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