.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

How to remove .NET Remoting Fatal problem :Exception

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :.NET Framework


I am implementing Publisher/Subscriber pattern via .NET Remoting. My publisher is waiting for incoming requests on its url. At its side remoting environment configures properly and no problem at all.

At subscriber's end when I make some subscriptions from its side to publisher, it hangs out. I mean program hangs and console shows nothing , and it gone away, no exception here. When I disconnect publisher it now it resume's and follow processing and throws exceptions with stack Trace:

Will try again to add a subscription.System.Net.Sockets.SocketException (0x80004

005): An existing connection was forcibly closed by the remote host


Server stack trace:

   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size,

 SocketFlags socketFlags)

   at System.Runtime.Remoting.Channels.SocketStream.Read(Byte[] buffer, Int32 of

fset, Int32 size)

   at System.Runtime.Remoting.Channels.SocketHandler.ReadFromSocket(Byte[] buffe

r, Int32 offset, Int32 count)

View Complete Post

More Related Resource Links

Items.Remove or RemoveAt Problem


Hi Guys,

I have this issue i have been looking at for a while and cant seem to figure it out. I have two ddl's on my page and a InsertCommand from sqldatasource. My InsertCommand is actually updating the foreign key of the two ddl's in another table. When i click on my button it shows two numbers instead of one.

The challenging thing now is that i have


after the insert so it would not duplicate what i am updating. If i take this statement out of my code. it updates well as in showing the one record that was updated. if i put it back in there it shows two records where updated. I tested my sql statement and its working fine meaning it shows only one record is updating. Could you possibly know whats wrong.

Thanks in Advance

the type initializer for 'system.runtime.remoting.identity' threw an exception.

HI, I am trying to implement kerberos delegation in Active Directory enviroment with windows 2003 servers SP2. I have Client, ProxyServer and RemoteServer application that are developed on .Net framework v3.5 using .Net Remoting "System.Runtime.Remoting". I am not using Microsoft.Samples.Security.SSPI &  Microsoft.Samples.Runtime.Remoting.Security directly. my code is based on "http://blogs.msdn.com/dotnetremoting/archive/2006/07/06/662599.aspx" Only change that I have done is put impersonate="true" in channel configuration of ProxyServer and RemoteServer, and of course changed the UPN and Port and IP address. The Client's credentials are successfully impersonated by ProxyServer, I can access the text file on ProxyServer on behalf of client. But when from ProxyServer I try to execute the method on RemoteServer it throws "the type initializer for 'system.runtime.remoting.identity' threw an exception." After looking at blog http://www.secnewsgroups.net/group/microsoft.public.dotnet.security/topic8251.aspx I did required changing under Local Security Settings -> Local Policies -> User Rights Assignments -> impersonate a client after authentication and Create Global Objects. I have added three domain user names in three machine under whose credentials corrosponding application is running. When i run three applications on their

OutOfMemory Exception on 64 bit machines (Interop Problem)

