I'm getting a startup error on a BlobStorage Trigger - function

I'm getting the following error when I create a blob storage triggered function (v2).
The function runtime is unable to start. Microsoft.WindowsAzure.Storage: Requested value 'DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT,PATCH' was not found. System.Private.CoreLib: Requested value 'DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT,PATCH' was not found.
This happens if I create the function in VSTS or if I create it through the Azure portal.
The KUDO logs show the following error:
2019-06-24T13:00:38.588 [Error] A host error has occurred
Microsoft.WindowsAzure.Storage.StorageException : Requested value 'DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT,PATCH' was not found. ---> System.ArgumentException : Requested value 'DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT,PATCH' was not found.
at System.Enum.TryParseEnum(Type enumType,String value,Boolean ignoreCase,EnumResult& parseResult)
at System.Enum.Parse(Type enumType,String value,Boolean ignoreCase)
at Microsoft.WindowsAzure.Storage.Shared.Protocol.ServiceProperties.<>c.<ReadCorsPropertiesFromXml>b__67_0(XElement rule)
at System.Linq.Enumerable.SelectEnumerableIterator.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable source)
at Microsoft.WindowsAzure.Storage.Shared.Protocol.ServiceProperties.ReadCorsPropertiesFromXml(XElement element)
at Microsoft.WindowsAzure.Storage.Shared.Protocol.ServiceProperties.FromServiceXml(XDocument servicePropertiesDocument)
at Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ReadServiceProperties(Stream inputStream)
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient.<>c.<GetServicePropertiesImpl>b__60_2(RESTCommand cmd,HttpResponseMessage resp,OperationContext ctx)
at async Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteAsyncInternal[T](RESTCommand cmd,IRetryPolicy policy,OperationContext operationContext,CancellationToken token)
End of inner exception
at async Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteAsyncInternal[T](RESTCommand cmd,IRetryPolicy policy,OperationContext operationContext,CancellationToken token)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Blobs.Listeners.BlobLogListener.EnableLoggingAsync(CloudBlobClient blobClient,CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\Blobs\Listeners\BlobLogListener.cs : 188
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Blobs.Listeners.BlobLogListener.CreateAsync(CloudBlobClient blobClient,CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\Blobs\Listeners\BlobLogListener.cs : 42
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Blobs.Listeners.PollLogsStrategy.RegisterAsync(CloudBlobContainer container,ITriggerExecutor triggerExecutor,CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\Blobs\Listeners\PollLogsStrategy.cs : 73
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Blobs.Listeners.ScanBlobScanLogHybridPollingStrategy.RegisterAsync(CloudBlobContainer container,ITriggerExecutor triggerExecutor,CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\Blobs\Listeners\ScanBlobScanLogHybridPollingStrategy.cs : 61
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Blobs.Listeners.BlobListenerFactory.RegisterWithSharedBlobListenerAsync(String hostId,SharedBlobListener sharedBlobListener,CloudBlobClient blobClient,CloudQueue hostBlobTriggerQueue,IMessageEnqueuedWatcher messageEnqueuedWatcher,CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\Blobs\Listeners\BlobListenerFactory.cs : 155
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Blobs.Listeners.BlobListenerFactory.CreateAsync(CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Extensions.Storage\Blobs\Listeners\BlobListenerFactory.cs : 93
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexer.ListenerFactory.CreateAsync(CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Indexers\FunctionIndexer.cs : 426
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Listeners.HostListenerFactory.CreateAsync(CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Listeners\HostListenerFactory.cs : 62
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Listeners.ListenerFactoryListener.StartAsyncCore(CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Listeners\ListenerFactoryListener.cs : 45
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Listeners.ShutdownListener.StartAsync(CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Listeners\ShutdownListener.cs : 29
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.JobHost.StartAsyncCore(CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\JobHost.cs : 101
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Script.ScriptHost.StartAsyncCore(CancellationToken cancellationToken) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Host\ScriptHost.cs : 241
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Script.WebHost.WebJobsScriptHostService.StartHostAsync(CancellationToken cancellationToken,Int32 attemptCount,JobHostStartupMode startupMode) at C:\azure-webjobs-sdk-script\src\WebJobs.Script.WebHost\WebJobsScriptHostService.cs : 163
2019-06-24T13:00:38.696 [Information] Stopping JobHost```

As the exception stack explains, it can't parse the 'DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT,PATCH' into a single http method value. The reason why this is happening is due to some discovery process of the azure storage common library. It will fetch an xml server configuration to get the values of your cors rules. While the user interface allows you to select multiple methods, this library can not parse the value and will throw an exception.
A possible workaround could be to select only one method per rule.
I created a git hub issue for this.
Edit1
As remarked in comments only verbs 'GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, MERGE' are known 'PATCH' is not a known verb.
Edit2
The issue will not be solved in version 11 of the storage SDK which is annoying as this version is also used by the Azure function libraries version 4. To get it solved we need to wait till version 5 is available, as it will pick up the version 12 of the storage SDK.

I just removed the CORS policy, and it worked !

Removing CORS header broke forms recognizer.
Turns out this was a bug in the sdk when CORS was enabled - https://github.com/Azure/azure-storage-net/issues/916 .
Updating to the latest functions and storage sdk resolved the issue.

Related

Abp.AbpException: There is no tenant with given id: 2

Got error when start up the template project:
Abp.AbpException:
There is no tenant with given id: 2
I have checked the DB, there is default tenant and users be created. But failed to load Swagger with error:
Fetch errorInternal Server Error http://localhost:21021/swagger/v1/swagger.json.
Checked the txt log and following are the error stack, and I'm confusing where is the tenant id 2 be passed.
ERROR 2019-01-09 14:54:25,221 [7 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HLJLVT04BST8", Request id "0HLJLVT04BST8:00000003": An unhandled exception was thrown by the application.
Abp.AbpException: There is no tenant with given id: 2
at Abp.MultiTenancy.TenantCache2.Get(Int32 tenantId) in D:\Github\aspnetboilerplate\src\Abp.Zero.Common\MultiTenancy\TenantCache.cs:line 35
at Castle.Proxies.Invocations.TenantCache2_Get.InvokeMethodOnTarget()
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.TenantCache2Proxy.Get(Int32 tenantId)
at Abp.Zero.EntityFrameworkCore.DbPerTenantConnectionStringResolver.GetNameOrConnectionString(DbPerTenantConnectionStringResolveArgs args) in D:\Github\aspnetboilerplate\src\Abp.ZeroCore.EntityFrameworkCore\Zero\EntityFrameworkCore\DbPerTenantConnectionStringResolver.cs:line 50
at Abp.Zero.EntityFrameworkCore.DbPerTenantConnectionStringResolver.GetNameOrConnectionString(ConnectionStringResolveArgs args) in D:\Github\aspnetboilerplate\src\Abp.ZeroCore.EntityFrameworkCore\Zero\EntityFrameworkCore\DbPerTenantConnectionStringResolver.cs:line 45
at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.GetOrCreateDbContext[TDbContext](Nullable1 multiTenancySide, String name) in D:\Github\aspnetboilerplate\src\Abp.EntityFrameworkCore\EntityFrameworkCore\Uow\EfCoreUnitOfWork.cs:line 107
at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase3.get_Table() in D:\Github\aspnetboilerplate\src\Abp.EntityFrameworkCore\EntityFrameworkCore\Repositories\EfCoreRepositoryBaseOfTEntityAndTPrimaryKey.cs:line 39
at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase3.GetAllIncluding(Expression1[] propertySelectors) in D:\Github\aspnetboilerplate\src\Abp.EntityFrameworkCore\EntityFrameworkCore\Repositories\EfCoreRepositoryBaseOfTEntityAndTPrimaryKey.cs:line 88
at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase3.GetAllListAsync(Expression1 predicate) in D:\Github\aspnetboilerplate\src\Abp.EntityFrameworkCore\EntityFrameworkCore\Repositories\EfCoreRepositoryBaseOfTEntityAndTPrimaryKey.cs:line 108
at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinallyAndGetResult[T](Task1 actualReturnValue, Func1 postAction, Action1 finalAction)
at Abp.Configuration.SettingStore.GetAllListAsync(Nullable1 tenantId, Nullable1 userId) in D:\Github\aspnetboilerplate\src\Abp.Zero.Common\Configuration\SettingStore.cs:line 40
at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinallyAndGetResult[T](Task1 actualReturnValue, Func1 postAction, Action1 finalAction)
at Abp.Configuration.SettingManager.<>c__DisplayClass40_0.<<GetUserSettingsFromCache>b__0>d.MoveNext() in D:\Github\aspnetboilerplate\src\Abp\Configuration\SettingManager.cs:line 436
--- End of stack trace from previous location where exception was thrown ---
at Abp.Runtime.Caching.CacheExtensions.<>c__DisplayClass9_02.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Abp.Runtime.Caching.CacheBase.GetAsync(String key, Func2 factory) in D:\Github\aspnetboilerplate\src\Abp\Runtime\Caching\CacheBase.cs:line 182
at Abp.Runtime.Caching.CacheExtensions.GetAsync[TKey,TValue](ICache cache, TKey key, Func2 factory) in D:\Github\aspnetboilerplate\src\Abp\Runtime\Caching\CacheExtensions.cs:line 60
at Abp.Configuration.SettingManager.GetUserSettingsFromCache(UserIdentifier user) in D:\Github\aspnetboilerplate\src\Abp\Configuration\SettingManager.cs:line 430
at Abp.Configuration.SettingManager.GetReadOnlyUserSettings(UserIdentifier user) in D:\Github\aspnetboilerplate\src\Abp\Configuration\SettingManager.cs:line 403
at Abp.Configuration.SettingManager.GetSettingValueForUserOrNullAsync(UserIdentifier user, String name) in D:\Github\aspnetboilerplate\src\Abp\Configuration\SettingManager.cs:line 373
at Abp.Configuration.SettingManager.GetSettingValueInternalAsync(String name, Nullable1 tenantId, Nullable1 userId, Boolean fallbackToDefault) in D:\Github\aspnetboilerplate\src\Abp\Configuration\SettingManager.cs:line 235
at Abp.AspNetCore.Localization.AbpUserRequestCultureProvider.DetermineProviderCultureResult(HttpContext httpContext) in D:\Github\aspnetboilerplate\src\Abp.AspNetCore\AspNetCore\Localization\AbpUserRequestCultureProvider.cs:line 29
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)
at Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.Invoke(HttpContext httpContext) in D:\Github\aspnetboilerplate\src\Abp.AspNetCore\AspNetCore\Security\AbpSecurityHeadersMiddleware.cs:line 26
at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
INFO 2019-01-09 14:54:25,227 [7 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 182.7895ms 500
It is browser Swagger cache issue which I authorized swagger yesterday.
It is good ater clear the browser cache. thats why there is a tenant id 2.

Connection error on UserManager CreateAsync

I am getting the following error when trying to create a new user using the UserManager CreateAsync method. I am using an unmodified IdentityUser and IdentityRole. I have a few DBSets which populate with data from the database, so reading is not an issue, just writing to it seems to be.
{System.InvalidOperationException: Connection must be valid and open to commit transaction at MySql.Data.MySqlClient.MySqlTransaction.Commit()
at Microsoft.EntityFrameworkCore.Storage.RelationalTransaction.Commit()
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.<ExecuteAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<SaveChangesAsync>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<SaveChangesAsync>d__52.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.EntityFrameworkCore.DbContext.<SaveChangesAsync>d__35.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore`9.<CreateAsync>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Identity.UserManager`1.<CreateAsync>d__68.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Identity.UserManager`1.<CreateAsync>d__73.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Controllers.Auth.AuthController.<Register>d__9.MoveNext() in AuthController.cs:line 102}
I'm using;
MySQL Entity Framework Core 7.0.7-m61
Visual Studio 2017
ASP.NET Core MVC 1.1.0
Identity 1.1
Line 102 mentioned in the error is var result = await userManager.CreateAsync(newUser, model.Password);
[HttpPost]
public async Task<ActionResult>Register(RegisterViewModel model)
{
try
{
if (ModelState.IsValid)
{
var newUser = new IdentityUser
{
Email = model.Email,
UserName = model.Username
};
var result = await _userManager.CreateAsync(newUser, model.Password);
if (result.Succeeded)
{
await _signInManager.SignInAsync(newUser, false);
_logger.LogInformation($"New user account created: {model.Username}");
return RedirectToAction("Index", "App");
}
_logger.LogError($"Registration failed for {model.Username}: ", result.Errors);
return View(model);
}
return View(model);
}
catch (Exception ex)
{
_logger.LogError("Database Failure: ", ex);
return View(model);
}
}
I'm learning asp.net and am stumbling here on what I'm hoping is an obvious error as it seems to be a basic connection issue but it's not making sense as the database can be queried using IdentityDBContext but not through the UserManager, which in my understanding uses the IdentityDBContext connection.
Do not use MySql.Data.EntityFrameworkCore-7.0.7-m61 provider and use something else. Oracle manages to embarrass themselves with each pre-release version of it.
With this release they managed to brake the package so hard, that it's unusable as that provider seems to close it's connection after every query. Use Pomelo.EntityFrameworkCore.MySql 1.1.0 instead (or wait for the next release of Oracles provider). Oracle was never strong at supporting ADO.NET/EF with current provider versions
Even better, use PostgreSQL or SqlServer instead.

Why do we get "An unexpected error occurred in Report Processing" in SSRS 2008?

We often see this kind of errors in SSRS log file. This seems like internal error happening inside SSRS engine. How can we debug this ? We are not getting any other relevant information when report fails.
library!ReportServer_0-1!2864!09/09/2016-00:28:15:: w WARN:
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
An unexpected error occurred in Report Processing. --->
System.Threading.ThreadAbortException: Thread was being aborted. at
Microsoft.Win32.Win32Native.SetFilePointerWin32(SafeFileHandle handle,
Int32 lo, Int32* hi, Int32 origin) at
Microsoft.Win32.Win32Native.SetFilePointer(SafeFileHandle handle,
Int64 offset, SeekOrigin origin, Int32& hr) at
System.IO.FileStream.SeekCore(Int64 offset, SeekOrigin origin) at
System.IO.FileStream.Seek(Int64 offset, SeekOrigin origin) at
Microsoft.ReportingServices.Library.PartitionFileStream.Seek(Int64
offset, SeekOrigin origin) at
Microsoft.ReportingServices.Library.MemoryUntilThresholdStream.Seek(Int64
offset, SeekOrigin origin) at
Microsoft.ReportingServices.Library.RSStream.Seek(Int64 offset,
SeekOrigin origin) at System.IO.BufferedStream.Seek(Int64 offset,
SeekOrigin origin) at
Microsoft.ReportingServices.Rendering.RPLProcessing.RPLReader.ReadElementProps(Int64
startOffset, RPLContext context, Byte& elementType) at
Microsoft.ReportingServices.Rendering.ExcelRenderer.Layout.LayoutEngine.RenderNewItem(IRowItemStruct
item, Int32 top, Int32 topRow, IExcelGenerator excel, String
pageContentKey, Dictionary2 sharedBorderCache, Dictionary2
sharedImageCache, Boolean& autosizableGrow, Boolean&
autosizableShrink) at
Microsoft.ReportingServices.Rendering.ExcelRenderer.Layout.LayoutEngine.RenderPageToExcel(IExcelGenerator
excel, String key, Dictionary2 sharedBorderCache, Dictionary2
sharedImageCache) at
Microsoft.ReportingServices.Rendering.ExcelRenderer.MainEngine.RenderRPLPage(RPLReport
report, Boolean headerInBody, Boolean suppressOutlines) at
Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report
report, NameValueCollection reportServerParameters,
NameValueCollection deviceInfo, NameValueCollection
clientCapabilities, Hashtable& renderProperties,
CreateAndRegisterStream createAndRegisterStream) at
Microsoft.ReportingServices.ReportProcessing.Execution.RenderReport.InvokeRenderer(IRenderingExtension
renderer, Report report, NameValueCollection reportServerParameters,
NameValueCollection deviceInfo, NameValueCollection
clientCapabilities, Hashtable& renderProperties,
CreateAndRegisterStream createAndRegisterStream) at
Microsoft.ReportingServices.ReportProcessing.Execution.RenderReport.Execute(IRenderingExtension
newRenderer) --- End of inner exception stack trace --- at
Microsoft.ReportingServices.ReportProcessing.Execution.RenderReport.Execute(IRenderingExtension
newRenderer) at
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(DateTime
executionTimeStamp, ProcessingContext pc, RenderingContext rc,
IChunkFactory yukonCompiledDefinition) at
Microsoft.ReportingServices.Library.RenderLive.CallProcessingAndRendering(ProcessingContext
pc, RenderingContext rc, OnDemandProcessingResult& result) at
Microsoft.ReportingService
webserver!ReportServer_0-1!2864!09/09/2016-00:28:16:: e ERROR:
Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.UnhandledHttpApplicationException:
,
Microsoft.ReportingServices.Diagnostics.Utilities.UnhandledHttpApplicationException:
The report server encountered an unhandled exception in
HttpApplication. ---> System.Web.HttpException: Request timed out.
--- End of inner exception stack trace ---;
--------- UPDATE ----------
I see new error in log as
library!WindowsService_0!e88!09/09/2016-17:09:45:: e ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException:
, An error occurred within the report server database. This may be
due to a connection failure, timeout or low disk condition within the
database.; dbcleanup!WindowsService_0!e88!09/09/2016-17:09:45:: e
ERROR: Error in CleanOrphanedSnapshots:
Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException:
An error occurred within the report server database. This may be due
to a connection failure, timeout or low disk condition within the
database. ---> System.Data.SqlClient.SqlException: Timeout expired.
The timeout period elapsed prior to completion of the operation or the
server is not responding.
library!WindowsService_0!e88!09/09/2016-17:09:45:: i INFO: Cleaned 0
batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0
chunks, 4 running jobs, 0 persisted streams, 0 segments, 0 segment
mappings, 0 edit sessions.
--------- UPDATE ----------
After updating all the timeout to 12hr and Put DO NOT TIMEOUT setting on SSRS site setting, we see diff error now.
So far we have checked execution log and it shows no error. Below error is found inside ssrs log file. Server has 32gb memory and we run on 64bit OS. This report sometimes is generated fine and its 200MB in size.
httpruntime!ReportServer_0-2!58dc!09/12/2016-23:26:45:: e ERROR:
Failed in BaseWorkerRequest::SendHttpResponse(bool),
exception=System.Runtime.InteropServices.COMException (0x800703E3):
The I/O operation has been aborted because of either a thread exit or
an application request. (Exception from HRESULT: 0x800703E3) at
Microsoft.ReportingServices.HostingInterfaces.IRsHttpPipeline.SendResponse(Void*
response, Boolean finalWrite, Boolean closeConn) at
ReportingServicesHttpRuntime.BaseWorkerRequest.SendHttpResponse(Boolean
finalFlush) library!ReportServer_0-2!58dc!09/12/2016-23:26:45:: e
ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException:
RsWorkerRequest::FlushResponse.,
Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException:
An internal or system error occurred in the HTTP Runtime object for
application domain ReportServer_REPCENTER_0-2-131182052998828671.
---> System.Runtime.InteropServices.COMException (0x800703E3): The I/O operation has been aborted because of either a thread exit or an
application request. (Exception from HRESULT: 0x800703E3) at
ReportingServicesHttpRuntime.BaseWorkerRequest.SendHttpResponse(Boolean
finalFlush) at
ReportingServicesHttpRuntime.RsWorkerRequest.FlushResponse(Boolean
finalFlush) --- End of inner exception stack trace ---;
Finally we have answer to this. Its the recyletime element inside "rsreportserver.config" file. By default this element value is set to 720 min (12 hr). This means from the time you start the SSRS service, it will recycle every 12 hr. Our service was started during mid night release this means it kept recycling everyday at noon. We have since update this value to 24 hr.
<RecycleTime>1440</RecycleTime>
<MaxAppDomainUnloadTime>60</MaxAppDomainUnloadTime>

Cannot catch wcf service exception in biztalk orchestration

I'm trying to put exception handling into my working orchestration and cannot get the exception caught. It keeps suspending the message instead of executing my exception block to handle it more gracefully.
Any suggestions?
Here are the event log messages I'm getting:
A message sent to adapter "WCF-Custom" on send port "InsertOracleMasterPort" with URI "oracledb://svd0odbd01:1529/ebsdev/Dedicated" is suspended.
Error details: Microsoft.ServiceModel.Channels.Common.ConnectionException: ORA-1017: invalid username/password; logon denied ---> Oracle.DataAccess.Client.OracleException: ORA-1017: invalid username/password; logon denied
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
at Oracle.DataAccess.Client.OracleConnection.Open()
at Microsoft.Adapters.OracleCommon.OracleCommonConnectionWrapper..ctor(String connectionString, OracleCommonExecutionHelper executionHelper)
at Microsoft.Adapters.OracleDB.OracleDBConnection.Microsoft.ServiceModel.Channels.Common.IConnection.Open(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at Microsoft.Adapters.OracleDB.OracleDBConnection.Microsoft.ServiceModel.Channels.Common.IConnection.Open(TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnection(Guid clientId, TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnectionHandler[TConnectionHandler](Guid clientId, TimeSpan timeout, MetadataLookup metadataLookup, String& connectionId)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open()
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.ICommunicationObject.Open()
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1& cachedFactory)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)
MessageId: {1CC95FB3-E543-4011-9BDD-EABB50B75BC2}
InstanceID: {EF352982-D16C-421E-806C-58E432049951}
Second message:
xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'Orchestrations.OracleInvoice(868ee765-7874-ec30-0cc7-f81ae5ebfb2b)'.
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: 7eefaf7e-0e9c-4ee6-be6e-7030ece2058b
Shape name:
ShapeId:
Exception thrown from: segment -1, progress -1
Inner exception: An error occurred while processing the message, refer to the details section for more information
Message ID: {1CC95FB3-E543-4011-9BDD-EABB50B75BC2}
Instance ID: {EF352982-D16C-421E-806C-58E432049951}
Error Description: Microsoft.ServiceModel.Channels.Common.ConnectionException: ORA-1017: invalid username/password; logon denied ---> Oracle.DataAccess.Client.OracleException: ORA-1017: invalid username/password; logon denied
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
at Oracle.DataAccess.Client.OracleConnection.Open()
at Microsoft.Adapters.OracleCommon.OracleCommonConnectionWrapper..ctor(String connectionString, OracleCommonExecutionHelper executionHelper)
at Microsoft.Adapters.OracleDB.OracleDBConnection.Microsoft.ServiceModel.Channels.Common.IConnection.Open(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at Microsoft.Adapters.OracleDB.OracleDBConnection.Microsoft.ServiceModel.Channels.Common.IConnection.Open(TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnection(Guid clientId, TimeSpan timeout)
at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnectionHandler[TConnectionHandler](Guid clientId, TimeSpan timeout, MetadataLookup metadataLookup, String& connectionId)
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open()
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.ICommunicationObject.Open()
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1& cachedFactory)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)
Exception type: XlangSoapException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void VerifyTransport(Microsoft.XLANGs.Core.Envelope, Int32, Microsoft.XLANGs.Core.Context)
The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.VerifyTransport(Envelope env, Int32 operationId, Context ctx)
at Microsoft.XLANGs.Core.Subscription.Receive(Segment s, Context ctx, Envelope& env, Boolean topOnly)
at Microsoft.XLANGs.Core.PortBase.GetMessageId(Subscription subscription, Segment currentSegment, Context cxt, Envelope& env, CachedObject location)
at Orchestrations.OracleInvoice.segment2(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Here's the orchestration:
The catch blocks use these types of error objects:
System.Web.Services.Protocols.SoapException
Microsoft.XLANGs.Core.XlangSoapException
Microsoft.XLANGs.BaseTypes.XLANGsException
General Exception
System.Exception
I thought the exception handling would bubble up and be caught in the system.exception or general handlers but that doesn't happen.
based on those posts it look like you need to create and catch wcf fault exeption
example 1
example 2

Downloading a file from http location, I get the following error

Scenario
Downloading an xlsx file to my local drive from a http location using a execute script task .
ERROR
Error: 0x1 at Script Task: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.WebClient.DownloadFile(Uri address, String fileName)
at ST_3926c89e45574d05b1869761d015ffc0.csproj.ScriptMain.Main()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
Task failed: Script Task
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "Package.dtsx" finished: Failure.
Based on the code provided in your previous (and open) question I presume you would need to set the Credentials property on the HttpWebRequest. Without knowing the specifics of your credential situation, I cannot say whether the DefaultCredentials will work or whether you will need to provide a user & password.
wr.Credentials = System.Net.CredentialCache.DefaultCredentials;