.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

The IsolationLevel value Snapshot is invalid.

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :

Hi. I'm working with Sql Server Compact in my Visual Studio 2010 code. I'm trying to make a transaction with isolation level Snapshot, but I'm getting this error. Is this some kind of limitation to Sql Server Compact? A limitation to how I'm connecting to my database?

This is the line of code the exception is raised on

using (DbTransaction transaction = DataContext.Connection.BeginTransaction(IsolationLevel.Snapshot))

And here is my connection to the sdf file

protected MyDataContext DataContext
        if (dc == null ||
          dc.Connection.State == System.Data.ConnectionState.Broken ||
          dc.Connection.State == System.Data.ConnectionState.Closed)
          dc = new MyDataContext(@"Data Source=Data\QuadrusMotorsData.sdf;");

        return dc;

Any insights at all would be appreciated.


View Complete Post

More Related Resource Links

How to take a snapshot pic from a (.mp4/.3gp) video file ?


Hello there,

I need some help with video embedding in ASP.NET. So I am developing a litle custom blog and I need users to upload Quick Time videos (.mp4,.3gp) but I also need when upload completes to take a snapshot from the uploaded video which should be used as a link to a page that plays the video, in other words I need to take a frame from this video file... Do you have any idea how this is possible??

Thanks in advance

Invalid length for a Base-64 char array for my coding in ASP.net C#. How to solve it ?


Hi Friends ,

I have done encrypted password and decode but i got error  like  this  " Invalid length for a Base-64 char array" .

Pls help . Thanks


psswd = txtPassword.Text;

pwed = base64Decode(psswd);

public string base64Decode(string sData)
            System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
            System.Text.Decoder utf8Decode = encoder.GetDecoder();
            byte[] todecode_byte = Convert.FromBase64String(sData);
            int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
            char[] decoded_char = new char[charCount];
            utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
            string result = new String(decoded_char); return result;

Linq2Sql error: "Invalid attempt to call Read when reader is closed."


I've read up on this error from other posts and on other sites, but haven't found a solid resolution to the issue yet. My setup is as follows:

I have a RepositoryBase class that fields certain db calls that all repositories need to perform. In one such call, "GetSecurityGroup", it works most of the time, but will seemingly at random throw an exception with the error "Invalid attempt to call Read when reader is closed." All other Repository classes inherit from this one, and they all use the same DataContext object, which I understand isn't thread safe. Since there could be multiple calls to the DataContext object on the same page, perhaps one is using the DataContext when the next tries to do so. I'm not sure. What can I do to ensure this doesn't happen?

How to CATCH "Invalid postback or callback argument" exception?



How can I catch this exception? I do not want it to stop my page execution. Can/Should I do that?

Server Error in '/' Application.
Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
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.ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally

WebResource.axd - Padding is invalid and cannot be removed error



I'm working on a site that is hosted externally, and the admin just sent me an email syaing they're getting this following error:


Event code: 3005 

Event message: An unhandled exception has occurred.

Event time: 11/17/2008 8:11:24 AM

Event time (UTC): 11/17/2008 8:11:24 AM

Event ID: 5d3b54c09a24463ca8fb03f22692e0bb

Event sequence: 731

Event occurrence: 3

Event detail code: 0

Application information:

Application domain: /LM/W3SVC/1776482879/ROOT-1-128713348984007217

Trust level: Full

Application Virtual Path: /

Application Path: D:\....

Machine name: ****

Process information:

Process ID: 2272

Process name: w3wp.exe

Account name: ****

Exception information:

Exception type: CryptographicException

Exception message: Padding is invalid and cannot be removed.

Request information:

Request URL: http://sitename/WebResource.axd?d=_O9D297IUE-qcgMP0yFe-w2&t=633468747532779057

Request path: /WebResource.axd

User host address:


Is authenticated: False

Authentication Type:

Thread ac

Invalid URL"" after copy or move a document.



