UnauthorizedAccessException

Status
Not open for further replies.
A

Avatar

Hi' your'll can you Please help. I created a button on Outlook 2007 using VB.net (Shared Add-ins). The button is for saving an email and it's attachment into a folder which on the server. Well it works well when I am logged in as an administrator in a PC But when I'm a normal user, It gives me pop-up form with the Message below

You don't have appropriate permission to perform this operation.

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************

System.UnauthorizedAccessException: You don't have appropriate permission to perform this operation.

at Microsoft.Office.Interop.Outlook._MailItem.SaveAs(String Path, Object Type)

at CMSOutlookAddin.SaveCASMail.savetext(Int32 intCitizen)

at CMSOutlookAddin.TableSelect.cmdOK_Click(Object sender, EventArgs e)

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ButtonBase.WndProc(Message& m)

at System.Windows.Forms.Button.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(M essage& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Mes sage& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************

mscorlib

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

--------CMSOutlookAddin

Assembly Version: 1.0.3666.16179

Win32 Version: 1.0.3666.16179

CodeBase: file:///C:/Program%20Files/CMSOutlookAddinSetup/CMSOutlookAddin.dll

--------Extensibility

Assembly Version: 7.0.3300.0

Win32 Version: 7.00.9466

CodeBase: file:///C:/Windows/assembly/GAC/Extensibility/7.0.3300.0__b03f5f7f11d50a3a/Extensibility.dll

--------Microsoft.Office.Interop.Outlook

Assembly Version: 12.0.0.0

Win32 Version: 12.0.4518.1014

CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.Office.Interop.Outlook/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Outlook.dll

--------office

Assembly Version: 12.0.0.0

Win32 Version: 12.0.4518.1014

CodeBase: file:///C:/Windows/assembly/GAC/office/12.0.0.0__71e9bce111e9429c/office.dll

--------System.Windows.Forms

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

--------System

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

--------System.Drawing

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

--------stdole

Assembly Version: 7.0.3300.0

Win32 Version: 7.00.9466

CodeBase: file:///C:/Windows/assembly/GAC/stdole/7.0.3300.0__b03f5f7f11d50a3a/stdole.dll

--------Microsoft.VisualBasic

Assembly Version: 8.0.0.0

Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

--------Accessibility

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

--------System.Data

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll

--------System.Xml

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

--------System.Configuration

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

--------System.Transactions

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll

--------System.EnterpriseServices

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll

--------CustomMarshalers

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll

--------************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.

For example:

<configuration
<system.windows.forms jitDebugging="true" /
</configuration
When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.
 
Maybe that non-admin user has no permissions to save on that drive? Try

saving there from the user interface and see what happens. Or try saving in

a non-protected area of the user's local file system.

"Avatar" <sgmchunu[at]gmail[dot]com> wrote in message

news:ehwiQ52mKHA.5528@TK2MSFTNGP05.phx.gbl...

> Hi' your'll can you Please help. I created a button on Outlook 2007 using
> VB.net (Shared Add-ins). The button is for saving an email and it's
> attachment into a folder which on the server. Well it works well when I am
> logged in as an administrator in a PC But when I'm a normal user, It gives
> me pop-up form with the Message below

> You don't have appropriate permission to perform this operation.

> See the end of this message for details on invoking just-in-time (JIT)
> debugging instead of this dialog box.
> ************** Exception Text **************
> System.UnauthorizedAccessException: You don't have appropriate permission
> to perform this operation.
> at Microsoft.Office.Interop.Outlook._MailItem.SaveAs(String Path, Object
> Type)
> at CMSOutlookAddin.SaveCASMail.savetext(Int32 intCitizen)
> at CMSOutlookAddin.TableSelect.cmdOK_Click(Object sender, EventArgs e)
> at System.Windows.Forms.Control.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
> at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
> button, Int32 clicks)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at System.Windows.Forms.ButtonBase.WndProc(Message& m)
> at System.Windows.Forms.Button.WndProc(Message& m)
> at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(M essage&
> m)
> at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Mes sage&
> m)
> at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
> IntPtr wparam, IntPtr lparam)

> ************** Loaded Assemblies **************
> mscorlib
> Assembly Version: 2.0.0.0
> Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
> --------------------------------------> CMSOutlookAddin
> Assembly Version: 1.0.3666.16179
> Win32 Version: 1.0.3666.16179
> CodeBase:
> file:///C:/Program%20Files/CMSOutlookAddinSetup/CMSOutlookAddin.dll
> --------------------------------------> Extensibility
> Assembly Version: 7.0.3300.0
> Win32 Version: 7.00.9466
> CodeBase:
> file:///C:/Windows/assembly/GAC/Extensibility/7.0.3300.0__b03f5f7f11d50a3a/Extensibility.dll
> --------------------------------------> Microsoft.Office.Interop.Outlook
> Assembly Version: 12.0.0.0
> Win32 Version: 12.0.4518.1014
> CodeBase:
> file:///C:/Windows/assembly/GAC/Microsoft.Office.Interop.Outlook/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Outlook.dll
> --------------------------------------> office
> Assembly Version: 12.0.0.0
> Win32 Version: 12.0.4518.1014
> CodeBase:
> file:///C:/Windows/assembly/GAC/office/12.0.0.0__71e9bce111e9429c/office.dll
> --------------------------------------> System.Windows.Forms
> Assembly Version: 2.0.0.0
> Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
> --------------------------------------> System
> Assembly Version: 2.0.0.0
> Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
> --------------------------------------> System.Drawing
> Assembly Version: 2.0.0.0
> Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
> --------------------------------------> stdole
> Assembly Version: 7.0.3300.0
> Win32 Version: 7.00.9466
> CodeBase:
> file:///C:/Windows/assembly/GAC/stdole/7.0.3300.0__b03f5f7f11d50a3a/stdole.dll
> --------------------------------------> Microsoft.VisualBasic
> Assembly Version: 8.0.0.0
> Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
> --------------------------------------> Accessibility
> Assembly Version: 2.0.0.0
> Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
> --------------------------------------> System.Data
> Assembly Version: 2.0.0.0
> Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
> --------------------------------------> System.Xml
> Assembly Version: 2.0.0.0
> Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
> --------------------------------------> System.Configuration
> Assembly Version: 2.0.0.0
> Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
> --------------------------------------> System.Transactions
> Assembly Version: 2.0.0.0
> Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
> --------------------------------------> System.EnterpriseServices
> Assembly Version: 2.0.0.0
> Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
> --------------------------------------> CustomMarshalers
> Assembly Version: 2.0.0.0
> Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
> CodeBase:
> file:///C:/Windows/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
> --------------------------------------> ************** JIT Debugging **************
> To enable just-in-time (JIT) debugging, the .config file for this
> application or computer (machine.config) must have the
> jitDebugging value set in the system.windows.forms section.
> The application must also be compiled with debugging
> enabled.
> For example:
> <configuration
> <system.windows.forms jitDebugging="true" /
> </configuration
> When JIT debugging is enabled, any unhandled exception
> will be sent to the JIT debugger registered on the computer
> rather than be handled by this dialog box.

>
 
Status
Not open for further replies.
Back
Top