Server Error in WebProviders Samples

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
ncpunt
Posts: 3
Joined: Sat 06 Dec 2014 14:13

Server Error in WebProviders Samples

Post by ncpunt » Sat 06 Dec 2014 14:30

I installed the latest version of dotConnect SQLite. I can run all samples except the WebProviders application. I performed the following actions:

-Created an empty database (asptables.db)
-Excecuted InstallWebTables.sql against this database
-Excecuted InstallExtendedWebTables.sql against this database
-Copied this database in a newly created App_data folder
-Updated the connection string: Data source=|DataDirectory|asptables.db;
-In ASP.NET admin tool the correct membership and role providers were selected
-I can add new users and roles, so that seems to working ok
-But when I run this sample, I get a Server Error:

Code: Select all

Server Error in '/WebProviders' Application.

Unable to cast object of type 'System.String' to type 'System.Byte[]'. 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Byte[]'.

Source Error: 


 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 



[InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Byte[]'.]
   Devart.Common.Web.Providers.DbSessionStateStore.CreateUninitializedItem(HttpContext context, String id, Int32 timeout) +1545
   System.Web.SessionState.SessionStateModule.CreateUninitializedSessionState() +47
   System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +669
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +285
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

ncpunt
Posts: 3
Joined: Sat 06 Dec 2014 14:13

Re: Server Error in WebProviders Samples

Post by ncpunt » Sat 06 Dec 2014 14:57

Also happens in a website created from scratch with a single page. When I disable session state (EnableSessionState="false") no error occurs.

Shalex
Site Admin
Posts: 9253
Joined: Thu 14 Aug 2008 12:44

Re: Server Error in WebProviders Samples

Post by Shalex » Wed 10 Dec 2014 15:09

We have fixed the problem. Please submit your request via our contact form and specify the link to this thread, we will send you the internal build. If you are interested in a licensed version, provide us with your license number in the request.

ncpunt
Posts: 3
Joined: Sat 06 Dec 2014 14:13

Re: Server Error in WebProviders Samples

Post by ncpunt » Sat 20 Dec 2014 09:38

I did use the contact form but it not seem to work because a never received a copy in my mailbox. That is why I used the forum. I am still in the stage of evaluating the product.

I am currently using an XML provider for forms authorization. Works on any ASP.NET hosting service right out of the box (true zero configuration solution).

Is the same true for the SQLite ASP.NET provider from dotConnect? Just put everything you need in the bin folder and it works? I am a bit worried about this "medium trust" permission thing. Does it require additional configuration by the host provider?

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Server Error in WebProviders Samples

Post by Pinturiccio » Mon 22 Dec 2014 16:28

ncpunt wrote:Just put everything you need in the bin folder and it works?
Yes, you can put all needed files in bin folder and deploy it. For more information, please refer to http://www.devart.com/dotconnect/sqlite ... yment.html
ncpunt wrote:I am a bit worried about this "medium trust" permission thing. Does it require additional configuration by the host provider?
Yes, since dotConnect for SQLite uses standard Microsoft .NET licensing, it additionally requires RegistryPermission. And though SecurityPermission is granted by default when using medium trust level, the set of flags for the SecurityPermission must be extended. You need to add the following flags: Assertion, SkipVerification, UnmanagedCode, and SerializationFormatter. For more information, please refer to http://www.devart.com/dotconnect/sqlite ... sions.html

Post Reply