Azure SQL Database is fully occupied without requests - asp.net

I am using an Azure Web App (own ASP.NET Project) combined with an Azure SQL database.
My web application is requesting the database on each request to check the userlevel for example.
The workload on the Azure charts are totally normal but sometimes there are some strange workloads after special events. For example I worked on the ASP.NET Project yesterday at 9PM on my local machine without publishing or opening the Server Explorers. I also did not update the firewall IP in Azure for accessing the database from my local machine.
After a hour of work I noticed that the website was sending back a 502 Error after loading for 1.5 minutes.
I took a look on the charts and noticed that the database was occupied by requests since I started programming on the local machine.
Trying to republish, restart the server and changing the database pricing tier did not help.
The Azure Web App Chart:
The Azure SQL Database Chart:
I have no idea why this happens because it is not the first time and the downtime is not that short.
--- EDIT: ---
As #DanRediske-MSFT mentioned below I tracked the SQL queries in the Management Studio and saw that there is one statement which is using a lot of resources (is executing extremely long):
The SQL big resource statement is really long because it is generated by the Entity Framework:
SELECT
[Project1].[AccessFailedCount] AS [AccessFailedCount],
[Project1].[Id] AS [Id],
[Project1].[UserDomain] AS [UserDomain],
[Project1].[Email] AS [Email],
[Project1].[EmailConfirmed] AS [EmailConfirmed],
[Project1].[PasswordHash] AS [PasswordHash],
[Project1].[SecurityStamp] AS [SecurityStamp],
[Project1].[UserName] AS [UserName],
[Project1].[AccountDetail_Id] AS [AccountDetail_Id],
[Project1].[AccountSetting_Id] AS [AccountSetting_Id],
[Project1].[BusinessDetail_Id] AS [BusinessDetail_Id],
[Project1].[LeadCollection_Id] AS [LeadCollection_Id],
[Project1].[PaymentDetail_Id] AS [PaymentDetail_Id],
[Project1].[UserDetail_Id] AS [UserDetail_Id],
[Project1].[C2] AS [C1],
[Project1].[Id1] AS [Id1],
[Project1].[OrderDate] AS [OrderDate],
[Project1].[OrderNumber] AS [OrderNumber],
[Project1].[HasBeenHandled] AS [HasBeenHandled],
[Project1].[OrderId] AS [OrderId],
[Project1].[PaypalSubscriptionID] AS [PaypalSubscriptionID],
[Project1].[IsActive] AS [IsActive],
[Project1].[Product_ProductID] AS [Product_ProductID],
[Project1].[User_Id] AS [User_Id],
[Project1].[C1] AS [C2],
[Project1].[PaymentID] AS [PaymentID],
[Project1].[PaymentDate] AS [PaymentDate],
[Project1].[Amount] AS [Amount],
[Project1].[HasBeenHandled1] AS [HasBeenHandled1],
[Project1].[TransactionID] AS [TransactionID],
[Project1].[Order_ID] AS [Order_ID]
FROM ( SELECT
[Extent1].[Id] AS [Id],
[Extent1].[UserDomain] AS [UserDomain],
[Extent1].[Email] AS [Email],
[Extent1].[EmailConfirmed] AS [EmailConfirmed],
[Extent1].[PasswordHash] AS [PasswordHash],
[Extent1].[SecurityStamp] AS [SecurityStamp],
[Extent1].[AccessFailedCount] AS [AccessFailedCount],
[Extent1].[UserName] AS [UserName],
[Extent1].[AccountDetail_Id] AS [AccountDetail_Id],
[Extent1].[AccountSetting_Id] AS [AccountSetting_Id],
[Extent1].[BusinessDetail_Id] AS [BusinessDetail_Id],
[Extent1].[LeadCollection_Id] AS [LeadCollection_Id],
[Extent1].[PaymentDetail_Id] AS [PaymentDetail_Id],
[Extent1].[UserDetail_Id] AS [UserDetail_Id],
[Join2].[ID] AS [Id1],
[Join2].[OrderDate] AS [OrderDate],
[Join2].[OrderNumber] AS [OrderNumber],
[Join2].[HasBeenHandled1] AS [HasBeenHandled],
[Join2].[Product_ProductID] AS [Product_ProductID],
[Join2].[User_Id] AS [User_Id],
[Join2].[OrderId] AS [OrderId],
[Join2].[PaypalSubscriptionID] AS [PaypalSubscriptionID],
[Join2].[IsActive] AS [IsActive],
[Join2].[PaymentID] AS [PaymentID],
[Join2].[PaymentDate] AS [PaymentDate],
[Join2].[Amount] AS [Amount],
[Join2].[HasBeenHandled2] AS [HasBeenHandled1],
[Join2].[TransactionID] AS [TransactionID],
[Join2].[Order_ID] AS [Order_ID],
CASE WHEN ([Join2].[ID] IS NULL) THEN CAST(NULL AS int) WHEN ([Join2].[PaymentID] IS NULL) THEN CAST(NULL AS int) ELSE 1 END AS [C1],
CASE WHEN ([Join2].[ID] IS NULL) THEN CAST(NULL AS int) ELSE 1 END AS [C2]
FROM [dbo].[AspNetUsers] AS [Extent1]
LEFT OUTER JOIN (SELECT [Extent2].[ID] AS [ID], [Extent2].[OrderDate] AS [OrderDate], [Extent2].[OrderNumber] AS [OrderNumber], [Extent2].[HasBeenHandled] AS [HasBeenHandled1], [Extent2].[Product_ProductID] AS [Product_ProductID], [Extent2].[User_Id] AS [User_Id], [Extent3].[OrderId] AS [OrderId], [Extent3].[PaypalSubscriptionID] AS [PaypalSubscriptionID], [Extent3].[IsActive] AS [IsActive], [Extent4].[PaymentID] AS [PaymentID], [Extent4].[PaymentDate] AS [PaymentDate], [Extent4].[Amount] AS [Amount], [Extent4].[HasBeenHandled] AS [HasBeenHandled2], [Extent4].[TransactionID] AS [TransactionID], [Extent4].[Order_ID] AS [Order_ID]
FROM [dbo]
It looks like the statement would not be complete but that's all I see in the .sqlplan file StatementText Attribute. So here it would be the complete file for that statement: http://alexpower.de/snippet.sqlplan
For me it now would be intresting to know which EF code is generating that statement. Is this possible to get that information?
--- EDIT: ---
Found some interesting Events in the Event Viewer on domainname.scm.azurewebsites.net/Support but don't know what to do with it:
Info:
.NET Runtime version 4.0.30319.0 - Loading profiler failed. Failed
trying to receive from out of process a request to attach a profiler.
HRESULT: 0x8007006d. Process ID (decimal): 4716. Message ID: [0x250d].
Warning:
Worker Process requested recycle due to 'Percent Slow Requests' limit.
Error:
Event code: 3005 Event message: An unhandled exception has occurred.
Event time: 3/22/2017 9:47:27 PM Event time (UTC): 3/22/2017 8:47:27
PM Event ID: 919f06b7f5e647beb75be7c8400d107f Event sequence: 8 Event
occurrence: 1 Event detail code: 0
Application information: Application domain:
/LM/W3SVC/712043775/ROOT-1-131346876896158300 Trust level: Full
Application Virtual Path: / Application Path: D:\Program Files
(x86)\SiteExtensions\Kudu\61.60316.2745\ Machine name: RD00155D56FC01
Process information: Process ID: 5064 Process name: w3wp.exe Account
name: IIS APPPOOL\onlineplaybook
Exception information: Exception type: HttpException Exception
message: Server cannot append header after HTTP headers have been
sent. at System.Web.HttpHeaderCollection.SetHeader(String name, String
value, Boolean replace) at System.Web.HttpHeaderCollection.Add(String
name, String value) at
Kudu.Services.Web.Tracing.TraceModule.OnBeginRequest(Object sender,
EventArgs e) at
System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)
Request information: Request URL:
https://onlineplaybook.scm.azurewebsites.net:443/msdeploy.axd?site=onlineplaybook
Request path: /msdeploy.axd User host address: 79.248.163.180 User:
Is authenticated: False Authentication Type: Thread account name: IIS
APPPOOL\onlineplaybook
Thread information: Thread ID: 20 Thread account name: IIS
APPPOOL\onlineplaybook Is impersonating: False Stack trace: at
System.Web.HttpHeaderCollection.SetHeader(String name, String value,
Boolean replace) at System.Web.HttpHeaderCollection.Add(String name,
String value) at
Kudu.Services.Web.Tracing.TraceModule.OnBeginRequest(Object sender,
EventArgs e) at
System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)
Custom event details:

