Emailing attachments

M

MW de Jager

I am sending an email with attachments from a dotnet ASP application. If I
send an email it works fine if the attachment is located in a folder on my
pc, which is open to all users on that PC, it usually works fine. If I try
to send something form My Documents, the file cannot be sent. Why is this?

Kind regards
MW de Jager
 
G

Guest

Prob because your web app is running under aspnet user which doesnt have
access to my documents. Which is only accessible to the particular user
logged on.

regards,

KS
 
M

MW de Jager

I'm sure that is exactly why I have the problem. If my PC becomes the web
server though, and someone else tries to open the web app as a web page on
his/her machine, and tries to attach a file, they have the same problem,
just worse. No file can be attached successfully. It seems as if the user
that runs the webapp, on the client machine, does not have any file access
rights on that machine.

What do I need to change in my web app, to have this problem disappear?

Regards
MW
 
G

Guest

Well, giving aspnet access would not be a secure solution.

You may want to try impersonation - whereby your application impersonates
the users credentials.

regards,

KS
 
M

MW de Jager

Tried impersonation.

Does not help. If I connect from another PC, the webpage shows me who is
being impersonated, i.e. the local user, but the app still fails to
succesfully attach a file to the email and send it.

How do Yahoo etc do it? When you attach more than one file to an email, it
will attach them individually, with an upload inbetween attachments. If I
try to do this, my email is blanked every time I click the attach button,
because of the stateless nature of the page. Every roundtrip reinitialises
the email object clearing all previous attachments.

But I still have the initial problem of not being able to attach a file to
an email because of user rights on the client machine

Any help anyone
MW
 

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,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top