Jump to content

Security Exception required to run the TSPDRW


Recommended Posts

Guest SteveM
Posted

I am running Server 2003 as a Terminal Server.

 

In order to resolve some printing issues I am trying to run the Terminal

Server Printer Driver Redirection Wizard (TSPDRW).

 

After launching the tspdrw.exe I get a dialogue box saying 'The application

attempted to perform an operation not allowed by the security policy. The

operation required the SecurityException.'

 

I would like to know how to grant the application the required permission or

alternatively how to use the Microsoft .NET security policy administration

tool. (Both of these being suggested as ways forward by the dialogue box).

 

Full details of the error thrown up by the dialogue box are copied below.

 

Thanks in advance for any help or pointers.

 

Steve Mills

 

==============================================

 

Copy of full error message

 

See the end of this message for details on invoking

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

 

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

System.Security.SecurityException: Request for the permission of type

System.Security.Permissions.EnvironmentPermission, mscorlib,

Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet

grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,

PermissionToken permToken)

at System.Security.CodeAccessSecurityEngine.Check(PermissionToken

permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32

checkFrames, Int32 unrestrictedOverride)

at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission

cap, StackCrawlMark& stackMark)

at System.Security.CodeAccessPermission.Demand()

at System.Environment.get_MachineName()

at TSPDRW.Form1.doserverpanel()

at TSPDRW.Form1.changeactivepanel()

at TSPDRW.Form1.Next_btn_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.WndProc(Message& m)

at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)

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

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

IntPtr wparam, IntPtr lparam)

 

 

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

mscorlib

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.2407

CodeBase:

file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll

----------------------------------------

System

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.2407

CodeBase:

file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll

----------------------------------------

System.Drawing

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.2327

CodeBase:

file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll

----------------------------------------

TSPDRW

Assembly Version: 1.0.80.17410

Win32 Version: 1.0.80.17410

CodeBase:

file://Server01/clientapps/Microsoft/Terminal%20Server%20Printer%20Redirection%20Wizard/TSPDRW.exe

----------------------------------------

System.Windows.Forms

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.2365

CodeBase:

file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll

----------------------------------------

Microsoft.VisualBasic

Assembly Version: 7.0.5000.0

Win32 Version: 7.10.6310.4

CodeBase:

file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll

----------------------------------------

 

************** JIT Debugging **************

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

application or machine (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 machine

rather than being handled by this dialog.

 

--------------------------------------------------------------------------------

StevieM

  • Replies 6
  • Created
  • Last Reply
Guest Vera Noest [MVP]
Posted

Re: Security Exception required to run the TSPDRW

 

Are you running the tool in a console session, and as

Administrator?

 

_________________________________________________________

Vera Noest

MCSE, CCEA, Microsoft MVP - Terminal Server

TS troubleshooting: http://ts.veranoest.net

___ please respond in newsgroup, NOT by private email ___

 

=?Utf-8?B?U3RldmVN?= <SteveM@discussions.microsoft.com> wrote on

07 jan 2008 in microsoft.public.windows.terminal_services:

> I am running Server 2003 as a Terminal Server.

>

> In order to resolve some printing issues I am trying to run the

> Terminal Server Printer Driver Redirection Wizard (TSPDRW).

>

> After launching the tspdrw.exe I get a dialogue box saying 'The

> application attempted to perform an operation not allowed by the

> security policy. The operation required the SecurityException.'

>

> I would like to know how to grant the application the required

> permission or alternatively how to use the Microsoft .NET

> security policy administration tool. (Both of these being

> suggested as ways forward by the dialogue box).

>

> Full details of the error thrown up by the dialogue box are

> copied below.

>

> Thanks in advance for any help or pointers.

>

> Steve Mills

Guest SteveM
Posted

Re: Security Exception required to run the TSPDRW

 

I am attempting to run TSPDRW in a console session and as Administrator.

--

Steve Mills

 

 

"Vera Noest [MVP]" wrote:

> Are you running the tool in a console session, and as

> Administrator?

>

> _________________________________________________________

> Vera Noest

> MCSE, CCEA, Microsoft MVP - Terminal Server

> TS troubleshooting: http://ts.veranoest.net

> ___ please respond in newsgroup, NOT by private email ___

>

> =?Utf-8?B?U3RldmVN?= <SteveM@discussions.microsoft.com> wrote on

> 07 jan 2008 in microsoft.public.windows.terminal_services:

>

> > I am running Server 2003 as a Terminal Server.

> >

> > In order to resolve some printing issues I am trying to run the

> > Terminal Server Printer Driver Redirection Wizard (TSPDRW).

> >

> > After launching the tspdrw.exe I get a dialogue box saying 'The

> > application attempted to perform an operation not allowed by the

> > security policy. The operation required the SecurityException.'

> >

> > I would like to know how to grant the application the required

> > permission or alternatively how to use the Microsoft .NET

> > security policy administration tool. (Both of these being

> > suggested as ways forward by the dialogue box).

> >

> > Full details of the error thrown up by the dialogue box are

> > copied below.

> >

> > Thanks in advance for any help or pointers.

> >

> > Steve Mills

>

Guest Vera Noest [MVP]
Posted

Re: Security Exception required to run the TSPDRW

 

Seems like you have modified the default user rights in the

security policy. You could modify the security policy again, but

I'd simply forget about the wizard (assuming that you had a valid

reason to configure your security policy as it is).

