Re: Strange security issue in WinForms application
From: Mary Chipman (mchip_at_online.microsoft.com)
Date: 12/13/04
- Previous message: David Wang [Msft]: "Re: Random 401.2 Error in ASP.NET app"
- In reply to: ejstembler: "Re: Strange security issue in WinForms application"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 13 Dec 2004 17:20:08 -0500
In your original message you said it was a SqlPermission. Are you
throwing multiple permissions exceptions? What is the exact message?
--Mary
On Mon, 13 Dec 2004 10:45:02 -0800, "ejstembler"
<ejstembler@discussions.microsoft.com> wrote:
>It's permission related not SQL Server... if I make a call to
>MessageBox.ShowDialog a UIPermission exception is thrown. For whatever
>reason, the UserControl has less rights then the Form.
>
>"Mary Chipman" wrote:
>
>> If it's a SQL Server error, try throwing a Profiler trace on it so you
>> can capture the information flowing to and from the SQL Server
>> database. You also might want to step through the code and look at the
>> connection string, etc.
>>
>> --Mary
>>
>> On Fri, 10 Dec 2004 13:51:14 -0800, "ejstembler"
>> <ejstembler@discussions.microsoft.com> wrote:
>>
>> >I have this WinForms application which is exhibiting a strange security issue.
>> >
>> >The project contains a Form and a UserControl. The Form has a method which
>> >populates data and an event from the UserControl. When I call the method
>> >from the UserControl event it raises a SqlPermission exception. If I call
>> >the method from any other method in the from (such as Form_Load) it works
>> >fine.
>> >
>> >I'm assuming the UserControl must have less rights assigned to it, but why?
>> >It's embedded in the same project as the Form (and also embedded on the Form
>> >itself). Incidentially, even if I grant the executable "FullTrust" it still
>> >raises the exception from the UserControl event.
>> >
>> >Does anyone know what's going on and why?
>>
>>
- Previous message: David Wang [Msft]: "Re: Random 401.2 Error in ASP.NET app"
- In reply to: ejstembler: "Re: Strange security issue in WinForms application"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]