Set Offset to not attached div doesn't work correctly in IE

We want to dynamically show an image below a span html element. 
The javascript creates a div element, than assigns new offsets using jQuery offset() and then appends the div to document.
It worked as expected in FireFox, but moved the new element to the bottom of the page in IE.
I found, that if I will call offset after document.body.appendChild, it will assign values correctly.

In the test page below if offset is called  after document.body.appendChild,
new img assigned left: -8, top: 110
img left: -8, top: 110  -expected
If offset is called  before document.body.appendChild,
new img assigned left: -8, top: 110
img left: 0, top: 214   -wrong

The test page OffsetAfterAppend.htm: <!
DOCTYPE html> <html> <head>     <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body>  <p style="height:"100px">Offsets to show</p>  <p id="currentP"> Hello <span id="curr" style="background-color:Green">span to be above the image </span></p>    <p></p>   <script>       var p = $("p:first");        var s = $("span:last");        var currentOffset = s.offset();        p.html("span left: " + currentOffset.left + ", top: " + currentOffset.top);            var currentHeight = 20;         YOffset = 40;       XOffset = -55;       sImageURL = "http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif";                  var divMapContainer = document.createElement('div');         var imgMap = document.createElement('img');         $(imgMap).attr('src', sImageURL);         $(imgMap).attr('alt''');         $(divMapContainer).append($(imgMap));         newLeft = currentOffset.left + XOffset;         newTop = currentOffset.top + currentHeight + YOffset;         p.html(p.html() + "<BR/>new img assigned left: " + newLeft + ", top: " + newTop);         //$(divMapContainer).offset({ top: newTop, left: newLeft });          document.body.appendChild(divMapContainer);          $(divMapContainer).offset({ top: newTop, left: newLeft });          var img = $("img:last"); var imgOffset = img.offset();          p.html(p.html() + "<BR/>img left: " + imgOffset.left + ", top: " + imgOffset.top)   </script> </body> </html>

 

Compiler doesn’t report missing 'Microsoft.Practices.ServiceLocation”

I’ve upgraded Enterprise Library form 4. to 5  and replaced references to the DLLs (in particular we are using EnterpriseLibrary.Logging”)  Compiler  doesn’t report any errors about missing dependencies however at run time I’ve got
Could not load file or assembly 'Microsoft.Practices.ServiceLocation’

I had to add the library explicitly.  
It will be good if the error will be shown during the build.

Related links
http://stackoverflow.com/questions/3992072/where-does-microsoft-practices-servicelocation-come-from

http://entlib.codeplex.com/discussions/221485 “Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Validation' 
 

 

Another application reporte the same error at run-time differentlly:

Microsoft.Practices.ServiceLocation.ActivationException: Activation error occured while trying to get instance of type LogWriter, key "" ---> Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = "Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter", name = "(none)".

Exception occurred while: while resolving.

Exception is: InvalidOperationException - The type LogWriter cannot be constructed. You must configure the container to supply this value.

-----------------------------------------------

At the time of the exception, the container was:



 Resolving Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter,(none)

---> System.InvalidOperationException: The type LogWriter cannot be constructed. You must configure the container to supply this value.

  at Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.GuardTypeIsNonPrimitive(IBuilderContext context, SelectedConstructor selectedConstructor)

  at Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.PreBuildUp(IBuilderContext context)

  at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)

  at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlanCreatorPolicy.CreatePlan(IBuilderContext context, NamedTypeBuildKey buildKey)

  at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)

  at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)

  at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)

  --- End of inner exception stack trace ---

  at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)

  at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, String name, IEnumerable`1 resolverOverrides)

  at Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides)

  at Microsoft.Practices.Unity.UnityServiceLocator.DoGetInstance(Type serviceType, String key)

  at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)

  --- End of inner exception stack trace ---

  at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)

  at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService]()

  at Microsoft.Practices.EnterpriseLibrary.Logging.Logger.get_Writer()

  at Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(LogEntry log)

Changing “Trusted Sites” list affected HttpWebRequest in application running under different account

We have a webscraper ASP.Net application, that worked fine on developers and test environments, but didn’t work on some machines with more strict security settings. HttpWebRequest failed with System.Net.WebException: Unable to connect to the remote server


It start working when my colleague  added the site that application tried to access to his “Trusted Sites” zone using Internet Explorer. What we couldn’t understand, how it affected an application that ran under DIFFERENT account.
I didn’t find any references that Internet explorer security settings are shared between users.
The server affected had Windows 2003 Server and Internet Explorer 8.

«September»
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678