Click here to Skip to main content
15,915,703 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionCreating Word Documents with Passwords using ASP.NET Pin
Jijesh.V.R2-Mar-07 21:22
Jijesh.V.R2-Mar-07 21:22 
AnswerRe: Creating Word Documents with Passwords using ASP.NET Pin
Vasudevan Deepak Kumar4-Mar-07 2:07
Vasudevan Deepak Kumar4-Mar-07 2:07 
QuestionRe: Creating Word Documents with Passwords using ASP.NET Pin
Jijesh.V.R4-Mar-07 22:41
Jijesh.V.R4-Mar-07 22:41 
AnswerRe: Creating Word Documents with Passwords using ASP.NET Pin
Vasudevan Deepak Kumar6-Mar-07 9:44
Vasudevan Deepak Kumar6-Mar-07 9:44 
QuestionAsp.Net Menus (VB.NET) Pin
joymukharji2-Mar-07 20:22
joymukharji2-Mar-07 20:22 
AnswerRe: Asp.Net Menus (VB.NET) Pin
Harini N K2-Mar-07 22:10
Harini N K2-Mar-07 22:10 
QuestionAsp.Net Menus (VB.NET) Pin
joymukharji6-Mar-07 19:32
joymukharji6-Mar-07 19:32 
QuestionAttaching the document while sending mails Pin
Member 35935752-Mar-07 20:18
Member 35935752-Mar-07 20:18 
Hi

I am facing error in attaching a document while mailing.The codings are as belows..

CODE:

If Not (inpAttachment1.PostedFile Is Nothing) Then
' Get a reference to PostedFile object
Dim attFile As HttpPostedFile = inpAttachment1.PostedFile
' Get size of the file
Dim attachFileLength As Integer = attFile.ContentLength
' Make sure the size of the file is > 0
If attachFileLength > 0 Then
' Get the file name
strFileName = Path.GetFileName(inpAttachment1.PostedFile.FileName)
' Save the file on the server
inpAttachment1.PostedFile.SaveAs(Server.MapPath(strFileName))
' Create the email attachment with the uploaded file

Dim attach As New MailAttachment(Server.MapPath(strFileName))
' Attach the newly created email attachment
mailMessage.Attachments.Add(attach)
' Store the attach filename so we can delete it later
attach1 = strFileName
End If

Error :

System.UnauthorizedAccessException: Access to the path "c:\inetpub\wwwroot\Pinkerton\PTS.doc" is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at Pinkerton.Mail.SendMail.btnsend_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\pinkerton\mail.aspx.vb:line 125


Note: The line 125 is inpAttachment1.PostedFile.SaveAs(Server.MapPath(strFileName))

It works well when I am sending mails without attachement.at the time of attachment the above error appears. I have to upload this file to server.


Thanxxx in advance...

AnswerRe: Attaching the document while sending mails Pin
Haissam3-Mar-07 14:01
Haissam3-Mar-07 14:01 
GeneralRe: Attaching the document while sending mails [modified] Pin
Vasudevan Deepak Kumar4-Mar-07 2:08
Vasudevan Deepak Kumar4-Mar-07 2:08 
Questionwysiwyg editor in asp.net 2.0 c# Pin
Malayil alex2-Mar-07 19:55
Malayil alex2-Mar-07 19:55 
AnswerRe: wysiwyg editor in asp.net 2.0 c# Pin
badgrs3-Mar-07 10:39
badgrs3-Mar-07 10:39 
AnswerRe: wysiwyg editor in asp.net 2.0 c# Pin
Haissam3-Mar-07 14:16
Haissam3-Mar-07 14:16 
AnswerRe: wysiwyg editor in asp.net 2.0 c# Pin
Vasudevan Deepak Kumar4-Mar-07 2:09
Vasudevan Deepak Kumar4-Mar-07 2:09 
QuestionRRS Pin
fridon2-Mar-07 18:20
fridon2-Mar-07 18:20 
AnswerRe: RSS Pin
fridon2-Mar-07 18:23
fridon2-Mar-07 18:23 
GeneralRe: RSS Pin
Vasudevan Deepak Kumar6-Mar-07 9:46
Vasudevan Deepak Kumar6-Mar-07 9:46 
Questionhow to send sms in asp.net without any third party sms gateway.How to create own sms gateway.i want a code or any reference website address.i know if its possible to create own sms gateway.please tell me everyone and help me . Pin
Member 38771892-Mar-07 17:48
Member 38771892-Mar-07 17:48 
Questionhow to send sms in asp.net without any third party sms gateway.How to create own sms gateway.i want a code or any reference website address.i know if its possible to create own sms gateway.please tell me everyone and help me . Pin
Member 38771892-Mar-07 17:47
Member 38771892-Mar-07 17:47 
AnswerRe: how to send sms in asp.net without any third party sms gateway.How to create own sms gateway.i want a code or any reference website address.i know if its possible to create own sms gateway.please tell me everyone and help me . Pin
Vasudevan Deepak Kumar6-Mar-07 9:47
Vasudevan Deepak Kumar6-Mar-07 9:47 
QuestionError in Creating Structs Pin
chitra4sat2-Mar-07 16:21
chitra4sat2-Mar-07 16:21 
AnswerRe: Error in Creating Structs Pin
Rhys Gravell4-Mar-07 20:57
professionalRhys Gravell4-Mar-07 20:57 
Questiontruncate strings Pin
nikneem20052-Mar-07 13:32
nikneem20052-Mar-07 13:32 
AnswerRe: truncate strings Pin
Harini N K2-Mar-07 13:51
Harini N K2-Mar-07 13:51 
GeneralRe: truncate strings Pin
nikneem20052-Mar-07 13:57
nikneem20052-Mar-07 13:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.