All the wizard does is to search for Events 1111, 1105 and 1106 and

create a custom ntprintsubs.inf file.

I'd rather do that manually, gives you more control.

 

239088 - Windows 2000 or Windows Server 2003 Terminal Services

server logs events 1111, 1105, and 1106

http://support.microsoft.com/?kbid=239088

 

_________________________________________________________

Vera Noest

MCSE, CCEA, Microsoft MVP - Terminal Server

TS troubleshooting: http://ts.veranoest.net

*----------- Please reply in newsgroup -------------*

 

=?Utf-8?B?U3RldmVN?= <SteveM@discussions.microsoft.com> wrote on

08 jan 2008:

> I am attempting to run TSPDRW in a console session and as

> Administrator.

Guest SteveM
Posted

Re: Security Exception required to run the TSPDRW

 

It seems that I have a choice of investing time to either master the creation

of the inf files or to master the vagaries of the security policy.

 

I would prefer to get on top of the security policy issue as I don't

understand what aspect of this is causing a problem and this learning will be

more helpful to me in the long run.

 

The error message alludes to a SecurityException being required. Where/how

can I get one?

--

Steve Mills

 

 

"Vera Noest [MVP]" wrote:

> Seems like you have modified the default user rights in the

> security policy. You could modify the security policy again, but

> I'd simply forget about the wizard (assuming that you had a valid

> reason to configure your security policy as it is).

> All the wizard does is to search for Events 1111, 1105 and 1106 and

> create a custom ntprintsubs.inf file.

> I'd rather do that manually, gives you more control.

>

> 239088 - Windows 2000 or Windows Server 2003 Terminal Services

> server logs events 1111, 1105, and 1106

> http://support.microsoft.com/?kbid=239088

>

> _________________________________________________________

> Vera Noest

> MCSE, CCEA, Microsoft MVP - Terminal Server

> TS troubleshooting: http://ts.veranoest.net

> *----------- Please reply in newsgroup -------------*

>

> =?Utf-8?B?U3RldmVN?= <SteveM@discussions.microsoft.com> wrote on

> 08 jan 2008:

>

> > I am attempting to run TSPDRW in a console session and as

> > Administrator.

>

>

Guest Vera Noest [MVP]
Posted

Re: Security Exception required to run the TSPDRW

 

Im sorry, but I have no idea.

You'll probably receive more help in another newsgroup.

 

Or why not use google? A search for

"The operation required the SecurityException"

 

gives lots of hits with possible solutions, which all seems to boil

down to modifying the .NET Framework security settings. Many give

detailed instructions on how to do that.

_________________________________________________________

Vera Noest

MCSE, CCEA, Microsoft MVP - Terminal Server

TS troubleshooting: http://ts.veranoest.net

___ please respond in newsgroup, NOT by private email ___

 

=?Utf-8?B?U3RldmVN?= <SteveM@discussions.microsoft.com> wrote on

08 jan 2008 in microsoft.public.windows.terminal_services:

> It seems that I have a choice of investing time to either master

> the creation of the inf files or to master the vagaries of the

> security policy.

>

> I would prefer to get on top of the security policy issue as I

> don't understand what aspect of this is causing a problem and

> this learning will be more helpful to me in the long run.

>

> The error message alludes to a SecurityException being required.

> Where/how can I get one?

Guest SteveM
Posted

Re: Security Exception required to run the TSPDRW

 

The issue was that I had stored the tspdrw.exe file on a mapped drive. The

security settings for this were those under 'local intranet' rather than 'my

computer', even though the actual storage location was the hard drive of the

local machine.

 

The security settings are changed as follows

Use the Microsft.NET security policy administration tool as follows:

control panel | administrative tools | Microsoft .NET Framework 1.1 Wizards

| Adjust .NET Security | Make changes to this computer | Next | My Computer |

click Default Level | Next | Finish

 

The wizard now works fine. Thanks for your help

--

Steve Mills

 

 

"Vera Noest [MVP]" wrote:

> Im sorry, but I have no idea.

> You'll probably receive more help in another newsgroup.

>

> Or why not use google? A search for

> "The operation required the SecurityException"

>

> gives lots of hits with possible solutions, which all seems to boil

> down to modifying the .NET Framework security settings. Many give

> detailed instructions on how to do that.

> _________________________________________________________

> Vera Noest

> MCSE, CCEA, Microsoft MVP - Terminal Server

> TS troubleshooting: http://ts.veranoest.net

> ___ please respond in newsgroup, NOT by private email ___

>

> =?Utf-8?B?U3RldmVN?= <SteveM@discussions.microsoft.com> wrote on

> 08 jan 2008 in microsoft.public.windows.terminal_services:

>

> > It seems that I have a choice of investing time to either master

> > the creation of the inf files or to master the vagaries of the

> > security policy.

> >

> > I would prefer to get on top of the security policy issue as I

> > don't understand what aspect of this is causing a problem and

> > this learning will be more helpful to me in the long run.

> >

> > The error message alludes to a SecurityException being required.

> > Where/how can I get one?

>


×
×
  • Create New...