Related

Executing a .bat file from ASP.NET / VB.NET on the server

I'm trying to execute a batch file, for testing purposes it's called -> test.bat
the location of the file is in a Folder named scripts.
Following have I tried:
System.Diagnostics.Process.Start(Server.MapPath("Scripts/test.bat"))
System.Diagnostics.Process.Start("C://......Scripts/test.bat"))
Dim batDir As String = Server.MapPath("C://...../Scripts/") 'And with String format()
proc = New Process()
proc.StartInfo.WorkingDirectory = batDir
proc.StartInfo.FileName = "test.bat"
proc.StartInfo.CreateNoWindow = False 'Don't know what this is, copied it from somewhere.
proc.Start()
proc.WaitForExit()
And I don't get any exception.
Edit 1:
My test.bat should create a folder on the Desktop (Testing purposes).
Edit 2: I'm getting this warning in the Event Log
Event code: 3001
Event message: Request was cancelled.
Event time: 21.07.2020 14:17:09
Event time (UTC): 21.07.2020 12:17:09
Event ID: 4dbd86698e044d2092a89ed01d24f418
Event sequence: 3809
Event occurrence: 4
Event detail code: 0
Application information:
Application domain: xxx
Trust level: Full
Application Virtual Path: xxx
Application Path: C:\xxx
Machine name: xxx
Process information:
Process ID: 8388
Process name: w3wp.exe
Account name: IIS APPPOOL\DefaultAppPool
Exception information:
Exception type: HttpException
Exception message: Request time exceeded.
Request information:
Request URL: http://xxx\mySite.aspx
Request path: \mySite.aspx
User host address: xxx
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\DefaultAppPool
Thread information:
Thread ID: 138
Thread account name: IIS APPPOOL\DefaultAppPool
Is impersonating: False
Stack trace:
Custom event details:
Could it be a Authentication problem?
Try to add the execution permission to the IIS = "APPPOOL\DefaultAppPool" User and now your folder should be able to be created successfully.

