|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
windows forms UserControl compiled with beta 2 doesn't work with IEI've already placed a similar request on the server control newsgroup (www.asp.net beta 2 forums) and on the win tech OT list. From there i was redirected to here. I'm facing a weird problem while trying to host a windows forms user control on IE 6. I say weird because the control is downloaded and appears on the page but when I try to access a method it allways says method or property not found (or something like this). this would seem to indicate some sort of problem with the control, right? well, the interesting thing is that if I compile the same control with version 1.X of the platform the damn thing works, ie, if I copy/paste the user control file on another project and build the control with VS 2003, I'm able to use the control without any problems. As I said before, the control is correctly downloaded (it is placed insithe the folder c:\windows\assembly\download) and I even can see it in the browser. It also looks like the property setters are used when i define the values of the properties by using the <param> elements (I've added message boxes to the setters of the props). however, if I try to get the value of a property by using the alert method (jscript) I get the undefined value. I've been playing with this control since yesterday and here are some of the conclusions I've found: ..) using user control build with v1.1: -> client has beta 2 * works ok *but* IE shows a crash message when it is closed (testes this behavior in 2 different machines which have beta 2 installed) * policy is set with the 2.0 version so that it works ->client has v1.X * works ok without any errors (ie, no crash message when IE closes) * policy set with 1.X mscorcfg.msc 2.) using user control built with v2 -> client has beta 2 * downloads the control to the correct place (c:\windows\assembly\download) * can't access any of the methods programatically * IE shows crash message when closed I got a tip to enable debugging of the IEHost from the OT list. This is the content I get on the file: Creating security manager Microsoft.IE.Manager: Microsoft.IE.Manager: unique id lgth = 36 Microsoft.IE.SecureFactory: Create SecureFactory() with security information Microsoft.IE.Manager: Created secure factory Microsoft.IE.SecureFactory: Creating instance of the object in the correct domain Microsoft.IE.SecureFactory: pUrl = http://localhost/Web/WebForm1.aspx Microsoft.IE.SecureFactory: id = 86474707A3C6F63616C686F6374710000000 Microsoft.IE.SecureFactory: link = Microsoft.IE.SecureFactory: licenses = Microsoft.IE.Manager: Url = http://localhost/Web/WebForm1.aspx Microsoft.IE.Manager: UrlGetPartW returned 0 Microsoft.IE.Manager: UrlGetPartW returned 80070057 Microsoft.IE.Manager: CodeBase = http://localhost Microsoft.IE.Manager: Application = Web Microsoft.IE.Manager: Found a codebase Microsoft.IE.Manager: UrlCanonicalize returned 0 Microsoft.IE.SecureFactory: URL codeBase: http://localhost/ Microsoft.IE.SecureFactory: URL application: Web Microsoft.IE.SecureFactory: Locating domain for http://localhost/ Microsoft.IE.IDKey: Created key Microsoft.IE.Manager: The domain does not exist. Microsoft.IE.IDKey: Created key Microsoft.IE.Manager: The domain does not exist. Microsoft.IE.SecureFactory: Need to create domain Microsoft.IE.SecureFactory: Application base: http://localhost/ Microsoft.IE.SecureFactory: Private Bin Path: bin Microsoft.IE.IDKey: Created key Microsoft.IE.SecureFactory: Trying to create instance of type http://localhost/Web/UserControl.dll#UILAControlsLib.ProgressBarCtl Microsoft.IE.SecureFactory: Created instance of type http://localhost/Web/UserControl.dll::UILAControlsLib.ProgressBarCtl well, at 1st look everything looks ok. so i really don't understand why this is happening... btw, here's the sample page i'm using (maybe i'm doing something wrong with the jscript): <%@ Page language="c#" %> <html> <head> <title>WebForm1</title> </head> <body MS_POSITIONING="GridLayout"> <script language="javascript"> function UploadFile() { document.all.uploadCtl.UploadFile(); } </script> <script for="uploadCtl" event="BeginUpload"> alert( "begin" ); </script> <script for="uploadCtl" event="UploadComplete"> alert( "uploadcomplee" ); </script> <form id="Form1" method="post" runat="server"> <object classid="UserControl.dll#UILAControlsLib.ProgressBarCtl" id="uploadCtl" name="uploadCtl" width="500px" height="20px" VIEWASTEXT> <param name="FileToUpload" value="d:\deepwindows_probert_clip1_MBR.wmv" /> <param name="FilePacketSize" value="2048" /> <param name="DestinationFileName" value="test.wmv" /> <param name="DestinationFolder" value="http://localhost/dummytests" /> </object> <input type="button" value="Upload file" onclick="UploadFile()" /> <span id="info" /> </form> </body> </html> if there's any more info necessary to solve this, please let me know (I did't put the user control because, as I said, it works perfectly if i compile it with the 1.X version). does anyone has any feedback on why this is happening? thanks. -- Regards, Luis Abreu email: labreu_at_gmail.com http://weblogs.pontonetpt.com/luisabreu http://www.pontonetpt.com http://weblogs.pontonetpt.com/
Show quote
Hide quote
"Luis Abreu" <lab***@gmail.com> wrote in message This might have a little something to do with the VS 2005 template for the news:acee0c45eb7c8c7717ebfb26ec0@news.microsoft.com... > Hello. > > I've already placed a similar request on the server control newsgroup > (www.asp.net beta 2 forums) and on the win tech OT list. From there i was > redirected to here. > > I'm facing a weird problem while trying to host a windows forms user > control on IE 6. I say weird because the control is downloaded and appears > on the page but when I try to access a method it allways says method or > property not found (or something like this). this would seem to indicate > some sort of problem with the control, right? well, the interesting thing > is that if I compile the same control with version 1.X of the platform the > damn thing works, ie, if I copy/paste the user control file on another > project and build the control with VS 2003, I'm able to use the control > without any problems. AssemblyInfo file setting the assembly's ComVisible attribute to false. (COM visibility defaulted to true if you didn't add the attribute yourself in VS 2003.) <snip> > That sounds like it's probably worth reporting as a bug at > .) using user control build with v1.1: > -> client has beta 2 > * works ok *but* IE shows a crash message when it is closed (testes this > behavior in 2 different machines which have beta 2 installed) http://lab.msdn.microsoft.com/ProductFeedback/. Show quoteHide quote > * policy is set with the 2.0 version so that it works > ->client has v1.X > * works ok without any errors (ie, no crash message when IE closes) > * policy set with 1.X mscorcfg.msc > > 2.) using user control built with v2 > -> client has beta 2 > * downloads the control to the correct place > (c:\windows\assembly\download) > * can't access any of the methods programatically > * IE shows crash message when closed > > I got a tip to enable debugging of the IEHost from the OT list. This is > the content I get on the file: > > Creating security manager > > Microsoft.IE.Manager: Microsoft.IE.Manager: unique id lgth = 36 > Microsoft.IE.SecureFactory: Create SecureFactory() with security > information > Microsoft.IE.Manager: Created secure factory > Microsoft.IE.SecureFactory: Creating instance of the object in the correct > domain > Microsoft.IE.SecureFactory: pUrl = http://localhost/Web/WebForm1.aspx > Microsoft.IE.SecureFactory: id = 86474707A3C6F63616C686F6374710000000 > Microsoft.IE.SecureFactory: link = Microsoft.IE.SecureFactory: licenses = > Microsoft.IE.Manager: Url = http://localhost/Web/WebForm1.aspx > Microsoft.IE.Manager: UrlGetPartW returned 0 > Microsoft.IE.Manager: UrlGetPartW returned 80070057 > Microsoft.IE.Manager: CodeBase = http://localhost > Microsoft.IE.Manager: Application = Web > Microsoft.IE.Manager: Found a codebase > Microsoft.IE.Manager: UrlCanonicalize returned 0 > Microsoft.IE.SecureFactory: URL codeBase: http://localhost/ > Microsoft.IE.SecureFactory: URL application: Web > Microsoft.IE.SecureFactory: Locating domain for http://localhost/ > Microsoft.IE.IDKey: Created key > Microsoft.IE.Manager: The domain does not exist. > Microsoft.IE.IDKey: Created key > Microsoft.IE.Manager: The domain does not exist. > Microsoft.IE.SecureFactory: Need to create domain > Microsoft.IE.SecureFactory: Application base: http://localhost/ > Microsoft.IE.SecureFactory: Private Bin Path: bin > Microsoft.IE.IDKey: Created key > Microsoft.IE.SecureFactory: Trying to create instance of type > http://localhost/Web/UserControl.dll#UILAControlsLib.ProgressBarCtl > Microsoft.IE.SecureFactory: Created instance of type > http://localhost/Web/UserControl.dll::UILAControlsLib.ProgressBarCtl > > well, at 1st look everything looks ok. so i really don't understand why > this is happening... > > btw, here's the sample page i'm using (maybe i'm doing something wrong > with the jscript): > > <%@ Page language="c#" %> > > <html> > <head> > <title>WebForm1</title> > </head> > <body MS_POSITIONING="GridLayout"> > <script language="javascript"> > function UploadFile() > { document.all.uploadCtl.UploadFile(); > } </script> > <script for="uploadCtl" event="BeginUpload"> > alert( "begin" ); > </script> > <script for="uploadCtl" event="UploadComplete"> > alert( "uploadcomplee" ); > </script> > <form id="Form1" method="post" runat="server"> > <object classid="UserControl.dll#UILAControlsLib.ProgressBarCtl" > id="uploadCtl" name="uploadCtl" > width="500px" height="20px" VIEWASTEXT> > <param name="FileToUpload" > value="d:\deepwindows_probert_clip1_MBR.wmv" /> > <param name="FilePacketSize" value="2048" /> > <param name="DestinationFileName" value="test.wmv" /> > <param name="DestinationFolder" > value="http://localhost/dummytests" /> > </object> > <input type="button" value="Upload file" onclick="UploadFile()" /> > <span id="info" /> > </form> > > </body> > </html> > > if there's any more info necessary to solve this, please let me know (I > did't put the user control because, as I said, it works perfectly if i > compile it with the 1.X version). > > does anyone has any feedback on why this is happening? thanks. > > -- > Regards, > Luis Abreu > email: labreu_at_gmail.com > http://weblogs.pontonetpt.com/luisabreu > http://www.pontonetpt.com > http://weblogs.pontonetpt.com/ > > > Hello Nicole Calinoiu.
> This might have a little something to do with the VS 2005 template for yep, you're right, I still get the crash though :D> the AssemblyInfo file setting the assembly's ComVisible attribute to > false. (COM visibility defaulted to true if you didn't add the > attribute yourself in VS 2003.) thanks. -- Regards, Luis Abreu email: labreu_at_gmail.com http://weblogs.pontonetpt.com/luisabreu http://www.pontonetpt.com http://weblogs.pontonetpt.com/ Unfortunately (well, not really <g>), I can't reproduce the crash. It may
be related to something in your control, something in Whidbey (or maybe just the build you're using?), or an interaction between the two. Regardless of the cause, a hosted control should not be crashing IE during "normal" operations, so this is something that is well worth reporting as a Whidbey bug at http://lab.msdn.microsoft.com/ProductFeedback/. Show quoteHide quote "Luis Abreu" <lab***@gmail.com> wrote in message news:acee0c4609838c7731640966920@news.microsoft.com... > Hello Nicole Calinoiu. > > >> This might have a little something to do with the VS 2005 template for >> the AssemblyInfo file setting the assembly's ComVisible attribute to >> false. (COM visibility defaulted to true if you didn't add the >> attribute yourself in VS 2003.) > > yep, you're right, I still get the crash though :D > > thanks. > -- > Regards, > Luis Abreu > email: labreu_at_gmail.com > http://weblogs.pontonetpt.com/luisabreu > http://www.pontonetpt.com > http://weblogs.pontonetpt.com/ > >
can you put a strong name assembly in a role?
Can't determine if a file exists MD5 or SHA1 or ??? How to send certificate for client authentication? IIS Delegation 'System.Security.SecurityException' when running .exe file from ot Strong Name broken? CAS Permission Sets CryptGenKey & CryptImportKey slow in certain situations Forms Authentication - how to proceed when valid login? |
|||||||||||||||||||||||