Emailing attachments

Discussion in 'ASP .Net' started by MW de Jager, May 23, 2005.

  1. MW de Jager

    MW de Jager Guest

    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
    MW de Jager, May 23, 2005
    #1
    1. Advertising

  2. 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

    "MW de Jager" wrote:

    > 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
    >
    >
    >
    =?Utf-8?B?c2FsZWVr?=, May 23, 2005
    #2
    1. Advertising

  3. MW de Jager

    MW de Jager Guest

    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

    "saleek" <> wrote in message
    news:...
    > 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
    >
    > "MW de Jager" wrote:
    >
    >> 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
    >>
    >>
    >>
    MW de Jager, May 23, 2005
    #3
  4. 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

    "MW de Jager" wrote:

    > 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
    >
    > "saleek" <> wrote in message
    > news:...
    > > 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
    > >
    > > "MW de Jager" wrote:
    > >
    > >> 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
    > >>
    > >>
    > >>

    >
    >
    >
    =?Utf-8?B?c2FsZWVr?=, May 23, 2005
    #4
  5. MW de Jager

    MW de Jager Guest

    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


    "saleek" <> wrote in message
    news:...
    > 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
    >
    > "MW de Jager" wrote:
    >
    >> 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
    >>
    >> "saleek" <> wrote in message
    >> news:...
    >> > 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
    >> >
    >> > "MW de Jager" wrote:
    >> >
    >> >> 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
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
    MW de Jager, May 24, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephen

    emailing passwords using .NET

    Stephen, Jul 20, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    373
    R.Balaji
    Jul 23, 2004
  2. Bill

    SMTPlib Emailing Attachments

    Bill, Sep 17, 2003, in forum: Python
    Replies:
    9
    Views:
    738
    Rudy Schockaert
    Sep 20, 2003
  3. codewarrior
    Replies:
    0
    Views:
    513
    codewarrior
    May 4, 2009
  4. Peter Green
    Replies:
    0
    Views:
    627
    Peter Green
    Nov 5, 2009
  5. grooveska
    Replies:
    8
    Views:
    235
    Bill Guindon
    Jun 9, 2007
Loading...

Share This Page