We have an website that have 3 libraries. The "first Library" is used only to edit documents and it's called "my documents". When a user finish of edit your documents here, they start a workflow that will check fields in the document and move the document for the second library (using Sharepoint Designer Workflow - without custom actions).
In "second library" we have a big workflow. This WF has some steps for approve, collect feedback, generate sub-tasks and others things related for the document. This WF use many custom actions in (Sharepoint Designer).
When this WF arrives to the end, the document is moved to "third library", that is a official repository of documents in the enterprise.
The entire cycle works fine. But when someone creates a internal copy of the document in the "first library" to begin again the flow, we receive a Invalid Url error. It occurs when any update operations is executed over the document item, the value is conserved but the error is displayed. After it, we can not execute other workflows over the item.
If we save the document in local disk, delete the library item, and then upload it again, the problem is solved.

Some one have an idea about why and how solve it?  We are using WSS 3.0.

The following is an error registred in log file when you d

User group invalid for new document



Defined a user group and a site column of type people/group directing to this group.

Also defined a content type and added the site column to this content type.

When I create a new word document of this content type, word opens displaying my site column ok. But when I enter it, I see that all active directory (AD) entries are displayed. I want it to display only those users I added to the user group I created. Moreover, users can select any user from AD, which makes defining a user group and a site column meaningless.

This problem is only in creating new documents with Word. If I edit properties of an already existing document in my site, everything is ok: I can select only the users in the group.


Invalid web service call, missing value for parameter: \u0027prefixo\u0027 (AutoCompleteExtender)


Good afternoon.

I'm trying to put an AutoCompleteExtender working, but i'm having an error, that i discovered with Fiddler, that is the reason that the autocomplete doesn't work:

