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

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

SPUtility.TransferToErrorPage(message) System.Thread.Abort

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :SharePoint

In a web part, i create a new site and add some items to the list of the neew site.

Then i redirect to the site.

If there is any error i use the SPUtility.TransferToErrorPage(message) but there is an error System.Thread.Abort.


I was googling and found that if there is any code running, this error should appears.

Any solution for this problem? any other function?


View Complete Post

More Related Resource Links

SPUtility.TransferToErrorPage("My Message") not allowed to attach any controls event.

Hi, I have created a custom error page and update it using to webApplication using following code: WebApplication.UpdateMappedPage(SPWebApplicaton.SPCustomPage.Error, CustomErrorPage) My error page contains one link button and onClick event, I have to perform some operations. As I click on the button Error is occurred and onClick event code didn't execute. If I render custom error page by providing url in IE like http://myweburl/_layouts/myerrorpage then every thing is working fine i.e. every event is working fine. Also If I use SPUtility.Redirect() method instead of SPUtility.TransferToErrorPage() then also every thing is working fine. My error message is as follow in case of SPUtility.TransferToErrorPage(): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. StackTrace is [HttpException (0x80004005): Unable to validate data.]    System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +10988853    System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +295 [ViewStateException: Invalid viewstate. Client IP: fe80::8960:150e:cf5d:2e17%11 Port: 53192 User-Agent: Mozill

Compiler Error Message : CS0006: Metadata file 'System.EnterpriseServices.dll' could not be found


I get this error when i Debug my web application....


