Showing posts with label developed. Show all posts
Showing posts with label developed. Show all posts

Saturday, March 31, 2012

System.ExecutionEngineException problem

I have a stable app developed on ASP.NET 1.1 that I'm porting to 2.0.
However, I've noticed that on one page, if I click a button to perform some
business logic (which runs fine), then click on a hyperlink to move to a
different page, I get a 'System.ExecutionEngineException' exception. There
is no line highlighted in the debugger.
I'm not using interop or other threads.
Event viewer shows:
.NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error (7A05E2B3)
(80131506)
I also sometimes see:
aspnet_wp.exe (PID: 2324) stopped unexpectedly.
It fails predictably on the dev web server in VS2005, less regularly on IIS
(although it does still fail).
I've tried to create a simplified program to reproduce the problem - so far
without success. However I did notice that the problem was worsened by some
code returning an array (15-20) of small Dictionary<> objects. I added a
conversion routine to turn them into arrays of structs, and some of the
problems went away. Is this something to do with memory-shortage' My PC has
800mb, with around 80mb free when running the code.
Whats going on? Is this a bug in .NET2, or is there something stupid in my
code? Advice would be welcome!!
XP Pro sp2, .NET 2.0.50727.42, VS2005, SQL2005
Thanks,
JohnI've reported this to Microsoft, and they can reproduce the problem. I'll
post an update when I know more.
John
"John" <jsparrowNOSPAM@.ecclesdeletethiscollege.ac.uk> wrote in message
news:OAQ9HMLPGHA.812@.TK2MSFTNGP10.phx.gbl...
>I have a stable app developed on ASP.NET 1.1 that I'm porting to 2.0.
> However, I've noticed that on one page, if I click a button to perform
> some business logic (which runs fine), then click on a hyperlink to move
> to a different page, I get a 'System.ExecutionEngineException' exception.
> There is no line highlighted in the debugger.
Microsoft report the problems stems back to a Dictionary<decimal,double>
instance.
Looks like the CLR can't cope with this for some reason. Be afraid....
John
"John" <jsparrowNOSPAM@.ecclesdeletethiscollege.ac.uk> wrote in message
news:e2h74swPGHA.5296@.TK2MSFTNGP09.phx.gbl...

System.ExecutionEngineException problem

I have a stable app developed on ASP.NET 1.1 that I'm porting to 2.0.

However, I've noticed that on one page, if I click a button to perform some
business logic (which runs fine), then click on a hyperlink to move to a
different page, I get a 'System.ExecutionEngineException' exception. There
is no line highlighted in the debugger.

I'm not using interop or other threads.

Event viewer shows:

..NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error (7A05E2B3)
(80131506)

I also sometimes see:

aspnet_wp.exe (PID: 2324) stopped unexpectedly.

It fails predictably on the dev web server in VS2005, less regularly on IIS
(although it does still fail).

I've tried to create a simplified program to reproduce the problem - so far
without success. However I did notice that the problem was worsened by some
code returning an array (15-20) of small Dictionary<> objects. I added a
conversion routine to turn them into arrays of structs, and some of the
problems went away. Is this something to do with memory-shortage?? My PC has
800mb, with around 80mb free when running the code.

Whats going on? Is this a bug in .NET2, or is there something stupid in my
code? Advice would be welcome!!

XP Pro sp2, .NET 2.0.50727.42, VS2005, SQL2005

Thanks,

JohnI've reported this to Microsoft, and they can reproduce the problem. I'll
post an update when I know more.

John

"John" <jsparrowNOSPAM@.ecclesdeletethiscollege.ac.uk> wrote in message
news:OAQ9HMLPGHA.812@.TK2MSFTNGP10.phx.gbl...
>I have a stable app developed on ASP.NET 1.1 that I'm porting to 2.0.
> However, I've noticed that on one page, if I click a button to perform
> some business logic (which runs fine), then click on a hyperlink to move
> to a different page, I get a 'System.ExecutionEngineException' exception.
> There is no line highlighted in the debugger.
Microsoft report the problems stems back to a Dictionary<decimal,double>
instance.

Looks like the CLR can't cope with this for some reason. Be afraid....

John

"John" <jsparrowNOSPAM@.ecclesdeletethiscollege.ac.uk> wrote in message
news:e2h74swPGHA.5296@.TK2MSFTNGP09.phx.gbl...

>> However, I've noticed that on one page, if I click a button to perform
>> some business logic (which runs fine), then click on a hyperlink to move
>> to a different page, I get a 'System.ExecutionEngineException' exception.
>> There is no line highlighted in the debugger.

Tuesday, March 13, 2012

System.Security.Cryptography.CryptographicExceptio n:

Hi,

I have two web applications running on my machine.The
application is developed using asp.net 1.1 and vb.net.When i try to run
both the applications in the same browsers, i get the following error.
(System.Security.Cryptography.CryptographicExcepti on: Bad Data. at
System.Security.Cryptography.CryptoAPITransform._D ecryptData(IntPtr
hKey, Byte[] rgb, Int32 ib, Int32 cb, Boolean fDone) at
System.Security.Cryptography.CryptoAPITransform.Tr ansformFinalBlock(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount) at
System.Security.Cryptography.CryptoStream.FlushFin alBlock() at
System.Web.Configuration.MachineKey.EncryptOrDecry ptData(Boolean
fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length) at
System.Web.Security.FormsAuthentication.Decrypt(St ring
encryptedTicket))

That is, when i run the first application and run the second
application in the same browser, i get this error.If i run it in two
different browsers, then it works fine.

Can any one help me out.r u using Forms authentication?

"muthu" <s.muthumanickam@.gmail.comwrote in message
news:1152521970.538688.249490@.m73g2000cwd.googlegr oups.com...

Quote:

Originally Posted by

Hi,
>
I have two web applications running on my machine.The
application is developed using asp.net 1.1 and vb.net.When i try to run
both the applications in the same browsers, i get the following error.
(System.Security.Cryptography.CryptographicExcepti on: Bad Data. at
System.Security.Cryptography.CryptoAPITransform._D ecryptData(IntPtr
hKey, Byte[] rgb, Int32 ib, Int32 cb, Boolean fDone) at
System.Security.Cryptography.CryptoAPITransform.Tr ansformFinalBlock(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount) at
System.Security.Cryptography.CryptoStream.FlushFin alBlock() at
System.Web.Configuration.MachineKey.EncryptOrDecry ptData(Boolean
fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length) at
System.Web.Security.FormsAuthentication.Decrypt(St ring
encryptedTicket))
>
That is, when i run the first application and run the second
application in the same browser, i get this error.If i run it in two
different browsers, then it works fine.
>
Can any one help me out.
>

System.Security.SecurityException: That assembly does not allow partially trusted callers.

I developed a web site using .net 2.0, mysql 4.0 and IIS 5.0. The server is hosted by a third party.

I am using the MySql.Data.dll library version 5.0.7.0 to connect to the database. I did not create any custom assembly and I am using the MySqlData objects directly from the code:

using MySql.Data.MySqlClient;


MySqlConnection conn;
MySqlDataAdapter data_retriever;
DataTable TextDataTable;

TextDataTable = new DataTable();

data_retriever = new MySqlDataAdapter(last_query_executed.Value.ToString(), conn);

data_retriever.Fill(TextDataTable);

This is the error I get:

System.Security.SecurityException: That assembly does not allow partially trusted callers.

[SecurityException: That assembly does not allow partially trusted callers.]
search_search.BindData() +0
search_search.Page_Load(Object sender, EventArgs e) +30
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6978
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.search_search_aspx.ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

My level of knowledge of .NET and Visual Studio is not advanced.

Do you have any suggestions?

Thanks,

Christian

Here is a post on the issue. It seems the current server configuration does not allow partial trusted callers.

http://bloggingabout.net/blogs/rick/archive/2006/04/07/11929.aspx -- this may not really apply becaus eyour site is hosted by a 3rd party

http://forums.mysql.com/read.php?38,95478,96748#msg-96748 -- has a link to download a new version of MySql assembly allowing partial trust. Not sure it will work, mixed results

http://forums.asp.net/t/999456.aspx -- has some other solutions. One of which is using a ODBC connection to MySql instead.

http://dev.mysql.com/tech-resources/articles/dotnet/ --see for ODBC driver details


I tried to recompile the library. However, I get a compilation error after I add the following line in the Assemplyinfo.cs:

[assembly: AllowPartialllyTrustedCallers]

Any ideas?

Christian


What error did you get? Also post your AssemblyInfo.cs file.


I fixed this problem, I was missing the following line:

using

System.Security;

however, now i am getting the error:

Unable to connect to any of the specified MySQL hosts.