Re: Dot Net Limitations

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Dave Brown (dave.AT.dbws.net)
Date: 02/11/04


Date: Wed, 11 Feb 2004 15:59:28 -0000

Ahhh, I think I might be getting somewhere....

Forget about IIS error logs or the event viewer, Error reports are created
in the temporary internet files folder containing detailed information about
why the .NET files failed to load properly..... It does look like a
security/permissions problem, so running on a different port gives it
problems....
This is the contents of the file...

***** IEHOST Error Log (Wednesday, 11 February 2004 15:52) *****

URL: http://www.dbws.net:90/winctrlasppage/SimpleControl.dll
Zone: 3
Assembly Name: SimpleControl.dll
Type Name: Microsoft.Samples.WinForms.Cs.SimpleControl.SimpleControl

----- Thrown Exception -----

System.Security.SecurityException: Request for the permission of type
System.Net.WebPermission, System, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 failed.

Server stack trace:
   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.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence
securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
   at System.Activator.CreateComInstanceFrom(String assemblyName, String
typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
   at System.AppDomain.CreateComInstanceFrom(String assemblyFile, String
typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
   at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(Met
hodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs)
   at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessa
ge msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
   at System.AppDomain.CreateComInstanceFrom(String assemblyFile, String
typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
   at Microsoft.IE.SecureFactory.CreateInstanceWithSecurity(Int32 dwFlag,
Int32 dwZone, String pURL, String uniqueIdString, String link, String
licenses)

I will sign the code and see if I still get the same problem...

Rgds,

Dave.

> I believe I have found a severe limitation of DotNet, with respect to
> hosting Windows Form Controls in WebPages.
> It appears this is only possible when the web is configured on Port 80.
Any
> other port and the control will not display.
> After a couple of days of searching the newsgroups/various forums I have
> found other postings requesting information on this anomaly yet nobody has
> found a solution.
> What are Microsoft doing with this ? It seems a common situation to run on
> alternate ports, being restricted to the default 80 seems ludicrous.
>
> Dave.
>
>



Relevant Pages

  • Re: Dot Net Limitations
    ... permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 ... securityEvidence, BytehashValue, AssemblyHashAlgorithm hashAlgorithm) ... at System.Activator.CreateComInstanceFrom(String assemblyName, String ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Dot Net Limitations
    ... permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 ... securityEvidence, BytehashValue, AssemblyHashAlgorithm hashAlgorithm) ... at System.Activator.CreateComInstanceFrom(String assemblyName, String ...
    (microsoft.public.inetserver.iis)
  • Re: Dot Net Limitations
    ... permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 ... securityEvidence, BytehashValue, AssemblyHashAlgorithm hashAlgorithm) ... at System.Activator.CreateComInstanceFrom(String assemblyName, String ...
    (microsoft.public.dotnet.general)
  • windows user control problem at IE
    ... Binder binder, Objectargs, CultureInfo culture, Object ... at System.Activator.CreateComInstanceFrom(String assemblyName, String ... typeName, BytehashValue, AssemblyHashAlgorithm hashAlgorithm) ... hodBase mb, Objectargs, Object server, Int32 methodPtr, Boolean ...
    (microsoft.public.dotnet.framework.interop)
  • windows user control problem at IE
    ... Binder binder, Objectargs, CultureInfo culture, Object ... at System.Activator.CreateComInstanceFrom(String assemblyName, String ... typeName, BytehashValue, AssemblyHashAlgorithm hashAlgorithm) ... hodBase mb, Objectargs, Object server, Int32 methodPtr, Boolean ...
    (microsoft.public.dotnet.framework.aspnet)