I followed these steps.,

  • Ended the aspnet_wp.exe process in the Windows Task Manager
  • Then deleted the application`s folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
  • Then started Visual Studio 2008 again

I also rebooted my system but no use....

Plz help !

System.InvalidOperationException: Instance operation is not valid on workflow runtime thread

Am getting the exception related in the title of this article when using the StateMachineWorkflowInstance object to arbitarily set state in my workflow code; and am unsure why.  The code follows below:   500     Protected Overrides Function Execute(ByVal executionContext As System.Workflow.ComponentModel.ActivityExecutionContext) As System.Workflow.ComponentModel.ActivityExecutionStatus   501    502    506         Dim smwi As StateMachineWorkflowInstance = New StateMachineWorkflowInstance(StaticWFRuntime.LocalRuntime, Me.WorkflowInstanceId)   511    512         'set workflow-wide database connection string   513         _connectionString = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString   518    519         Utility.LogEnabled()   520    521         Utility.FoaeaLogger.WriteEntry("Processing TracingApplication.Execute()....", EventLogEntryType.Information)   522         If StaticWFRuntime.LocalRuntime Is Nothing OrElse StaticWFRuntime.LocalRuntime.IsStarted = False Then   523             Utility.FoaeaLogger.WriteEntry("No static RuntimeService object exists!", EventLogEntryType.Warning)   524         End If   525    526         Return MyBase.Execute(executionContext)   527    528     End Function   796     Private Sub gotoState2_ExecuteCode(ByVal sender As System.Object, ByVal e As System.EventArgs)   797    798        

'System.ExecutionEngineException' occurred in WindowsBase.dll parsing Run in separate thread

Receiving the above exception when attempting to fire off a BackgroundWorker and parse the FlowDocument via Run. Sometimes does not reference WindowsBase...as such Exception of type 'System.ExecutionEngineException' was thrown. Some key things are that if I run the exact same code on the UI thread there are no issues at all. If I run the code as a BackgroundWorker and the document is very small, no issues will surface either...although that may be a timing issue masking itself. Below is the entire parsing class...things begin in the method at the bottom the ParseRuns method.   public class Parser : IParser { private void OnDoWork(object sender, DoWorkEventArgs e) { ParseRuns(e); } private void OnWorkComplete(object sender, RunWorkerCompletedEventArgs e) { ParserHandler handler = _parsingHandler; if (handler != null) handler(this, new ParserArgs((e.Result as List<Data>)[0].Words, (e.Result as List<Data>)[1].Words, e.Error)); } #region IParser Members private ParserHandler _parsingHandler; event ParserHandler IParser.ParsingCompleted { add { _parsingHandler += value; } remove { _parsingHandler -= value; } } void IParser.Parse(FlowDocument origText, FlowDocument modifiedText) { //nothing to do with null if (origText == null || modifiedText == null) return; //ParseUIThread(origText, mo

Sending a Mail Message to Multiple Addresses Using System.Net.Mail

 VWD 2008 Express.  Visual Basic. I use the following routine (XXXXX have replaced sensitive data) to try to send an email message to mutiple email addresses.  It only sends to the first email address in the comma-delimited list.  How can I send the message to multiple email addresses?  Thanks for the help. Protected Sub SendButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SendButton.Click 'Send the message to all users who have emails. Dim smtpClient As SmtpClient = New SmtpClient() Dim message As MailMessage = New MailMessage() Dim Success As Boolean, I As Integer, strTO As String = "" Try 'Gather all user email addresses Dim strSQL = "SELECT EMail from aspnet_membership where Email<>''" Dim MyDataset As DataSet = GetDataSet(strSQL, Success) I = 0 For Each dr As DataRow In MyDataset.Tables(0).Rows If I = MyDataset.Tables(0).Rows.Count - 1 Then strTO = strTO + dr("Email") Else strTO = strTO + dr("Email") + "," End If I = I + 1 Next Dim toAddress As New MailAddress(strTO, "To All Users") 'Ga

Is Dispatcher.BeginInvoke really NOT thread safe, while the old System.Windows.Forms.Control.BeginIn




System.Windows.Forms.Control.BeginInvoke is documented as thread safe (in fact, BeginInvoke , EndInvoke , Invoke , InvokeRequired , and CreateGraphics are).



But in WPF, Dispatcher.BeginInvoke is not documented as thread safe. Which would appear to me as a regression (and not really convenient, to be honest).

Was it only forgotten in MSDN documentation, or should I really use external locking to prevent the dispatcher to get lost in its messages and priorities?



Thanks. ;)

Error message setting up System DSN: Setup routines not found. Please reinstall driver.



I'm running W2K3 SP1.  The MDAC Configuration Checker reports MDAC 2.8 SP2.  The only discrepancy is MSADCO.DLL, where the expected version is 2.82.1830.0 and my actual version is 2.82.2651.0 (svr03_sp1_gdr.060301-1546).

The error message I'm getting when I use the ODBC Administrator dialog to set up a new entry is: "The setup routines for the SQL Server ODBC driver could not be found.  Please reinstall the driver."

This is followed by a dialog titled: "Driver's ConfigDSN, ConfigDriver, or ConfigTranslator failed."  The body text of the dialog is "Component not found in the registry."

Does anyone have any idea how I can repair this?


System.Net.WebException Message=The underlying connection was closed: The connection was clos



I have a work flow developed in vs2010 WF4 exposed as service. I am consuming this service in a test web application, whenever service returns i get the following exception:

System.Net.WebException       Message=The underlying connection was closed: The connection was closed unexpectedly.

If i return a string it works fine, whenever i deserialize my result into an object and return that object i get the above mentioned error.




System.Net.WebException Message=The underlying connection was closed: The connection was clos



I have a work flow developed in vs2010 WF4 exposed as service. I am consuming this service in a test web application, whenever service returns i get the following exception:

System.Net.WebException       Message=The underlying connection was closed: The connection was closed unexpectedly.

If i return a string it works fine, whenever i deserialize my result into an object and return that object i get the above mentioned error.




MSMQ system.messaging.message.body unauthorizedaccessexception: Access is denied (exception fro HRRE



I am facing this error long back.. Please help me in this regards...

I have my .Net 2.0 Windows service to read the Priavate non transactions message queues and process into Sql Server 2005 database.....

I have used threading concept too.. i have multiple queues to be read on regular basis...

Getting below error exactly when reading the message body

system.messaging.message mInput ;

timespan tsInput = 1000;

mInput = mqInput.Receive(tsInput);

      ActiveXMessageFormatter axFormatter= new ActiveXMessageFormatter();
      pubqloader.DMPMessage DMPmsg = new PubQLoader.DMPMessage();
      object temp = new Object();
      temp = mInput.Body; --- here getting the error 

UnauthorizedAccessException Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))   

Stack Trace1: when mInput.Body is used

System.Messaging.Interop.NativeMethods.OleLoadFromStream(IStream stream, Guid& iid)
   at System.Messaging.ActiveXMessageFormatter.Read(Message message)
   at System.Messaging.Message.get_Body()

how to use javascript message("alert) in System.Web.IHttpHandler


hello every one i using system web handler when System.Web.IHttpHandler

           save the record than how can show message "Record is saved"

System.ServiceModel.Channels.Message class problem in work flow persistence


I have used following link to create a workflow to call web service(asmx) in workflow rehosting.


I have created the workflow successfully. But when i run the workflow and workflow goes for persistence it shows following pesistence related errors.

1.The execution of the InstancePersistenceCommand named {urn:schemas-microsoft-com:System.Activities.Persistence/command}SaveWorkflow was interrupted by an error.

2.Type 'System.ServiceModel.Channels.StreamedMessage' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.  If the type is a collection, consider marking it with the CollectionDataContractAttribute.  See the Microsoft .NET Framework documentation for other supported types."

I think this error is related to serialization of Message class.

Can anyone suggest?




While processing large cubes, various file system errors: "the background thread running lazy writer



We consistently get these I/O errors when processing large OLAP databases.  After a reboot, I can usually get a database to process a few times, but then suddenly reprocessing will fail with errors similar to the one shown below, when nothing changed (no data or structure changes).  The specific file(s) it reports are always different.  Also, sometimes it crashes the msmdsrv.exe process, which seems to intermittently affect other server functions as well (killing the ability to RDP into the server, or the ability to open Event Viewer).


<error message>

File system error: The background thread running lazy writer encountered an I/O error.
Physical file: \\?\D:\OLAPData\SSAS1\SA1.166.db\SA1 Data Source View 1.238.cub\Fact Subject.231.det\Fact Subject.221.prt\271.Aspect.Source Key.fact.map.hdr.
Logical file: .
File system error: The following error occurred while writing to the file 'LazyWriter Stream':
Insufficient system resources exist to complete the requested service. .
File system error: The background thread running lazy writer encountered an I/O error.
Physical file: \\?\D:\OLAPData\SSAS1\SA1.166.db\SA1 Data

System.Threading.ThreadAbortException: Thread was being aborted


In my ASP.Net web application, one of the function is calling the WCF service that has been developed by .Net framework 3.0 using VS2005.It works fine on production and user can make request 8 times(calls) between client and service after that the web application got hanged and generated the following error message. But it works fine on development even more than 8 requests.

I given the proxy time out 20 min in the client side proxy setting.

Error message:

Gmail internal chat like message box

This article provides you with the multi-functional message box window through which the usability of the web-site or any web application increases.

.Configurable MessageBox window with AJAX Support
.can set maximum number of message boxes to be visible
.can define the auto reload time, for single message, for all messages or no reload
.can create messages through a single function call
.can define auto hide time for each messages

System Development Life Cycle

The Systems Development Life Cycle (SDLC) is a conceptual model used in project management that describes the stages involved in an information system development project from an initial feasibility study through maintenance of the completed application. Various SDLC methodologies have been developed to guide the processes involved including the waterfall model (the original SDLC method), rapid application development (RAD), joint application development (JAD), the fountain model and the spiral model. Mostly, several models are combined into some sort of hybrid methodology

The Agile System Development Life Cycle (SDLC)

The goal of this article is to describe the agile system development life cycle (SDLC), putting it in context from what you may have heard about within the agile community and more importantly within the context of your overall IT efforts.
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