How to deploy WCF manually to IIS

var SampleName = “WcfDeploy”;

—————————————-
Deploy WCF to IIS 5 manually:
—————————————-
1. Create new folder under wwwroot.
2. Create new folder App_Code underneath folder in step 1..
3. Copy files into first new folder: *.svc, web.config, etc.
4. Copy files into 2nd new (App_Code) folder: *.cs.
5. In IIS:
a. Under Default Website: create new VIrtual Directory.
b. Set name to be SampleName above.
c. Enter path to folder in step 1.
d. Open security (you can tighten security later): allow read, write, browse directory, execute, scripts.
e. Click Finish. Right click on the new node you created( named SampleName above). Click Properties.
f. Enter new default doc (the .svc file above) and move it to the top of the list.
g. In Directory Security tab, allow Anonymous users.
h. Click OK.
i. Right click on the new node you created( named SampleName above). Click Browse. If no errors are displayed, then your deployment was a success.

—————————————-
Deploy WCF to IIS 7 manually:
—————————————-
1. Create new folder.
2. Create new folder App_Code underneath folder in step 1..
3. Copy files into first new folder: *.svc, web.config, etc.
4. Copy files into 2nd new (App_Code) folder: *.cs.
5. In IIS:
a. Under Default Website: create new VIrtual Application.
b. Set the App Pool to the ASP.Net 4.0 Default App Pool.
c. In Authentication, allow Anonymous users.
d. Enter new default doc (the .svc file above) and move it to the top of the list.
e. Enable Directory Browsing.
f. Click Browse. If no errors are displayed, then your deployment was a success.

Expression of type ‘System.Collections.Generic.IEnumerable(Of System.Xml.Linq.XElement)’ is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider

When making enhancements to someone’s VB.Net code, I ran across this compile error when setting up the line “Dim result = From subX In xE.Descendants(“***”) Select subX.Element(“&&&”).Value”

Error: “Expression of type ‘System.Collections.Generic.IEnumerable(Of System.Xml.Linq.XElement)’ is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider”

The fix was to add “Imports System.Linq” even though you already have “Imports System.Xml.Linq” and “Imports System.XML”

WCF web.config errors

A WCF error (Framework 4.0) about bad data in web.config, and error “Error Code 0×80070003″ “Config Error Cannot read configuration file”, can come from physical path to the web.config not matching the virtual directory path setting in IIS 7.

Installing ant on XP

On XP, when checking %PATH%, it is best to close command prompt each time you make a change.

The message “ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.” can also be generated from an unzip that failed to extract everything. I was getting the message because there were no files in my /lib directory. This link pointed out the fix: http://stackoverflow.com/questions/5607664/installing-ant-ant-home-is-set-incorrectly-on-windows-7

WCF: Configured WebHttpBinding but uses BasicHttpBinding instead

Many of the blogs showed this problem to be caused by inaccurate service naming or path.

Not having those problems, I found that changing the protocol mapping in the service’s web.config gave me the wsHttpBinding protocol (the protocolMapping section is under the system.serviceModel section).

If you are not using default endpoints, make sure your bindingConfiguration points to the protocol mapping entry (the endpoints are under system.serviceModel \ services \ service).

How to access battery of an LG Rumor Touch phone

The O/S on my phone locked up last week and none of the hardware on the phone was working. So I decided to remove the battery to restart the O/S. Searches online either gave no details about how to do this, or said that you would break the phone if you tried, or said that it just couldn’t be done. Not taking ‘no’ for an answer, I slowly, carefully, tried it myself and succeeded. It was really quite easy. Here are the steps:
1. Notice that the phone seems to have 3 layers: A. The front of the phone containing the screen, B. The middle of the phone containing the slide-out keyboard, C. The back of the phone which is attached to B. but is made of a different material (a rubber-composite of some type.
2. Turn phone face down, bottom side closer to you, top side farther away.
3. Look at bottom of phone on back, find small triangle underneath “LG”, pointing up. This is verification that everything is in the correct position.
4. With one hand, hold phone at top and bottom of parts A and B, but do not touch part C.
5. With the other hand, push the bottom of part C (the part that slopes away from the very back of the phone, underneath the triangle mentioned in 3 above) toward the top of the phone, in the direction the triangle points. It will only move a few millimeters. There might be a “pop” sound.
6. Pry up gently on the bottom of part C and the back will come off, exposing the battery.

To reassemble the phone, reverse step 6 and then reverse step 5.

.Net calling COM dll thru Interop

The COM dll has to be registered on that machine for the Interop to work. The interop is just a way .Net uses to access the COM dll (through the Registry). During deployment to a different machine, just copying the Interop file to the exe’s folder will not be enough; the COM dll must also be registered.