Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I created an XP Provirtual machine to use in a demo and gave it 2.5GB of RAM. I did a default full install of Visual Studio 2008 TeamSuite followed by installing VS2008 SP1. I then installed SQLServer 2008 Developer. At first I got some errors about permissions and solved them by giving the ASPNET user full permissions to "C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services". (I know, but as I said, this is a VM built to do a demo so security isn't an issue for me). The first time I try to navigate to http://localhost/reports/, I get an exception page:"The path is not of a legal form". After that, if I try again it navigates to http://localhost/reports/Pages/Folder.aspxandI just get a blank page. At any time (even after a full re-start of the VM, any attempt to navigate to http://localhost/reportserverresults in "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." (Stack trace is below). I've even tried completely uninstalling SQL2008 and resinstalling. Same problem. I found a couple of instances on Google where people got this messagewhen usingVMWare, but little else. Thanks in advance, Mike Here is the default rsreportserver.config it built for me: <Configuration><Dsn>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAf16tv8nJmUmqSzMwZdtchwQAAAAiAAAAUgBlAHAAbwByAHQAaQBuAGcAIABTAGUAcgB2AGUAcgAAAANmAACoAAAAEAAAAPkyawn3sbTlAjcYV7OwgUUAAAAABIAAAKAAAAAQAAAApAVGvasQaLGv2C6YgdhDyQABAABFHMY+QcLLQ1M1P4HfyCxA3TKZHfrGRaoAPSfRo9MehlZ0QaegsEG1ejXPnwzUHw25xLytY9lCwKqcpYBrJ6PTYy5zmU2TWcqOiHVb7XZ8wJ8HGh2jOarRTBG/lEGGrC4kTQUMALtMg1GsTZYFUlBjiVC9+5TIkKtCFi2N4z+EQxrmF152U8BDALIcPpO+u1+7zuasmbClBfa2RqJXJMM1eJL5c+GVjd0gqSqHyj9Os2Ok3WcDmp1xFMF+AKXH0+s5KOAyK4Ll7qQB87sAEI54MDBD5uLyiugpx7JHStxJtl1bw6CS9Heg69M4b31o/nNRc+5iwdKJX88pujgfnuygFAAAAI82SjVdQy9sPWsfs+CoiAKHYCr1</Dsn><ConnectionType>Default</ConnectionType><LogonUser></LogonUser><LogonDomain></LogonDomain><LogonCred></LogonCred><InstanceId>MSRS10.MSSQLSERVER</InstanceId><InstallationID>{69898a18-d846-4a1b-af3b-40ece334fc78}</InstallationID><Add Key="SecureConnectionLevel" Value="0"/><Add Key="CleanupCycleMinutes" Value="10"/><Add Key="SQLCommandTimeoutSeconds" Value="60"/><Add Key="MaxActiveReqForOneUser" Value="20"/><Add Key="DatabaseQueryTimeout" Value="120"/><Add Key="RunningRequestsScavengerCycle" Value="60"/><Add Key="RunningRequestsDbCycle" Value="60"/><Add Key="RunningRequestsAge" Value="30"/><Add Key="MaxScheduleWait" Value="5"/><Add Key="DisplayErrorLink" Value="true"/><Add Key="WebServiceUseFileShareStorage" Value="false"/><!-- <Add Key="ProcessTimeout" Value="150" /> --><!-- <Add Key="ProcessTimeoutGcExtension" Value="30" /> --><!-- <Add Key="WatsonFlags" Value="0x0430" /> full dump--><!-- <Add Key="WatsonFlags" Value="0x0428" /> minidump --><!-- <Add Key="WatsonFlags" Value="0x0002" /> no dump--><Add Key="WatsonFlags" Value="0x0428"/><Add Key="WatsonDumpOnExceptions" Value="Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException,Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException"/><Add Key="WatsonDumpExcludeIfContainsExceptions" Value="System.Threading.ThreadAbortException,System.Web.UI.ViewStateException,System.OutOfMemoryException,System.Web.HttpException,System.IO.IOException,System.IO.FileLoadException"/><URLReservations><Application><Name>ReportServerWebService</Name><VirtualDirectory>ReportServer</VirtualDirectory><URLs><URL><UrlString>http://+:8080</UrlString><AccountSid>S-1-5-20</AccountSid><AccountName>NT AUTHORITY\NETWORK SERVICE</AccountName></URL></URLs></Application><Application><Name>ReportManager</Name><VirtualDirectory>Reports</VirtualDirectory><URLs><URL><UrlString>http://+:8080</UrlString><AccountSid>S-1-5-20</AccountSid><AccountName>NT AUTHORITY\NETWORK SERVICE</AccountName></URL></URLs></Application></URLReservations><Authentication><AuthenticationTypes><RSWindowsNegotiate/><RSWindowsNTLM/></AuthenticationTypes><EnableAuthPersistence>true</EnableAuthPersistence></Authentication><Service><IsSchedulingService>True</IsSchedulingService><IsNotificationService>True</IsNotificationService><IsEventService>True</IsEventService><PollingInterval>10</PollingInterval><WindowsServiceUseFileShareStorage>False</WindowsServiceUseFileShareStorage><MemorySafetyMargin>80</MemorySafetyMargin><MemoryThreshold>90</MemoryThreshold><RecycleTime>720</RecycleTime><MaxAppDomainUnloadTime>30</MaxAppDomainUnloadTime><MaxQueueThreads>0</MaxQueueThreads><UrlRoot></UrlRoot><UnattendedExecutionAccount><UserName></UserName><Password></Password><Domain></Domain></UnattendedExecutionAccount><PolicyLevel>rssrvpolicy.config</PolicyLevel><IsWebServiceEnabled>True</IsWebServiceEnabled><IsReportManagerEnabled>True</IsReportManagerEnabled><FileShareStorageLocation><Path></Path></FileShareStorageLocation></Service><UI><ReportServerUrl></ReportServerUrl><PageCountMode>Estimate</PageCountMode></UI><Extensions><Delivery><Extension Name="Report Server FileShare" Type="Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider,ReportingServicesFileShareDeliveryProvider"><MaxRetries>3</MaxRetries><SecondsBeforeRetry>900</SecondsBeforeRetry><Configuration><FileShareConfiguration><ExcludedRenderFormats><RenderingExtension>HTMLOWC</RenderingExtension><RenderingExtension>NULL</RenderingExtension><RenderingExtension>RGDI</RenderingExtension></ExcludedRenderFormats></FileShareConfiguration></Configuration></Extension><Extension Name="Report Server Email" Type="Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider,ReportingServicesEmailDeliveryProvider"><MaxRetries>3</MaxRetries><SecondsBeforeRetry>900</SecondsBeforeRetry><Configuration><RSEmailDPConfiguration><SMTPServer></SMTPServer><SMTPServerPort></SMTPServerPort><SMTPAccountName></SMTPAccountName><SMTPConnectionTimeout></SMTPConnectionTimeout><SMTPServerPickupDirectory></SMTPServerPickupDirectory><SMTPUseSSL></SMTPUseSSL><SendUsing>2</SendUsing><SMTPAuthenticate></SMTPAuthenticate><From></From><EmbeddedRenderFormats><RenderingExtension>MHTML</RenderingExtension></EmbeddedRenderFormats><PrivilegedUserRenderFormats></PrivilegedUserRenderFormats><ExcludedRenderFormats><RenderingExtension>HTMLOWC</RenderingExtension><RenderingExtension>NULL</RenderingExtension><RenderingExtension>RGDI</RenderingExtension></ExcludedRenderFormats><SendEmailToUserAlias>True</SendEmailToUserAlias><DefaultHostName></DefaultHostName><PermittedHosts></PermittedHosts></RSEmailDPConfiguration></Configuration></Extension><Extension Name="Report Server DocumentLibrary" Type="Microsoft.ReportingServices.SharePoint.SharePointDeliveryExtension.DocumentLibraryProvider,ReportingServicesSharePointDeliveryExtension"><MaxRetries>3</MaxRetries><SecondsBeforeRetry>900</SecondsBeforeRetry><Configuration><DocumentLibraryConfiguration><ExcludedRenderFormats><RenderingExtension>HTMLOWC</RenderingExtension><RenderingExtension>NULL</RenderingExtension><RenderingExtension>RGDI</RenderingExtension></ExcludedRenderFormats></DocumentLibraryConfiguration></Configuration></Extension><Extension Name="NULL" Type="Microsoft.ReportingServices.NullDeliveryProvider.NullProvider,ReportingServicesNullDeliveryProvider"/></Delivery><DeliveryUI><Extension Name="Report Server Email" Type="Microsoft.ReportingServices.EmailDeliveryProvider.EmailDeliveryProviderControl,ReportingServicesEmailDeliveryProvider"><DefaultDeliveryExtension>True</DefaultDeliveryExtension><Configuration><RSEmailDPConfiguration><DefaultRenderingExtension>MHTML</DefaultRenderingExtension></RSEmailDPConfiguration></Configuration></Extension><Extension Name="Report Server FileShare" Type="Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareUIControl,ReportingServicesFileShareDeliveryProvider"/></DeliveryUI><Render><Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.DataRenderer.XmlDataReport,Microsoft.ReportingServices.DataRendering"/><Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="false"/><Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"/><Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer,Microsoft.ReportingServices.ImageRendering"/><Extension Name="RGDI" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RGDIRenderer,Microsoft.ReportingServices.ImageRendering" Visible="false"/><Extension Name="HTML4.0" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false"/><Extension Name="MHTML" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExtension,Microsoft.ReportingServices.HtmlRendering"/><Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"/><Extension Name="RPL" Type="Microsoft.ReportingServices.Rendering.RPLRendering.RPLRenderer,Microsoft.ReportingServices.RPLRendering" Visible="false" LogAllExecutionRequests="false"/><Extension Name="IMAGE" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRenderer,Microsoft.ReportingServices.ImageRendering"/><Extension Name="WORD" Type="Microsoft.ReportingServices.Rendering.WordRenderer.WordDocumentRenderer,Microsoft.ReportingServices.WordRendering"/></Render><Data><Extension Name="SQL" Type="Microsoft.ReportingServices.DataExtensions.SqlConnectionWrapper,Microsoft.ReportingServices.DataExtensions"/><Extension Name="OLEDB" Type="Microsoft.ReportingServices.DataExtensions.OleDbConnectionWrapper,Microsoft.ReportingServices.DataExtensions"/><Extension Name="OLEDB-MD" Type="Microsoft.ReportingServices.DataExtensions.AdoMdConnection,Microsoft.ReportingServices.DataExtensions"/><Extension Name="ORACLE" Type="Microsoft.ReportingServices.DataExtensions.OracleClientConnectionWrapper,Microsoft.ReportingServices.DataExtensions"/><Extension Name="ODBC" Type="Microsoft.ReportingServices.DataExtensions.OdbcConnectionWrapper,Microsoft.ReportingServices.DataExtensions"/><Extension Name="XML" Type="Microsoft.ReportingServices.DataExtensions.XmlDPConnection,Microsoft.ReportingServices.DataExtensions"/><Extension Name="SAPBW" Type="Microsoft.ReportingServices.DataExtensions.SapBw.SapBwConnection,Microsoft.ReportingServices.DataExtensions.SapBw"/><Extension Name="ESSBASE" Type="Microsoft.ReportingServices.DataExtensions.Essbase.EssbaseConnection,Microsoft.ReportingServices.DataExtensions.Essbase"/><Extension Name="TERADATA" Type="Microsoft.ReportingServices.DataExtensions.TeradataConnectionWrapper,Microsoft.ReportingServices.DataExtensions"/><!-- <Extension Name="SSIS" Type="Microsoft.SqlServer.Dts.DtsClient.DtsConnection,Microsoft.SqlServer.Dts.DtsClient, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/> --></Data><SemanticQuery><Extension Name="SQL" Type="Microsoft.ReportingServices.SemanticQueryEngine.Sql.MSSQL.MSSqlSQCommand,Microsoft.ReportingServices.SemanticQueryEngine"><Configuration><EnableMathOpCasting>False</EnableMathOpCasting></Configuration></Extension><Extension Name="ORACLE" Type="Microsoft.ReportingServices.SemanticQueryEngine.Sql.Oracle.OraSqlSQCommand,Microsoft.ReportingServices.SemanticQueryEngine"><Configuration><EnableMathOpCasting>True</EnableMathOpCasting><DisableNO_MERGEInLeftOuters>False</DisableNO_MERGEInLeftOuters><EnableUnistr>False</EnableUnistr><DisableTSTruncation>False</DisableTSTruncation></Configuration></Extension><Extension Name="TERADATA" Type="Microsoft.ReportingServices.SemanticQueryEngine.Sql.Teradata.TdSqlSQCommand,Microsoft.ReportingServices.SemanticQueryEngine"><Configuration><EnableMathOpCasting>True</EnableMathOpCasting><ReplaceFunctionName>oREPLACE</ReplaceFunctionName></Configuration></Extension><Extension Name="OLEDB-MD" Type="Microsoft.AnalysisServices.Modeling.QueryExecution.ASSemanticQueryCommand,Microsoft.AnalysisServices.Modeling"/></SemanticQuery><ModelGeneration><Extension Name="SQL" Type="Microsoft.ReportingServices.SemanticQueryEngine.Sql.MSSQL.MsSqlModelGenerator,Microsoft.ReportingServices.SemanticQueryEngine"/><Extension Name="ORACLE" Type="Microsoft.ReportingServices.SemanticQueryEngine.Sql.Oracle.OraSqlModelGenerator,Microsoft.ReportingServices.SemanticQueryEngine"/><Extension Name="TERADATA" Type="Microsoft.ReportingServices.SemanticQueryEngine.Sql.Teradata.TdSqlModelGenerator,Microsoft.ReportingServices.SemanticQueryEngine"/><Extension Name="OLEDB-MD" Type="Microsoft.AnalysisServices.Modeling.Generation.ModelGeneratorExtention,Microsoft.AnalysisServices.Modeling"/></ModelGeneration><Security><Extension Name="Windows" Type="Microsoft.ReportingServices.Authorization.WindowsAuthorization, Microsoft.ReportingServices.Authorization"/></Security><Authentication><Extension Name="Windows" Type="Microsoft.ReportingServices.Authentication.WindowsAuthentication, Microsoft.ReportingServices.Authorization"/></Authentication><EventProcessing><Extension Name="SnapShot Extension" Type="Microsoft.ReportingServices.Library.HistorySnapShotCreatedHandler,ReportingServicesLibrary"><Event><Type>ReportHistorySnapshotCreated</Type></Event></Extension><Extension Name="Timed Subscription Extension" Type="Microsoft.ReportingServices.Library.TimedSubscriptionHandler,ReportingServicesLibrary"><Event><Type>TimedSubscription</Type></Event></Extension><Extension Name="Cache Update Extension" Type="Microsoft.ReportingServices.Library.ReportExecutionSnapshotUpdateEventHandler,ReportingServicesLibrary"><Event><Type>SnapshotUpdated</Type></Event></Extension></EventProcessing></Extensions></Configuration> [AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.] Microsoft.ReportingServices.Diagnostics.NativeDumperMethods.SetErrorText(String errorText) +0 Microsoft.ReportingServices.Diagnostics.<>c__DisplayClass2.<DumpHere>b__0() +1018 Microsoft.ReportingServices.Diagnostics.<>c__DisplayClass4.<RunFromRestrictedCasContext>b__3(Object state) +79 System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state) +84 Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.RunFromRestrictedCasContext(ContextBody callback) +99 Microsoft.ReportingServices.Diagnostics.Dumper.DumpHere(Exception optionalException, String assertionMessage, Boolean unhandledException) +162 Microsoft.ReportingServices.Diagnostics.Utilities.RSException..ctor(ErrorCode errorCode, String localizedMessage, Exception innerException, RSTrace tracer, String additionalTraceMessage, TraceLevel traceLevel, Object[] exceptionData) +384 Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException..ctor(Exception innerException, String additionalTraceMessage) +81 Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.WriteErrorResponse(Int32 code, String shortHttpDescription, Exception exception, Boolean errorResponseAsXml) +67 Microsoft.ReportingServices.WebServer.Global.WriteServerError(Exception e) +44 Microsoft.ReportingServices.WebServer.Global.Application_BeginRequest(Object sender, EventArgs e) +233 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
October 22nd, 2008 8:06pm

Access violation happens within the native p/invoke NativeDumperMethods.SetErrorText(String errorText) during processing the original exception, which basically hides the original exception happening within the Application_BeginRequest(Object sender, EventArgs e). Please repro the problem and find the corresponding location within the log file (by timestamp). Post here the corresponding log file extract starting from the record 'Throwing InternalCatalogException' till (including) the record with AccessViolationException. Thanks, Igor
Free Windows Admin Tool Kit Click here and download it now
October 23rd, 2008 2:47am

Hi Mike, Did you get any solution to the problem metioned above. Even i am facing same problem. Kindly help me out on this Thanks
November 24th, 2008 2:51pm

No, I've still not been able to find the problem. Igor, when you say "Post here the corresponding log file", which log file are you talking about? Thanks, Mike
Free Windows Admin Tool Kit Click here and download it now
December 4th, 2008 8:46pm

I have been receiving this error as well.Here is the excerpt from my Log file.w3wp!library!1!5/13/2009-16:46:25:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Runtime.InteropServices.SafeHandle.InternalDispose() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Runtime.InteropServices.SafeHandle.Dispose() at Microsoft.Win32.RegistryKey.Dispose(Boolean disposing) at Microsoft.Win32.RegistryKey.Close() at System.Diagnostics.SharedPerformanceCounter.GetCategoryData() at System.Diagnostics.SharedPerformanceCounter..ctor(String catName, String counterName, String instanceName, PerformanceCounterInstanceLifetime lifetime) at System.Diagnostics.PerformanceCounter.Initialize() at System.Diagnostics.PerformanceCounter.set_RawValue(Int64 value) at System.Data.ProviderBase.DbConnectionPoolCounters.Counter..ctor(String categoryName, String instanceName, String counterName, PerformanceCounterType counterType) at System.Data.ProviderBase.DbConnectionPoolCounters..ctor(String categoryName, String categoryHelp) at System.Data.SqlClient.SqlPerformanceCounters..ctor() at System.Data.SqlClient.SqlPerformanceCounters..cctor() --- End of inner exception stack trace --- at System.Data.SqlClient.SqlConnectionFactory..ctor() at System.Data.SqlClient.SqlConnectionFactory..cctor() --- End of inner exception stack trace --- at System.Data.SqlClient.SqlConnection..cctor() --- End of inner exception stack trace --- at System.Data.SqlClient.SqlConnection..ctor() at System.Data.SqlClient.SqlConnection..ctor(String connectionString) at Microsoft.ReportingServices.Library.ConnectionManager.OpenConnection() at Microsoft.ReportingServices.Library.Global.get_SharePointIntegratedFlagFromCatalog() at Microsoft.ReportingServices.WebServer.Global.RunOnlyOnceStartReportServer() at Microsoft.ReportingServices.WebServer.Global.StartApp() at Microsoft.ReportingServices.WebServer.Global.Application_BeginRequest(Object sender, EventArgs e) --- End of inner exception stack trace ---
May 14th, 2009 6:40pm

Igot the same error while working with VS 2008 Sp1 on some WPF project. The message:"Attempted to read or write protected memory. This is often an indication that other memory is corrupt." appeared. I think it's caused by the window layout system of visual studio. I had the solution view and output view parked on another monitor. After "Reset Windows Layout" the problem dissapeared.Robert
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2009 12:34pm

Igot the same error while working with VS 2008 Sp1 on some WPF project. The message: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." appeared. I think it's caused by the window layout system of visual studio. I had the solution view and output view parked on another monitor. After "Reset Windows Layout" the problem dissapeared. Robert Thanks Robert!! After I full re-install I couldn't debug anything. That simple trick saved the day!! Too bad it took me a day and a half to find this post. :-)
August 14th, 2009 10:11pm

Robert, you seriously saved me a truckload of time. Thanks!
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2009 8:19pm

We'll need more information to investiagte this issue. Can you post the RDL and especially the connection string you are using to access teh SQL Server Data Source? We will also need the RS trace log file which shows the error details. Two avenues to investigate: 1) File a bug on Connect.Microsoft.com 2) Open a support case with Customer Support Services. Reason I suggest these avenues is that the problem requires some deeper investigation and we may not be able to diagnose it effectively through the forums. Hope this helps, -Lukasz Got a bug or feature request? Tell me about it at http://connect.microsoft.com. This posting is provided "AS IS" with no warranties, and confers no rights.
September 21st, 2010 6:23pm

Hi Robert, I am facing the same error when trying to render a live video in WPF application. Can you explain a bit more on the resolution so that i can understand better. Thanks in advance
Free Windows Admin Tool Kit Click here and download it now
October 5th, 2010 9:57am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics