Stopping a stuck in “Starting” Sharepoint service

A sharepoint service as defined by Sharepoint 2010 is not your typical “run-of-mill” service.  You can’t simply go to the Windows Service snap-in (commonly referred by sysops as services.msc), and hit Stop or Restart.

You’ll need to fire up the Sharepoint 2010 Management Shell.  You might need to logged into the box as a Farm Administrator.  Run the command:

Get-SPServiceInstance.   Locate the GUID, and then run.

Stop-SPServiceInstance <GUID>

Select ‘Y’ to stop it.  You should be able to refresh the Central Administration > Services on Server dashboard and see the respective service is stopped.

Technorati Tags: ,,

29. July 2010 07:32 by Danny Gershman | Comments (0) | Permalink

Running NetBeans developed Java JAR on OS/X

I ran into some issues yesterday when trying to deploy an application that I developed in NetBeans.  I’m using the forms designer feature of NetBeans 6.9 which utilizes Swing controls.  Its very nice I might add, however I did receive a warning message that Swing will no longer be updated going forward, so I’m going to have to consider doing the next one in the “Application Platform” that is recommended.

There were a couple of things I needed to do to get this application to work on OS/X.  First is to install JDK1.5 Update 14.  Apple has their own version of Java, that they distribute and maintain.  As of this blog post, JRE1.5 R10, is the highest it goes.  So we will need to compile against 1.5 instead of 1.6 that is the default JDK that gets installed with NetBeans 6.9. 

I downloaded JDK1.5 by searching for it on Google.  After installing it, you need to explicitly add it to your Platforms in NetBeans.  See below.

On the NetBeans menubar click Tools, then Java Platforms.  A dialog window will appear. 

image

Click Add Platform… Browse to your Program Files directory on Windows and then Java.  (usually C:\Program Files\Java).  There you should see the JDK1.5 folder.

image

Select it and click Next >.  On the next screen, give it a name and target the source.  You may want the Javadoc too, which you need to download from Sun’s site.

image

Now you’ll be able to compile against JDK1.5.  The next step is to ensure that your compiling against the correct Swing implementation.  In the form designer select one of your forms, as seen below.  Notice the properties window, and the Layout Generation Style property.

image

Make sure that it says Swing Layout Extensions Library and NOT Standard Java 6 Code. 

The final difficulty I had was with reading a text file.  Line delimiter characters vary from platform to platform.  I had hard code to parse on “\r\n”.  A safer way to do this is to use: System.getProperty("line.separator").  A much safer way to code up.

 

Technorati Tags: ,,
21. July 2010 20:46 by Danny Gershman | Comments (0) | Permalink

COM+ subsystem log duplicate suppressing disabling

COM+ will by default disable multiple duplication of log entries.  This it the error message you will receive in the Window Application Event Log

image 

Do the above to enable logs.

Technorati Tags: ,,
18. June 2010 07:40 by Danny Gershman | Comments (0) | Permalink

Simulating POST with Fiddler

Sometimes its useful to simulate POST action on a WebForm or a Webservice in ASP.NET for debugging.  Fortunately Fiddler allows you to compose (construct) such a request.  First thing to do is fire up Fiddler.  Jump to the “Request Builder” tab.

image

From the drop down, select “POST”.  Put the URL you are testing in the textbox.  The other thing to input is in the “Request Headers” field which is to let the receiving page that form data is being passed.  “Content-type: application/x-www-form-urlencoded”

image

The final piece of data is the key value pairs of the data to be passed.  Make sure these values are URL encoded.  Put this in the “Request Body” field.

image 

One setting to change is to ensure that request will be automatically tracked.  Switch to the option tab, as ensure “Inspect Session” is checked.

image

Click “Execute” to fire off the request.  This can be really useful if you need to debug something.  Make sure your ASP.NET development server is running.  In this case mine is running on localhost, port 8080.  Set your breakpoint in Visual Studio and then fire off the request.  Then the breakpoint will catch and you can step through.  This is a great way to test different variations of data POSTs.

Technorati Tags: ,,,,
6. May 2010 07:40 by Danny Gershman | Comments (3) | Permalink

Perfmon Counters for Measuring Bandwidth

Works well, measured in bytes.

image

Technorati Tags: ,,

31. March 2010 18:32 by Danny Gershman | Comments (0) | Permalink

Debug VBScript in EditPlus

See the below screenshot for configuring.

image

Technorati Tags: ,
3. December 2009 11:35 by Danny Gershman | Comments (0) | Permalink

Poison Cookies

I thought I coined the term, but it exists already

http://www.testingreflections.com/node/view/3701

18. September 2009 03:55 by Danny Gershman | Comments (2) | Permalink

Finding PID for IIS Application Pool

This is pretty simple.

Create a batch file, call it app-pool-pid.bat for instance.

Edit it and add the following lines into the file:

@echo off

cscript.exe c:\windows\system32\iisapp.vbs

pause

9. September 2009 05:48 by Danny Gershman | Comments (2) | Permalink

Run ASP.NET Development Server without Visual Studio

Ever want to run ASP.NET development server without having to fire up Visual Studio Debugger.

You can create your own scripts or commands by being able to access this.

%WINDOWS PATH%\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.exe

Here is the command line options as shown without setting any parameters.  Enjoy!

image

5. August 2009 07:11 by Danny Gershman | Comments (3) | Permalink

Hotmail/Live Email Sending Problems

I’ve spent the last day or two trying to resolve why email was not being sent from specific SMTP Server to Hotmail. 

By signing up for Smart Network Data Services, you can very easily see where you pain point is.

Check it out https://postmaster.live.com/snds

Very helpful stuff!

image

5. May 2009 16:13 by Danny Gershman | Comments (0) | Permalink

About dannyg

dannyg has been writing software for the last 12+ years and worked with various languages and programs.  He specializes business process automation, versatile solutions and R&D.