Deploying Watson Chat on IIS

So I've created a simple ASP .NET site, where you can send a message to the Watson service and receive the response.
It works locally when I run the application from VS2017, but now I've deployed it to my 2012 R2 Server and it doesn't work.
The application runs, but I'm not able to receive any answer from the Watson service.
What am I missing in the IIS?
This is the SDK, I've been using.
https://github.com/watson-developer-cloud/dotnet-standard-sdk
Here is the only error I can find in the eventvwr.
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 25-04-2019 15:51:35
Event time (UTC): 25-04-2019 13:51:35
Event ID: 8eb66320f2fa412ea0a2cf3f61d5f3b2
Event sequence: 19
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/6/ROOT-6-132006738849963250
Trust level: Full
Application Virtual Path: /
Application Path: xxx
Machine name: OSI4908
Process information:
Process ID: 6844
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: HttpException
Exception message: The remote host closed the connection. The error code is 0x80070057.
at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
at Microsoft.Owin.Host.SystemWeb.CallStreams.OutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.AspNet.SignalR.Owin.ServerResponse.Write(ArraySegment`1 data)
at Microsoft.AspNet.SignalR.Hosting.ResponseExtensions.End(IResponse response, String data)
at Microsoft.Owin.Mapping.MapMiddleware.<Invoke>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

ASP.NET Web API cause exceptions while running on raspberry pi 2 (ARM)

I have coded a Web API in Ubuntu using .NET Core recently and I need to use database to store the application data so that I decided to use EF Core. I ran this project on Ubuntu machine and everything worked appropriately.
I've also tried to run it on my raspberry pi 2 but I wasn't lucky enough to make it work properly. I did the instruction on this website and got this output as soon as I tried to access the api/dooz on Firefox while accessing my RP through Remmina Remote Desktop.
If the problem is with the database, how can I include the .db file to the iDooz_1/bin/Release/netcoreapp2.1/linux-arm/publish folder to make it work?
How can I solve it?
c343#RP:~/publish_idooz1$ ./iDooz_1
Hosting environment: Production
Content root path: /home/c343/publish_idooz1
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HLFUSJJ3S54N", Request id "0HLFUSJJ3S54N:00000001": An unhandled exception was thrown by the application.
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: Players'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReader(CommandBehavior behavior)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer)
at Microsoft.EntityFrameworkCore.Storage.Internal.NoopExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.GetResult[TResult](IEnumerable`1 valueBuffers, Boolean throwOnNullResult)
at lambda_method(Closure )
at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ResultEnumerable`1.GetEnumerator()
at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass15_1`1.<CompileQueryCore>b__0(QueryContext qc)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
at System.Linq.Queryable.Count[TSource](IQueryable`1 source)
at iDooz.Controllers.DoozController..ctor() in /home/c343/Documents/iDooz_1/Controllers/DoozController.cs:line 24
at lambda_method(Closure , IServiceProvider , Object[] )
at Microsoft.AspNetCore.Mvc.Controllers.ControllerActivatorProvider.<>c__DisplayClass4_0.<CreateActivator>b__0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
^CApplication is shutting down...
However, api/values, the default API in the webapi application worked properly and I got the correct output as in I got earlier on Ubuntu.
NOTE: First, this project is generally made to build a Tic Toc Toe and to learn about REstful APIs using ASP.NET Core Web API. So, I made a database using Entity Framework called Dooz.db and that is in the main directory of the project. Second, I'm doing dotnet publish -c Release -r linux-arm because the .NET Core SDK is not available for ARM-Processors.
Third, this is the part of the code in which the terminal had output an error
at System.Linq.Queryable.Count[TSource](IQueryable`1 source)
at iDooz.Controllers.DoozController..ctor() in /home/c343/Documents/iDooz_1/Controllers/DoozController.cs:line 24
Here is the code:
public class DoozController : ControllerBase
{
public DoozController()
{
if(db.Players.Count() == 0)
{
db.Players.Add(new Player { PlayerID = 1, Username = "Alex123", Password = "1234", ProfilePic = "ProfilePics/Alex123.jpg" });
db.Players.Add(new Player { PlayerID = 2, Username = "Ashkan_007", Password = "12345", ProfilePic = "ProfilePics/Ashkan_007.jpg" });
.
.
.
db.SaveChanges();
}
}
.
.
.
You need to copy the database file into publish folder.

BizTalk error : Unable to process exec message

I've been getting the following error in a production environment. Please refer the error in the bottom. So far I was able to recreate the problem by letting the orchestration suspend by forcing a db timeout in the application db call, and resuming the instance. After repeating the action for 2 rounds on the same instance, third time the instance will get suspended with the error below.
What could be the reason for this behavior?
BizTalk Error
Uncaught exception (see the 'inner exception' below) has suspended an
instance of service '{ORCHESTRATION
NAME}(57adc083-7423-2bff-bd2d-ca813b8c0f4e)'. The service instance
will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state
and may re-throw the same unexpected exception. InstanceId:
1bca1f03-7780-4f45-af2e-020724c8a92d Shape name: ShapeId: Exception
thrown from: segment -1, progress -1 Inner exception: Unable to
process exec message.
Exception type: Exception Source: Microsoft.XLANGs.BizTalk.Engine Target Site: System.Object[]
get_Args() The following is a stack trace that identifies the location
where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.get_Args() at
{ORCHESTRATION NAME}.segment1(StopConditions stopOn) at
Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s,
StopConditions stopCond, Exception& exp)
Stack trace
xlang/s engine event log entry: Failed while delivering a message to a
service instance. Message details follow. Message ID:
61eaa7fc-ac85-42d9-bf3e-1bed258b82be Service Instance ID:
1bca1f03-7780-4f45-af2e-020724c8a92d Service Type ID:
57adc083-7423-2bff-bd2d-ca813b8c0f4e Subscription ID:
00000000-0000-0000-0000-000000000000 Body part name: Service type:
{ORCHESTRATION NAME}, {Assembly Details}
Exception type: BTXMessageDeliveryException The following is a stack
trace that identifies the location where the exception occured
at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._receiveOneMessage(Guid&
instanceId, Guid& serviceId, IBTMessage currentMsg) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.ReceiveMessages(IBTMessage[]
messages, Int32 firstIdx, Int32 count) at
Microsoft.BizTalk.XLANGs.BTXEngine.AppDomains.AppDomainRoot.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object
objMsg)
Additional error information:
Failed while delivering a message to a service instance. Message details follow. Message ID:
61eaa7fc-ac85-42d9-bf3e-1bed258b82be Service Instance ID:
1bca1f03-7780-4f45-af2e-020724c8a92d Service Type ID:
57adc083-7423-2bff-bd2d-ca813b8c0f4e Subscription ID:
00000000-0000-0000-0000-000000000000 Body part name: Service type:
{ORCHESTRATION NAME}, {Assembly Details}
Exception type: BTXMessageDeliveryException Source:
Microsoft.XLANGs.BizTalk.Engine Target Site: Void
DeliverMessage(System.Guid,
Microsoft.BizTalk.Agent.Interop.IBTMessage, Boolean ByRef) The
following is a stack trace that identifies the location where the
exception occured
at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._tryReceiveOneMessage(Boolean&
loggedError, Guid& instanceId, IBTMessage currMsg) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._receiveOneMessage(Guid&
instanceId, Guid& serviceId, IBTMessage currentMsg) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.ReceiveMessages(IBTMessage[]
messages, Int32 firstIdx, Int32 count) at
Microsoft.BizTalk.XLANGs.BTXEngine.AppDomains.AppDomainRoot.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object
objMsg)
Additional error information:
The XLANG/s message has no part at index '0'. The total number of parts found in the message is '0'. If you expect a multipart
message, check that the pipeline supports multipart messages such as
MIME.
Exception type: MissingPartException Source:
Microsoft.XLANGs.BizTalk.Engine Target Site: Void
ReadMessageState(Microsoft.XLANGs.Core.Envelope,
Microsoft.XLANGs.BaseTypes.XLANGMessage) The following is a stack
trace that identifies the location where the exception occured
at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.ReadMessageState(Envelope
env, XLANGMessage msg) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.ArgsFromExecEnvelope(IBTMessage
msg) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.DeliverMessageImpl2(Guid
subscriptionId, IBTMessage msg, Boolean& receiveCompleted) at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.DeliverMessage(Guid
subscriptionId, IBTMessage msg, Boolean& receiveCompleted)
Received this myself. Not sure what you were doing when you started receiving it. For me, I had a working orchestration and then added a correlation set. I use BTDF so simply updated the GAC only with new orchestration when I really should've done a full re-deploy (I know, lazy.).
Anyway, once I did redeploy fully, cycle hosts, and retest it worked fine.
Probably not answer you are looking for but it helped me. Here was my stack trace:
Exception type: BTXMessageDeliveryException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void DeliverMessage(System.Guid, Microsoft.BizTalk.Agent.Interop.IBTMessage, Boolean ByRef)
The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._tryReceiveOneMessage(Boolean& loggedError, Guid& instanceId, IBTMessage currMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._receiveOneMessage(Guid& instanceId, Guid& serviceId, IBTMessage currentMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.ReceiveMessages(IBTMessage[] messages, Int32 firstIdx, Int32 count)
at Microsoft.BizTalk.XLANGs.BTXEngine.AppDomains.AppDomainRoot.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object objMsg)
at Microsoft.XLANGs.BizTalk.CrossProcess.AppDomainStubProxy.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object msgs)
Additional error information:
Index was outside the bounds of the array.

