Windows Forms Controls On IE!

Discussion in 'ASP .Net Web Controls' started by Chilá, Jan 16, 2006.

  1. Chilá

    Chilá Guest

    Hi there!!

    I'm trying to put a windows forms control inside IE, this control will be
    used to upload files on the Intranet and Extranet, giving the user a better
    experience, but:

    If I put a strong name on it, it disappears on the screen.

    and if I try to read the file size, the following message appears:

    I'm using VS2003, but I also have the VS2005 Pro installed on my machine.
    Unfortunatelly I have never tried this before to make sure if it's the
    VS2005 that's is putting me down or if it's a mistake I'm doing!

    See ya! I'll appreciate any help!

    ***************************************************************************************************************************************

    The error message is:

    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.FileIOPermission, mscorlib, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    at System.Security.CodeAccessSecurityEngine.Check(Object demand,
    StackCrawlMark& stackMark, Boolean isPermSet)
    at System.Security.CodeAccessPermission.Demand()
    at System.Windows.Forms.IntSecurity.DemandFileIO(FileIOPermissionAccess
    access, String fileName)
    at System.Windows.Forms.FileDialog.get_FileNames()
    at SimplesControle.UserControl1.btnAnexos_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(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
    IntPtr wparam, IntPtr lparam)
    The action that failed was:
    Demand
    The type of the first permission that failed was:
    System.Security.Permissions.FileIOPermission
    The Zone of the assembly that failed was:
    Intranet


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase:
    file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase:
    file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    SimplesControle
    Assembly Version: 1.0.2207.16544
    Win32 Version: n/a
    CodeBase: http://mblb_ns2/paginasimples/SimplesControle.dll
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase:
    file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase:
    file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase:
    file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------
    Microsoft.mshtml
    Assembly Version: 7.0.3300.0
    Win32 Version: 7.0.3300.0
    CodeBase:
    file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.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.
     
    Chilá, Jan 16, 2006
    #1
    1. Advertising

  2. Chilá

    Chilá Guest

    Re: Windows Forms Controls On IE! Message solved... but....

    Hi all!

    The message stopped.

    I did:

    Dim FilePermission As New FileIOPermission(PermissionState.Unrestricted)

    FilePermission.Assert()


    And now i'm looking for something to run the application remotelly. Cause
    only within localhost it is working...


    "Chilá" <> escreveu na mensagem
    news:%23ILoo%...
    > Hi there!!
    >
    > I'm trying to put a windows forms control inside IE, this control will be
    > used to upload files on the Intranet and Extranet, giving the user a
    > better experience, but:
    >
    > If I put a strong name on it, it disappears on the screen.
    >
    > and if I try to read the file size, the following message appears:
    >
    > I'm using VS2003, but I also have the VS2005 Pro installed on my machine.
    > Unfortunatelly I have never tried this before to make sure if it's the
    > VS2005 that's is putting me down or if it's a mistake I'm doing!
    >
    > See ya! I'll appreciate any help!
    >
    > ***************************************************************************************************************************************
    >
    > The error message is:
    >
    > 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.FileIOPermission, mscorlib, Version=2.0.0.0,
    > Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    > at System.Security.CodeAccessSecurityEngine.Check(Object demand,
    > StackCrawlMark& stackMark, Boolean isPermSet)
    > at System.Security.CodeAccessPermission.Demand()
    > at System.Windows.Forms.IntSecurity.DemandFileIO(FileIOPermissionAccess
    > access, String fileName)
    > at System.Windows.Forms.FileDialog.get_FileNames()
    > at SimplesControle.UserControl1.btnAnexos_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(Message&
    > m)
    > at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    > at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
    > IntPtr wparam, IntPtr lparam)
    > The action that failed was:
    > Demand
    > The type of the first permission that failed was:
    > System.Security.Permissions.FileIOPermission
    > The Zone of the assembly that failed was:
    > Intranet
    >
    >
    > ************** Loaded Assemblies **************
    > mscorlib
    > Assembly Version: 2.0.0.0
    > Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    > CodeBase:
    > file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    > ----------------------------------------
    > System
    > Assembly Version: 2.0.0.0
    > Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    > CodeBase:
    > file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    > ----------------------------------------
    > SimplesControle
    > Assembly Version: 1.0.2207.16544
    > Win32 Version: n/a
    > CodeBase: http://mblb_ns2/paginasimples/SimplesControle.dll
    > ----------------------------------------
    > System.Windows.Forms
    > Assembly Version: 2.0.0.0
    > Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    > CodeBase:
    > file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    > ----------------------------------------
    > System.Drawing
    > Assembly Version: 2.0.0.0
    > Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    > CodeBase:
    > file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    > ----------------------------------------
    > Accessibility
    > Assembly Version: 2.0.0.0
    > Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    > CodeBase:
    > file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    > ----------------------------------------
    > Microsoft.mshtml
    > Assembly Version: 7.0.3300.0
    > Win32 Version: 7.0.3300.0
    > CodeBase:
    > file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.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.
    >
    >
    >
    >
     
    Chilá, Jan 16, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brendan Miller

    Web Forms VS Windows Forms

    Brendan Miller, Aug 11, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    5,103
    Kevin Spencer
    Aug 11, 2003
  2. =?Utf-8?B?ZGF2aWQ=?=

    embedded windows forms into web forms for control

    =?Utf-8?B?ZGF2aWQ=?=, Apr 7, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    5,228
    =?Utf-8?B?ZGF2aWQ=?=
    Apr 10, 2005
  3. Arsen V.
    Replies:
    7
    Views:
    835
  4. Gustavo

    Windows forms controls in WebForms

    Gustavo, Jan 16, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    437
    Alvin Bruney [MVP]
    Jan 17, 2007
  5. Eric
    Replies:
    2
    Views:
    578
Loading...

Share This Page