Wednesday, June 29, 2011

Error for Solicit-response send port using HTTP adapter

Event Type:   Error
Event ID:       5754
Description:
A message sent to adapter "HTTP" on send port "<SendPortName>" with URI "<URL>" is suspended.
Error details: The HTTP send adapter cannot complete the transmission within the specified time.
Cause
This error occurred for Solicit-response send port when the HTTP adapter does not receive the response within the time specified for Request timeout. The default value for Request timeout is 0 and in this condition the BizTalk Messaging Engine calculates the time-out based on the request message size.
Resolution
Set the value of Request timeout for send handler created for HTTP adapter then this change will affect all the send ports. or
You also have the option to set the value of Request timeout for a particular send port in HTTP Transport Properties.

Cheers
Rohit Sharma

Friday, June 24, 2011

Could not load file or assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

When trying to browse my WCF service using .Net Framework 4.0 and hosted in IIS 6.0 I was getting this error in the event viewer.

Event Type:         Error
Event Source:     ASP.NET 4.0.30319.0
Event Category:  None
Event ID:            1325
Description:
Failed to initialize the AppDomain:/LM/W3SVC/1381374284/Root/RetrieveDataService
Exception: System.IO.FileLoadException
Message: Could not load file or assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.
StackTrace:    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(String assemblyName, String typeName)
   at System.AppDomain.CreateInstance(String assemblyName, String typeName)
   at System.AppDomain.InternalCreateInstanceWithNoSecurity(String assemblyName, String typeName)
   at System.AppDomain.InternalCreateInstanceWithNoSecurity(String assemblyName, String typeName)
   at System.Activator.CreateInstance(AppDomain domain, String assemblyName, String typeName)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

Resolution
Because the Application Pool was using the identity NETWORK SERVICE so I had to give the IIS_WPG group (which contains NETWORK SERVICE) read/write access to my web root directory.