Sending email using SMTPMail requires user to be administrator on the server???

R

Robert Pettersson

Hi,

I have built an webapp in C# that uses SMTPMail to send mail to users.
When I installed it on the prodserver everything worked fine for me, but the
users can not send mail.
They get Access denied. If I add them to the administrator group of the
server everything works fine.

I have set
<identity impersonate="true"/>
in my web.config.

And tried to add users in my local SMTP Virtuall Server.
But I´m using an external Exchange as my SMTP server in my code.

Is there anything else I need to do to let the users send email? I read that
I need
to grant permissions in tha ACL(?), for users to send emails i ASP.NET?

Would be very greateful if anyone could help me!!

/Robert Pettersson
 
G

GrantMagic

AS well as setting "identity impersonate" to true, did you set which user to
impersonate.

i.e.
<identity impersonate="true" userName="DMN\UserName" password="password" />
 
J

joe

I am not sure if you need to do this but have you tried
with Deny users="?" //deny unauthenticated users

in the web config,
 
R

Robert Pettersson

When I try to set a specific user I get a error:

Access to the path "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\internalfundtrades\8b42c84e\34a38a07\hash.web" is denied.

But I don´t really want the user to impersonate another user. Beacuse I want
to pick up which logged on user it is to log the actions.
My application is used on intranet only, and I don´t allow anonymous access.
This is an update to my application, I used to have a VB6 component
that sent email using CDO, and that worked fine.

/Robert
 
G

GrantMagic

impersonating a user will not change which user is logging the actions, that
should be handeled within the application. Impersonating a user will merely
impersonate that user for actions on the server .. like sending the mail.
In you application you can then log which user sent the mail, or speficy
that in the from address.

If this solution is still viable for you, then about that error:
Is the user your impersonating an administrator on the server?
Have you tried restarting IIS?
If that fails, post a question of search on Google

Hope this can help you out

Grant
 
R

Robert Pettersson

I had to give permissions to the Temporary ASP.Net Files Dir.

Then the impersination worked, and the mail worked.

Thanks for the help.

Really appreciate it!

/Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top