473,789 Members | 2,833 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Emailing attachments

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
Nov 19 '05 #1
4 1308
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

Nov 19 '05 #2
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" <sa****@discuss ions.microsoft. com> wrote in message
news:27******** *************** ***********@mic rosoft.com...
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

Nov 19 '05 #3
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" <sa****@discuss ions.microsoft. com> wrote in message
news:27******** *************** ***********@mic rosoft.com...
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


Nov 19 '05 #4
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" <sa****@discuss ions.microsoft. com> wrote in message
news:6C******** *************** ***********@mic rosoft.com...
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" <sa****@discuss ions.microsoft. com> wrote in message
news:27******** *************** ***********@mic rosoft.com...
> 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
>>
>>
>>


Nov 19 '05 #5

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

Similar topics

9
10957
by: Bill | last post by:
I am trying to have the capability to email attachments. Specifically I want to be able to email a specific attachment that I name that may be a PDF document, text doc, etc. I already have a working piece of code that emails jpg attachments but does not work with any other types of attachments. Could someone tell me how to modify this code to send other types of attachments like the one's stated above(especially PDF's)? Also how do I...
1
341
by: Bob-O | last post by:
Need your help in sending an email message with an attachment in my VB.Net program. Sending a body message is no problem. I don't know how to use the attachment property in an emai Following is an excerpt from the program Imports System.Web.Mai Imports System.Web.HttpServerUtilit Imports System.Diagnostics Public Class Emailin Inherits System.Web.UI Pag
9
2249
by: Brendan MAther | last post by:
I have a table called Contact_Info. I have a form that allows me to show all the contacts from a specified city and sector. Once these contacts appear on my new form I would like to be able to press a button and it would take their email addresses, from the 'email' field, and enter them into Outlook in the "TO:" box so that they can all be emailed the same document. Any help would be much appreciated, thank you, Brendan
5
7386
by: Colin Anderson | last post by:
I discovered, with great excitement, this article http://www.davison.uk.net/vb2notes.asp when researching methods for emailing from Access via Notes. Unfortunatly, when I run this I get a Run-time error. When I run it on an XP machine it crashes, but on an NT box it just generates an unknown error, handled by the error handler. I have debugged and stepped through the code and have narrowed the issue to the point at which the...
4
1449
by: Farooq Khan | last post by:
hi, i'm using CDONTS component for emailing through one of my web service like this // Start of code // 'email' is the CDONTS object name email.send(EmailFrom.ToString(), EmailTo.ToString(), Subject.ToString(), Body.ToString(), 1)
1
1241
by: Will | last post by:
Hey guys, i need a code that will allow users to email to multiple people as well as add as many attachments as user likes, and will work with outlook express/ or microsoft outlook (any version) ... (can it also go through the anti virus program before being sent ?) THANX IN ADVANCE NEED THE CODE PLEASE
1
1558
by: mike11d11 | last post by:
I'm having a problem trying to add attachments to my email from my C:\ drive. What I'm trying to do here is have my database run a bunch of queries that gives me a report that I'm putting in the body of my email message as HTML format using a macro Sendobject. But this doesn't allow me to add any attachments from my machine. I'm positive this could be done through VBA code but I know very little on the programming side. could someone...
3
2216
by: dee | last post by:
I need to send an email containing 2 reports. I have tried sending a 2 page snapshot report, but while it prints just fine before sending, email is only receiving 1 page. Is there a way to do this in VB code? Can I somehow program the 'Attach:' line in outlook express to include 'Report1' and 'Report2'? If there is, I would very grateful for a few lines of code.
1
3279
by: =?Utf-8?B?U2FpIFZhamph?= | last post by:
Hi I am trying to send a .pdf document as an email attachment using net.mail. This email is being sent by a windows service application. After i receive the email, and when i try to open the attachment, i get the following error message... "adobe reader could not open <filenamebecuase it is either not a suppported file type or because the file has been damaged(for example, it was sent as an email attachment and wasn't correctly...
0
9666
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
9511
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,...
0
10410
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9984
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
7529
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
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
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.