> **{"Message":"Invalid web service call,
> missing value for parameter:
> \u0027prefixo\u0027."**,"StackTrace":"
> at
> System.Web.Script.Services.WebServiceMethodData.CallMethod(Object
> target, IDictionary`2 parameters)\r\n
> at
> System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object
> target, IDictionary`2 parameters)\r\n
> at
> System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext
> context, WebServiceMethodData
> methodData, IDictionary`2
> rawParams)\r\n at
> System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext
> context, WebServiceMethodData
> methodData)","ExceptionType":"System.InvalidOperationException"}

This is the webservice code:

    Imports System.Web.Services
    Imports System.Web.Services.Protocols
    Imports System.ComponentModel
    Imports GcpBE750
    Imports ErpBS750
    Imports StdBE750
    ' To allow this Web Service to be called fro

System.InvalidOperationException: Invalid attempt to read when no data is present.


Invalid attempt to read when no data is present.

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.InvalidOperationException: Invalid attempt to read when no data is present.

Source Error: 

Line 53:             if (reader.HasRows)
Line 54:             {
Line 55:                 Response.Write(reader.GetString(0));

Here is my code:

While dispose the com+, encounter error: failed due to the following error: Old format or invalid ty

I have web service to invoke com+ to do business layer checking. recently, the application encountered intermittently the following error while tried to dispose the com+ instance. Appreciate anyone who help for this. thanks!   System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'System.IDisposable'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{805D7A98-D4AF-3F0F-967F-E5CF45312D2C}' failed due to the following error: Old format or invalid type library. (Exception from HRESULT: 0x80028019 (TYPE_E_UNSUPFORMAT)).   Server stack trace:    at System.IDisposable.Dispose()    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)    at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)    at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)   Exception rethrown at [0]:    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage

XML Task error message hexadecimal invalid character

I am developing a SSIS package to add data from an XML file to an existing SQL Server table.  I have completed several similar projects, but on this XML file I am getting the error from the Data Flow tab between the XML Task and Data Flow Task: Error: 0xC002F304 at XML Task, XML Task: An error occurred with the following error message: "'', hexadecimal value 0x15, is an invalid character. Line 28, position 54.". Error: 0xC002928F at XML Task, XML Task: Property "New Source" has no source Xml text; Xml Text is either invalid, null or empty string. Task failed: XML Task Warning: 0x80019002 at zSTU_TS_Element: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. SSIS package "zStu_TS_Element.dtsx" finished: Failure. Do you know how I can fix this? This is the line it is referring to: <z:row c0='12' c1='80' c2='2006-04-17' c3='539' c4='1M2083N4N5N6N75800901110 11 '/>

Need help in datetime conversion excluding invalid records

I have varachar(50) field which have date in yyyymmdd format Now i have to filter the data which are greater then server date I have following query Select * from MDB_CONTENT_INFO Where convert(datetime, CON_SCHEDULED_INDUCTION_DATE,112) >= GetDate() Problem ist aht i may have some invalid data other then valid one. I am getting error The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. or Conversion failed when converting date and/or time from character string. I wanted to exclude those records but currently getting error for the query asKamran Shahid Senior Software Engineer/Analyst (MCP,MCAD,MCSD.NET,MCTS,MCPD.net[web])

SQL Server JDBC: java.lang.SecurityException: Invalid signature file digest?

Hi I am following these instructions for using SQL Server JDBC driver and using sqljdbc4.jar file: http://msdn.microsoft.com/en-us/library/ms378526.aspx When registering the driver to instruct JDBC Driver Manager which driver to load: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); It throws and exception: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes What does this mean and how do I resolve it? NOTE: I followed a similar posting, but it did not resolve it: com.microsoft.sqlserver.jdbc.SQLServerException.class throws java.lang.SecurityException: http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/ab35688e-ca33-423e-a9bd-54e30fcb5091/ Thanks Jeff in Seattle

Initialize snapshot fro alternate location - multiple .bcp files for an article

I have to replicate over 50GB of data over a slow network.  I did not use the option to initialize snapshot from database backup because the replication articles contain row filters.  If I do that, I'll have to run a lot of scripts to remove the data and other unnecessary database objects on the subscriber. Instead, I created a workaround.  On the publisher, I first create the actual push subscription to the target subscriber on the publication.  This subscription is set not to initialize from snapshot.  I then created a second push subscription on the same publication, but the subscriber is a random database on the publisher server.  This second subscription is a dummy subscription set to initialize from snapshot - the purpose is to generate the necessary snapshot files.  I then reinitialized all subscriptions and generate the new snapshot files. On the subscriber, an empty database is created with the same tables as the publisher database.  I created an identical publication on this empty database, and a dummy push subscription on the target subscriber.  The subscription is reinitialized, and the snapshot files on the empty database is created.  These dummy snapshot files are then overwritten with the actual snapshot files created on the publisher, and then I synchronize the the dummy subscriptions with the actual sn

Merge Replication: How to give read access on snapshot share to a sql account

Hello All, I want to give read access to an sql account(not windows account). Can it be given or not. Someone please tell. Thanks saandii777

Help! "You must rerun snapshot because current snapshot files are obsolete" every 90 minutes!

I'm having difficulty with SQL Server replication getting machines in the field to replicate correctly.   Here are the specifics of my installation:   100 remote tablet PCs using web sync to update. 1/2 running Vista, 1/2 XP (all latest updates applied) SQL Server Express 2005SP2 w/ cumulative update 6.   Server: Win2003 (all latest updates) SQL Server 2005SP2 CU6   There is 1 database. For each tablet I create a separate publication (PUB001, PUB002, PUB003, etc.) with filtered articles containing data for the tablet. Each publication has a single subscription -- the tablet to which the subscription is assigned. Subscriptions are set to expire after 14 days. Snapshot agent was run when subscription was created, and is set to run automatically every 14 days.     This is a "test" system which is scheduled to roll out into production in 2 weeks.   For the past month I have been running 6 tablets A-OK with no problems (had 6 separate publications/subscriptions on the server/tablets).   I use a stored procedure to create the publications and subscriptions. This stored procedure hasn't changed in months.   Yesterday, we added another 6 tablets w/ separate publications on the server, using the same aforementioned stored procedure.     The tablet application is set to auto-sync over the internet every 15 minutes.   Starting yesterday afternoon, at random, tablets would st
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend