Knowledge Base
smartDBforms.NET for ASP.NET 2
 
 
Knowledge Base Forum
Testimonials
It’s really refreshing to use. Looking at codegen products that are way overkill and generate source code that’s not maintainable - your product rocks.


I have demoed several other products also, and none came close to yours. The simplicity, ease of use and user friendliness were impeccable.
William Joshua
Madison County Schools


Thanks to smartDBforms.NET I am able to save lots of time and make even better websites. I am looking forward to use this tool to help me build websites based on databases.
Anton Beerens
www.blauwwit81.nl


We are really impressed with smartDBforms.NET and there is nothing else on the market as good.
Andy Jones
Make I.T. Simple
www.makeitsimple.info
Search knowledge base:

PRB - SecurityException in Medium Trust with Visual Studio Test Web Server
Thursday, 05 May 2011
When testing in Vusual Studio a web page that uses smartDBforms.NET and displays images from DB the images could not be displayed. Instead of the image an error icon is displayed.

SYMPTOMS

When testing in Vusual Studio a web page that uses smartDBforms.NET and displays images from DB the images could not be displayed. Instead of the image an error icon is displayed.

The following screenshot illustrates the problem:
Error creating control - '[text]' could not be set on property '[propertyname]'


When the image url is displayed in a separate tab a Security Exception stack trace is shown:
[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission,
	 mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
   System.Security.CodeAccessPermission.Demand() +58
   System.Web.HttpWorkerRequest.SendResponseFromMemory(IntPtr data, Int32 length) +50
   System.Web.HttpWorkerRequest.SendResponseFromMemory(IntPtr data, Int32 length, Boolean isBufferFromUnmanagedPool) +13
   System.Web.HttpResponseUnmanagedBufferElement.System.Web.IHttpResponseElement.Send(HttpWorkerRequest wr) +34
   System.Web.HttpWriter.Send(HttpWorkerRequest wr) +76
   System.Web.HttpResponse.Flush(Boolean finalFlush) +1007
   System.Web.HttpResponse.Flush() +20
   System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size) +8858338
   System.Web.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count) +100


The problem occurs only in  the Visual Studio ASP.NET Development Server(Cassini) with ASP.NET 2.0 and only in Medium Trust level.
The problem does not occur in ASP.NET 4 or in IIS5, IIS6 and IIS7.

CAUSE

This problem is caused by a bug in the integration of Visual Studio ASP.NET Development Server and ASP.NET 2.0.
For more details see article HttpResponse.OutputStream.Write throws SecurityException under partial trust.

RESOLUTION

The problem can be resolved in the following ways:

  • Increase the Web site trust level to higher than Medium. In the Web.config file modify the <trust level="Medium"/> tag.
  • Change the Web Site Build Target Framework to .NET 4. Right click on the WebSite in Solution Explorer. Select "Property Pages"/Build.

APPLIES TO

  • Only to ASP.NET 2.0( including .NET 3.0 and .NET 3.5) with combination with ASP.NET Development Server and only in Medium Trust Level


Page Options: format for printing  Format for Printer

Copyright 2006-2012 Adillis Terms Of Use Feedback Contact Us