Thursday, July 26, 2012

Redgate ANTS Performance Profiler - Could not start IIS.

I have had this issue a few times and I always forget how to fix it.

Could not start IIS. RedGate.Profiler.Engine.Exceptions.CannotStartSessionException at  . .Launch() at ? . . ? () Caused by: Could not start IIS. RedGate.Profiler.Engine.Exceptions.CannotStartIisSessionException at  . . () at  . .Launch() Caused by: Could not start w3wp as the specified user. Win32 error code: 1385 RedGate.Profiler.Engine.Exceptions.CannotStartIisSessionException stack trace: at ? . ? .?? () at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) 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 . .?? () at  . .?? ( ) at  . . () Caused by: Could not start w3wp as the specified user. Win32 error code: 1385 RedGate.Profiler.Engine.Startup.IIS.IISException stack trace: at . .StartProfilingIIS(String , String ) at RedGate.Profiler.Engine.Startup.IIS.IISStarter`1.StartProfilingIIS(String currentUserName, String subprocessVariableValue) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) 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 RedGate.Profiler.Engine.Startup.IIISActuator`1.StartProfilingIIS(String currentUserName, String subprocessVariableValue) at ? . ? .?? ()
So I need to run my IIS as a network user in order for it to work through SQL Auth etc, the reason it is failing, is because the user isn't an admin user on my box. So go to Administrator Tools -> Groups -> Administrators and add your network user here, check names and it should work!

Monday, July 16, 2012

Solr 3.5 spatial (geofilt) search with distance in results

Took a bit of tinkering around but here's my query.

LatLong is my field in my document with a "latitude,longitude" in it.

d=30. Distance is KMs.


http://solrserver/select?
indent=true&
fl=Name,LatLong,score&
fq={!geofilt pt=50000,-0.11111 sfield=LatLong d=30}&
sfield=LatLong&
pt= 50000,-0.11111&
sort=score asc&
q={!func}geodist()

This gets you all documents near a point (pt) and returns them with the distance stored in the score field.


Friday, July 13, 2012

Android not picking up MP3's

My Android Phone (Nexus one running MIUI) sometimes doesn't find my MP3's, especially after a ROM update.

I loaded up the MP3 using  http://www.mp3tag.de/en/  and I either update it or just save it, it then seems to fix the ID3 tags and then it is picked up on my phone.

You may also need to run an app like  https://play.google.com/store/apps/details?id=com.addz.mediascanner