Reinstalling WCF on Windows

http://msdn.microsoft.com/en-us/library/ms732012.aspx

Technorati Tags: ,
03.24.2011 11:58 by Danny Gershman | Comments (0) | Permalink

Reverse Proxying With IIS7

There are some really nice modules to add on to IIS7.  One of the them URL Rewrite.  You can also set up a Reverse Proxying rule.  This basically allows you to re-route any traffic that might be specified in DNS to a different server.  In this particular scenario, the DNS rules couldn’t be changed because they weren’t owned.  However, because there is control over the destination server, I can re-route incoming traffic to a different server.

image

Double-click on URL Rewrite on the website that is accepting the incoming traffic.  Then “Add Rule”.  Select “Reverse Proxy” rule.

image

Now you can specify the new destination for all request.  You can be a little more specific about links with regular expressions if necessary.

image

Now you can test your theory by opening your web browser and pointing to the original domain name.  You can even rewrite links in the response.

Technorati Tags: ,,
03.09.2011 12:29 by Danny Gershman | Comments (0) | Permalink

Troubles installing Windows Live Essentials 2011

I faced some tough issues trying to install Windows Live Essentials.  Even more so it feels good to blog as I haven’t written an entry in over a month.  I have a lot of good stuff coming in the next few days.  I got an error when executing the wlsetup-web.exe available from the live.com site.  You can also use the offline installer which is available here.

So the error I was getting said Bad Image, something along the lines that c:\windows\system32\wer.dll (Windows Error Reporting), had some kind of issue.  This is related to a corrupt DLL. 

I needed to ensure that the “Windows Modules Installer” service was started.  Then I opened up a command prompt as administrator and ran the following cmd.

sfc /scannow

This took a few minutes to run.  Then I was able to launch the installer.  However the installer informed me that I had to uninstaller Windows Live Mesh Beta (2009).  This was rather difficult.  I ran the uninstall several times, but the Live Essentials installer was still complaining that it was installed.  I wound up searching through the entire registry for any key called “Live Mesh” and deleted them.

After this, I was able to successfully install.  A quick reboot and here I am writing this blog entry in Windows Live Writer 2011.

Technorati Tags: ,,

11.21.2010 16:52 by Danny Gershman | Comments (0) | Permalink

Windows 2008 SMTP Logging

Requires that you install the ODBC logging module.  This is done via the server manager.  You need to the “ODBC Logging” Role Service for IIS.

image

Technorati Tags: ,,
09.01.2010 06:31 by Danny Gershman | Comments (0) | Permalink

OData ListData.svc issues on Sharepoint 2010

After deciding that I wanted to query the much reveled OData services offered by Sharepoint 2010 I ran into multiple issues (now which I’ve resolved).

This is the service endpoint

http://<hostname>/_vti_bin/ListData.svc

1) OData services do not work over HTTPS.  I’m assuming this is related to configuration of WCF.  This is a key point to remember. 

2) Installing of the ADO.NET Data Services v1.5 CTP2 on the Sharepoint 2010 Server.  Do an IISRESET or reboot after this.

3) Ensure that there are no corrupt lists on a site.  If there are you’ll be able to hit a specific list but not hit the endpoint.  You’ll keep getting prompted with the NTLM/Keberos login from your web browser and never get logged in.  To remove a corrupted list (mine happened from upgrading from Sharepoint 2007 to Sharepoint 2010 without installing custom list types), run the following command from the Sharepoint Powershell Prompt (thanks to Harold van de Kamp’s blog entry on this one.)

stsadm.exe -o forcedeletelist -url <url>

 

Technorati Tags: ,,,

 

08.18.2010 08:17 by Danny Gershman | Comments (0) | Permalink

Fiddler debugging a non-browser XMLHTTP application

Fiddler is an excellent application for observing and debugging internet traffic.  However I wanted to be able to monitor some non-browser traffic.  In this particular case a piece of VB code.  Here’s how I did it.  I have my simple XMLHTTP request here.

 
Set x = New ServerXMLHTTP60
Call x.Open("GET", "http://www.bing.com/", True)
x.Send()

So essentially I need some way to pass this request to a proxy server.  Fiddler “listens” on localhost port 8888.  Here is the final code with the modification to pass the request through Fiddler.

 
Set x = New ServerXMLHTTP60
Call x.Open("GET", "http://www.bing.com/", True)
Call x.setProxy(2, "127.0.0.1:8888")
x.Send()

You can also redirect all traffic from WinINET to Fiddler to, I thought this was a more granular way to control this.

08.01.2010 05:47 by Danny Gershman | Comments (0) | Permalink

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: ,,

07.29.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: ,,
07.21.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: ,,
06.18.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: ,,,,
05.06.2010 07:40 by Danny Gershman | Comments (3) | Permalink