Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 24th, 2004, 09:10 AM
Authorized User
 
Join Date: Sep 2004
Location: Bangalore, Karnataka, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access is denied.

Access is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where
it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access is denied.

To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group.
Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:


Line 11: Public Function startOutlook(ByVal toVal As String, ByVal subjectVal As String, ByVal bodyVal As String)
Line 12: 'Return a reference to the MAPI layer
Line 13: Dim ol As New Outlook.Application
Line 14: Dim ns As Outlook.NameSpace
Line 15: Dim fdMail As Outlook.MAPIFolder

Pls help me!!!!!!!!!!!!!!!!!11
__________________
RK
Reply With Quote
  #2 (permalink)  
Old November 24th, 2004, 09:18 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts
Default

So... what are you trying to access?

Reply With Quote
  #3 (permalink)  
Old November 25th, 2004, 12:56 AM
Authorized User
 
Join Date: Sep 2004
Location: Bangalore, Karnataka, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by stu9820
 So... what are you trying to access?



I have a problem while executing the following lines of code. Actually in this code I am opening the MS Outlook and selecting each and every items of the inbox items and saving them in the local folder. This particular code I am executing in the asp.net webform vb as code behind.
 The problem is at the line "objApp = New Outlook.Application" it is throwing an exception saying that "Access is denied." What could be the problem? I have added the Ms Outlook com reference also but still it is giving this error.


Code:

Dim objApp As Outlook.Application
                Dim objNameSpace As Outlook.NameSpace
                Dim objMAPIFolder As Outlook.MAPIFolder
                Dim objMailItem As Outlook.MailItem
                Dim iRow As Integer, i As Integer, j As Integer

                objApp = New Outlook.Application
                objNameSpace = objApp.GetNamespace(Type:="MAPI")
                objMAPIFolder = objNameSpace.GetDefaultFolder(FolderType:=Outlook. OlDefaultFolders.olFolderInbox)
                For i = 1 To objMAPIFolder.Items.Count
                    objMailItem.SaveAs("c:\temp\mmcs\" & objMailItem.Subject & ".msg")
                    If objMailItem.Attachments.Count <> 0 Then
                        For j = 1 To objMailItem.Attachments.Count
                            objMailItem.Attachments.Item(j).SaveAsFile("c:\tem p\mmcs\" & objMailItem.Attachments.Item(j).FileName)
                        Next j
                    End If
                Next i

Thank you sir
I am promptly waiting for your replay
Reply With Quote
  #4 (permalink)  
Old November 30th, 2004, 12:56 AM
Authorized User
 
Join Date: Sep 2004
Location: Bangalore, Karnataka, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Plzzzzzzzzzzzz

Help me
RK

RK
Reply With Quote
  #5 (permalink)  
Old November 30th, 2004, 09:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Have you done "To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group.
Highlight the ASP.NET account, and check the boxes for the desired access." to this folder "c:\temp\mmcs"?

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
401.3 Access denied due to Access Control List cforsyth .NET Framework 2.0 8 May 28th, 2009 01:56 PM
access is denied shanwaj ASP.NET 1.0 and 1.1 Basics 0 December 28th, 2007 03:04 AM
Access Denied tys MySQL 4 April 6th, 2007 08:31 AM
Access is Denied khautinh General .NET 1 March 26th, 2004 04:44 PM
Access Denied tys MySQL 0 March 25th, 2004 03:46 PM



All times are GMT -4. The time now is 05:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.