Hello Our application needs to display the printer settings dialog. This works fine in 32bit windows systems, but results in a System.OutOfMemoryException at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb) when it is running under 64bit (Windows 2008 Server). The problem can easily be reproduced in a winform app. You need to set the platform target to x86 to experience the problem.Unfortuantely, our application needs to be built fox x86 for other reasons. Any ideas why this happens? Kind Regards Mat Source Code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Printing; using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication8 {     public partial class Form1 : Form     {         [DllImport("kernel32.dll")]         static extern IntPtr GlobalLock(IntPtr hMem);         [DllImport("kernel32.dll")]         [return: MarshalAs(UnmanagedType.Bool)]         static extern bool GlobalUnlock(IntPtr hMem);         [DllImport("kernel32.dll")]   &n

Soap exception problem

Hello, I'm having a problem with the web service soap exception that im facing. In my if else statement, the web service keeps on throwing soap exception when name was not found. SoapException was caught A user with the account name test.name could not be found --> User Not Found: Could not load profile data from the database. My question is.. Is it possible to handle that in if else statement? Basically the web service returns profile data (ex. name, age, address, in xml format) What i want is if just like this.. If _result isnot nothing then _str = _result else 'do nothing end if Is that possible?    Ã‚®Â©T½¼

.NET Remoting Problem with Sponsor Renewal on CAO (Client Activated Object) Architecture

I have figured out a strange behaviour when using Client Activated Sponsorship and hope to get a hint from somebody who already got in touch with similar problems. The case is as follows: An Application is used by a server and a client. Both use (or try to use) the same objects after a user login. A lease of a session object on the server (serverSession) is initialised correctly with all of its regular remoting values in the lease for InitialLeaseTime (10) SponsorshipTimeout (5) RenewOnCallTime (10) In order to test the behaviour the values are set to seconds. It is easier to check the log every few seconds, than to wait some minutes until the Sponsorship Renewal call. If a client performs a login, the lease is according to its logged in state renewed each 10 seconds (or whatever the value is set to). So no problem so far. The lease will be alive as long as the client performs a logout, by the way it is used on a local network. Just compare the log (the renewal is firing every 10 seconds as expected): 2010-02-17 10:29:40.4338 Info Log5 SponsorObject:Renewal() 2010-02-17 10:29:50.4308 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:00.4328 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:10.4298 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:20.4318 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:30.4288 Info Log5 SponsorObject:Renewal() As soon as

Microsoft SQL Server 2005 Uninstall remove problem


In trying to install the 2010 Switched On Schoolhouse Home Edition it tries to install the SQL server then comes up with error message that it fails.


Tech support walked me through trying to delete all the SQL titles manually and I came to the last and only application of Microsoft SQL Server 2005 with a log file "80" that will NOT delete.


The IT told me it was corrupt in the registry.


Is there ANY way to delete this??? The new installation has a newer version but I think it is the same one.


Thanks, Ricky

Exception when deploying .net remoting application over internet

Hi everyone,

I'm trying to make a .net application works in a computer outside my intranet, using a web service created with .Net remoting and
hosted in my intranet.

This application works well in any computer in the intranet, but not in the computer
that accesses the web service over the internet.

My .net remoting web service is configured in IIs and uses http channel.

I'm using interfaces and i'm implementing this interfaces each one
being a subclass of the MarshalByRefObject, like this:
    public interface IClassMain
      int GetSum(int a, int b);
      IClass1 Class1 { get; }

    public interface IClass1
      String GetFormattedName(string firstname, string lastname);

    internal class ClassMainImplementation : MarshalByRefObject, IClassMain
      private Class1Implementation m_class1Implementati

WCF: Problem throwing FaultException after touching Exception.Data collection



My client code receives a CommunicationException if my server code touches the Exception.Data collection.  If my server code avoids the Exception.Data collection, then my client code works (i.e. it receives my custom exception as expected). 


I have reduced this problem down to two simple examples (see below)..one that works (A), one that does not (B).  The only difference between the two examples is that in example B, the code looks at the Exception.Data.Count property.


Why would touching the Exception.Data collection cause my client code to receive the CommunicationException? 

Is there any way to avoid this?


Thank you in advance for an consideration you may give to this question. 


A: Working Example: Client Receives CustomException
  throw new CustomException("This is a custom exception.");
 catch (CustomException ex)
  throw new FaultException<CustomException>(ex, new FaultReason(ex.Message), new FaultCode("Receiver"));


B: Non-working Example: Clien

Error warming up the worker process. - Inner Exception: System.Runtime.Remoting.RemotingException: 4

Can anybody guide me how to resolve this,

10/16/2010 01:50:32.39 SPUCHostService.exe (0x0AA4)             0x0D9C SharePoint Foundation         Sandboxed Code Service         fe8d Medium   -  - Error warming up the worker process. - Inner Exception: System.Runtime.Remoting.RemotingException: 4 arguments were passed to 'Microsoft.SharePoint.UserCode.ISPUserCodeWorkerProcessProxy::Initialize'. 3 arguments were expected by this method.    Server stack trace:      at System.Runtime.Remoting.Messaging.Message.CoerceArgs(MethodBase mb, Object[] args, ParameterInfo[] pi)     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 reqMsg, IMessage retMsg)     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,

NET Runtime version 2.0.50727.3603 - Fatal Execution Engine Error Encountered for Remoting Applicati



We encountered a sudden "NET Runtime version 2.0.50727.3603 - Fatal Execution Engine Error" which caused our application to be terminated. We googled this error, and we found that there was a problem with mscorwks.dll (http://support.microsoft.com/kb/913384). This post is for Dec, 2007, but our servers have latest .NET Service Packs Installed. We feel that since .NET 2.0 SP2 is installed this error might have been fixed by Microsoft in SP2, not sure though. We are looking for any possible solutions, with which we can avoid this error again. I am mentioning the error and .NET software installed on our server below.

The application is installed as a Windows .NET Service and runs under Local System Account.

.NET Softwares Installed.

Microsoft .NET Framework 2.0 Service Pack 2
Microsoft .NET Framework 3.0 Service Pack 2
Microsoft .NET Framework 3.5 SP1
Microsoft Report Viewer Redistributable 2005

Below are the errors logged in the event viewer.

Event Type: Error
Event Source: Service Con

webBrowser exception problem


I'm writing a C# program that makes use of the webBrowser control. Generally I've been successful in using it but have encountered a problem I can't figure out.

I intercept the DocumentCompleted event from my webBrowser control. During the processing of that event I create an additional webBrowser control and  call its Navigate function to tell it to navigate to a specific URL. When I do that it throws an exception : "IWebBrowser2 get from the native ActiveX control did not succeed", and I can see that the axIWebBrowser2 property of the control is null.

My code is approximately like this:

webBrowser otherWebBrowser = new webBrowser(); 

private void webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
   MessageBox.Show("Excption was thrown!");

Is it possible that you can't instantiate and call the Navigate method for a webBrowser


Every self-respected programmer should include exception handling techniques. Sometimes your application will generate an error. Regardless of who was responsible for this error, the programmer or the user, it is up to the first to include the necessary exception handling techniques to keep his/her program from crashing. The .Net environment provides useful techniques for avoiding disastrous errors such as try-catch statements and user-defined exceptions.

Global Exception Handling with ASP.NET

After your global exception handler has done its work, you'll want to redirect the users of your website to a friendly page that tells them that something has gone wrong, and then provide them with customer support information as well as a link back to your web application's home page.

Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

Regrading Sharpoint 2010 problem and solutions

We can write your question and problem on this blogger.you get ans.use.

This sharpoint 2010 problem solving threads

Hi friend,

you can use this thread to solving problem and solutions.

SQL Server 2005 Try and Catch Exception Handling

I'm pretty excited to see that there is some real error handling for T-SQL code in SQL Server 2005. It's pretty painful to have your wonderfully architected .NET solution tainted by less-than-VBScript error handling for stored procedures in the database. The big difference being the addition of TRY..CATCH blocks. Let's take a look:
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