473,660 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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="tr ue"/>
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
Nov 18 '05 #1
6 2900
AS well as setting "identity impersonate" to true, did you set which user to
impersonate.

i.e.
<identity impersonate="tr ue" userName="DMN\U serName" password="passw ord" />

"Robert Pettersson" <ro****@carnegi e.se> wrote in message
news:OT******** ******@TK2MSFTN GP09.phx.gbl...
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="tr ue"/>
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

Nov 18 '05 #2
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,
-----Original Message-----
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 theusers can not send mail.
They get Access denied. If I add them to the administrator group of theserver everything works fine.

I have set
<identity impersonate="tr ue"/>
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 thatI 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
.

Nov 18 '05 #3

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

Access to the path "C:\WINNT\Micro soft.NET\Framew ork\v1.1.4322\T emporary
ASP.NET Files\internalf undtrades\8b42c 84e\34a38a07\ha sh.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
"GrantMagic " <gr***@magicali a.com> wrote in message
news:eP******** ******@TK2MSFTN GP11.phx.gbl...
AS well as setting "identity impersonate" to true, did you set which user to impersonate.

i.e.
<identity impersonate="tr ue" userName="DMN\U serName" password="passw ord" />
"Robert Pettersson" <ro****@carnegi e.se> wrote in message
news:OT******** ******@TK2MSFTN GP09.phx.gbl...
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="tr ue"/>
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


Nov 18 '05 #4
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

"Robert Pettersson" <ro****@carnegi e.se> wrote in message
news:eE******** ******@TK2MSFTN GP11.phx.gbl...

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

Access to the path "C:\WINNT\Micro soft.NET\Framew ork\v1.1.4322\T emporary
ASP.NET Files\internalf undtrades\8b42c 84e\34a38a07\ha sh.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
"GrantMagic " <gr***@magicali a.com> wrote in message
news:eP******** ******@TK2MSFTN GP11.phx.gbl...
AS well as setting "identity impersonate" to true, did you set which user

to
impersonate.

i.e.
<identity impersonate="tr ue" userName="DMN\U serName" password="passw ord"

/>

"Robert Pettersson" <ro****@carnegi e.se> wrote in message
news:OT******** ******@TK2MSFTN GP09.phx.gbl...
> 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="tr ue"/>
> 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
>
>



Nov 18 '05 #5
It looks like you require authentication to send message using the Exchange
server ?

AFAIK in .NET 1.1 you can do that using the "fields" property.
http://blogs.bartdesmet.net/bart/arc...04/21/257.aspx

It doesn't have to be the user account. It could be a specific "service"
account...

Patrice

--

"Robert Pettersson" <ro****@carnegi e.se> a écrit dans le message de
news:OT******** ******@TK2MSFTN GP09.phx.gbl...
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="tr ue"/>
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

Nov 18 '05 #6

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

"GrantMagic " <gr***@magicali a.com> wrote in message
news:O%******** ********@TK2MSF TNGP11.phx.gbl. ..
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

"Robert Pettersson" <ro****@carnegi e.se> wrote in message
news:eE******** ******@TK2MSFTN GP11.phx.gbl...

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

Access to the path "C:\WINNT\Micro soft.NET\Framew ork\v1.1.4322\T emporary
ASP.NET Files\internalf undtrades\8b42c 84e\34a38a07\ha sh.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
"GrantMagic " <gr***@magicali a.com> wrote in message
news:eP******** ******@TK2MSFTN GP11.phx.gbl...
AS well as setting "identity impersonate" to true, did you set which user
to
impersonate.

i.e.
<identity impersonate="tr ue" userName="DMN\U serName"
password="passw ord" />

"Robert Pettersson" <ro****@carnegi e.se> wrote in message
news:OT******** ******@TK2MSFTN GP09.phx.gbl...
> 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="tr ue"/>
> 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
>
>



Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
351
by: ufraf | last post by:
Hey i am a total newbie in .net.I'm working on an assignment to send email to the adimin id that's my official id (xx.xx@something.com - the code developers id) when an invalid user trys to login to the application.I have to connect to my comapy's server to send emails.In the code when i give the mailserver as local host the message gets stored in my queues folder.If i giver the ip address of the server i want to connect to server...
13
3211
by: joe215 | last post by:
I want my users to send emails from a Windows app that I am developing in Visual Basic.NET 2003. I found a good example of sending email to a SMTP server using the SmtpMail class. However, using this, it seems, that the user must install IIS on their computer. Isn't there a class that will detect whatever mail server is available on a computer and use that? How do I create this functionality without having the user add any other...
5
2134
by: Pascal Cloup | last post by:
Hello, I just want to send an e-mail from my windows form application without specifying SmtpServer. On my computer, when i specify my smtpserver, SmtpMail.Send( aMail ) works fine, but without specifuing SmtpMail.SmtpServer, the message is never sent.. I tried various things like SmtpMail.SmtpServer = "" or SmtpMail.SmtpServer = "localhost" or SmtpMail.SmtpServer.Insert"0,"localhost""), ... the result was the same
6
2409
by: Eduardo Rosa | last post by:
Somebody knows how I queue email using .Net? thanks a lot
2
1499
by: Rene | last post by:
Hi all i need some help. i try to send mail with the following code. Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click Dim mailMsg As New MailMessage mailMsg.From = rene.fehr@netradox.com mailMsg.To = info@netradox.com mailMsg.Subject = "Testmail vom Webforum" mailMsg.Body = "some body text"
9
3215
by: B-Dog | last post by:
I've built a small app that sends mail through our ISP's SMTP server but when I try to send through my local exchange server I get CDO error. Does webmail use SMTP or does it strictly rely on CDOmail. I don't want to use the Outlook reference because outlook prompts each time program access it and I have found a way to disable that. Can I use webmail with exchange? Thanks
3
3611
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is smtpMail.Send("from@here.com", to@there.com, "Message subject", "Message Body") I'm sending it to my own email address on a different server using a dummy
14
9886
by: sridhar | last post by:
iam having user account on an exchangeserver. with that can i send an email using python? if iam using the following code iam getting error fromAddress = 'sridhar_kasturi@satyam.com' toAddress = 'sridhar_kasturi@satyam.com' msg = "Subject: Hello\n\nThis is the body of the message." import smtplib
3
2393
by: raj200809 | last post by:
when i m sending mail i received error from symantec Antivirus" Your email message was unable to be sent because your mail server rejected the message 550-5.7.1 the ip you’re using to send mail is not authorized" i have configure smtp server put 127.0.0.1 ip in relay and also put 127.0.0.1 ip in connection. using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing;
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8542
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1740
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.