ASP.NET project calling a VB6 Ddll, error REGDB_E_READREGDB

I have a project in aspx with vb.net and this app calls a COM + DLL, and this DLL reads a registry key, in my VB6 app uses this DLL correctly, but adding this DLL's references on my .NET project, i get this error below:
Somebody help me with this error, pls...
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 27/8/2014 11:25:13
Event time (UTC): 27/8/2014 14:25:13
Event ID: c94e2752e983457cb159dc7d9e5f75a1
Event sequence: 7
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/Root/Constito-1-130536231061632161
Trust level: Full
Application Virtual Path: /Constito
Application Path: C:\Constito\
Machine name: SERVER-Constito
Process information:
Process ID: 7116
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: Exception
Exception message:
Unable to cast COM object of type 'System.__ComObject' to interface type 'U_Master.Obj'.
This operation failed because the QueryInterface
call on the COM component for the interface
with IID '{BE0634D8-325E-4A3E-9426-44D52F118BF9}'
failed due to the following error:
Could not read key from registry
(Exception from HRESULT: 0x80040150 (REGDB_E_READREGDB)).
at Constito.Master.Post_DadosVB6(Object obj, String acao, String xmlArg, String p_cd_usuario) in C:\Constito\Master.vb:line 102
at Constito.Principal.Page_Load(Object sender, EventArgs e) in C:\Constito\Principal.aspx.vb:line 30
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint)
Try setting the Application Pool user to an account with local admin privileges on the Web Server.
It looks like a registry permissions issue.
If thats not it ensure that the GUID (BE0634D8-325E-4A3E-9426-44D52F118BF9) exists in the HKEY_CLASSES_ROOT hive.

Resources