Friday, August 7, 2009

Compacting an Exchange 2003 database

I'm compacting a 100GB exchange server this weekend and wanted to get a good set of working instructions down so it runs as planned. Here's what I wound up with. I'm practicing with the public folder store, and here are some directories where things are stored:

Exchange Database: d:\exchange
Working Folder (drive with lots of space): g:\exchange
Exchange System: c:\program files\exchsrvr

1. Go to Exchange System Manager
2. Dismount the Store to be compacted.
3. Copy the database files (.stm and .edb) to the working folder (g:\exchange)
4. Go to a command prompt
5. Go to the Exchange Server BIN directory ("cd C:\Program Files\Exchsrvr\bin")
6. Go to the working drive and directory ("G:" & "cd \exchange")
7. Run eseutil on the files in the working folder (c:eseutil /d g:\exchange\pub.edb)
7a. To leave the uncompacted database "untouched," add /p to the end
8. Rename the original files back on the c drive, or remove them if you need the space (recommend having a copy of the untouched files SOMEWHERE though)
9. Move the compacted files to the same places as the originals on c drive.
10. Mount the store to make sure it mounts ok.
11. Remove all uncompacted files, or leave them for safekeeping.

Wednesday, July 1, 2009

Configuring RPC/HTTP on Exchange Server 2003

I thought I'd scoured the internet last Friday to figure out how to set up Exchange
Server 2003 for RPC over HTTP, but alas, everything I read fell short of
this great article
. I didn't even have RPC over HTTP INSTALLED on the server,
and there were also some registry settings that had to be put in. Everything I read
was about SSL's and Basic Authentication, but there was so much more!
This
is a great article / reference / walkthrough...


RPC over HTTP/S is a cool method for connecting your Outlook 2003 client to the
corporate Exchange Server 2003 from the Internet or WAN, without the need to establish
a VPN session to the corporate LAN and/or needing to open many ports on your corporate
firewall. The only ports you'll need to open on your firewall are TCP 80 and, if
using SSL, TCP 443.




Note: This procedure is not required on SBS and that SBS fully

configures Exchange for RPC over HTTPS and also provides instructions to connect
an Outlook client on the 'Configure Outlook over the internet' link on RWW https://sbs/remote.

Note: While RPC over HTTP does not require SSL, you must modifythe registry to enable RPC over HTTP if you do not want to use SSL. This is why

I've used the term "RPC over HTTP/S" in this set of articles.



Basically, there are 2 configurations possible when configuring RPC over HTTP/S:



  • Multiple servers - In this scenario, you have multiple servers
    in your organization. These servers are configured to function as Domain Controllers,
    Global Catalog servers, Exchange front-end servers, Exchange back-end servers, and
    RPC proxy servers. See
    Exchange Server 2003 RPC over HTTP Deployment Scenarios
  • Single server -
    In this scenario, you have only one server that is configured to function as a Domain
    Controller, a Global Catalog, an Exchange computer, and an RPC proxy server. This
    article discusses the single-server configuration in detail.


MS KB 833401
has more info, but as always, I've written an article in order to make the configuration
process easier, as the original KB tends to be too technical.



Outline



When configuring RPC over HTTP/S, you must follow these steps:



  1. Verify that your server computer and your client computer meet the requirements
    to use RPC over HTTP/S.
  2. Configure Exchange to use RPC over HTTP/S.
  3. Configure
    the RPC virtual directory in Internet Information Services.
  4. Configure the RPC
    proxy server to use specific ports.
  5. Configure your client computers to use RPC
    over HTTP/S (see
    Configure Outlook 2003 to use RPC over HTTP/S
    for more information).


Requirements to use RPC over HTTP/S



To use RPC over HTTP/S, your computers must meet the following requirements.



Server requirements



RPC over HTTP/S requires Windows Server 2003 and Exchange Server 2003. RPC over
HTTP/S also requires Windows Server 2003 in a Global Catalog role.



Client requirements



  • The client computer must be running Microsoft Windows XP Professional Service Pack
    1 (SP1) or later.


If you're running SP1, you must install the following update package:



Outlook 2003 Performs Slowly or
Stops Responding When Connected to Exchange Server 2003 Through HTTP - 331320



If you have installed Windows XP SP2, you do NOT have to install the update package.
You can also run Windows Server 2003 as the client operating system.



  • The client computer must be running Microsoft Office Outlook 2003.


Recommendations



Here are some of Microsoft's (and my) recommendations when using Exchange with RPC
over HTTP:



  • Use basic authentication over Secure Sockets Layer (SSL) - You should enable and
    require the use of SSL on the RPC proxy server for all client-to-server communications.

  • Use an advanced firewall server on the perimeter network - A dedicated firewall
    server is recommended to help enhance the security of your Exchange computer. Microsoft
    Internet Security and Acceleration (ISA) Server 2000 is an example of a dedicated
    firewall server product.
  • Obtain a certificate from a third-party certification
    authority (CA) - When using the Basic Authentication you MUST use an SSL-based
    connection, and you will have to configure a Digital Certificate for your Default
    Website. Read
    Configure SSL on Your Website with IIS
    for more on this issue.A Digital
    Certificate needs to be obtained from a CA (Certification Authority), either a 3rd-party
    commercial CA such as Verisign, Thawte and others, or from an internal CA.Windows
    2000/2003 has a built-in CA that can be installed and used, however, when issuing
    a Digital Certificate from your internal CA you MUST be 100% sure that the client
    computers that are going to connect to the server are properly configured to trust
    this CA.Most operating systems are pre-configured to trust known 3rd-party CAs such
    as Verisign, Thawte and others. However unless these computers are made members
    of the Active Directory domain where you've
    installed your CA, they will NOT automatically trust your internal CA, and thus
    your connection will fail! In these scenarios, when a user tries to connect by using
    RPC over HTTP/S, that user loses the connection to Exchange and is NOT notified.In
    such scenarios you must import the ROOT CA Digital Certificate into the client computers
    in order to make them trust your CA.When using 3rd-party trusted CAs, in most cases
    you won't be required to import anything to the client computers, however you will
    be required to pay a few hundred dollars for such a Digital Certificate.


Additionally, if you use your own certification authority, when you issue a certificate
to your RPC proxy server, you must make sure that the Common Name field or the Issued
to field on that certificate contains the same name as the URL of the RPC proxy
server that is available on the Internet.



Configure the Exchange computer to use RPC over HTTP/S



The RPC proxy server processes the Outlook 2003 RPC requests that arrive from the
Internet. To successfully process RPC over HTTP requests, you must install the Windows
Server 2003 RPC over HTTP Proxy networking component on your Exchange computer.


Note: The RPC Proxy component does not have to be installed on
the Exchange server. It can in fact be installed on a totally different server.
In this article we'll ignore these possibilities
and concentrate on the single server scenario.


To install this component, follow these steps:



  1. On the Exchange Server 2003 computer that is running Windows Server 2003, click
    Start, point to Control Panel, and then click Add or Remove Programs.
  2. Click
    Add Remove Windows Components, click Networking Services, and then click Details.

  3. Click to select the RPC over HTTP Proxy check box, click OK, and then click Next.
    Note that you must have either the Windows Server 2003 installation CD ready, or
    the i386 folder from that CD accessible while installing this component.





  1. When Windows Component Wizard has completed configuring components, click Finish.


Configure the RPC virtual directory in Internet Information Services



After you configure the Exchange computer to use RPC over HTTP/S, you must configure
the RPC virtual directory in Internet Information Services (IIS).



To do this, follow these steps:



  1. Click Start, point to Administrative Tools, and then click Internet Information
    Services (IIS) Manager
    .
  2. Expand servername (local computer), expand Web
    Sites, expand Default Web Site, right-click Rpc, and then click
    Properties.





Note: Windows Server 2003 Service Pack 1 (SP1) adds a new virtual
directory called RpcWithCert. This virtual directory points to the same
location as the Rpc virtual directory. You do NOT need to modify this virtual
directory.



  1. Click the Directory Security tab, and then click Edit under
    Authentication and access control
    .





  1. Click to clear the Enable anonymous access check box.
  2. Click to select the
    Basic authentication (password is sent in clear text) check box.





You receive the following message:



The authentication option you have selected results in passwords being transmitted
over the network without data encryption. Someone attempting to compromise your
system security could use a protocol analyzer to examine user passwords during the
authentication process. For more detail on user authentication, consult the online
help. This warning does not apply to HTTPS(orSSL) connections. Are you sure you
want to continue?






Click Yes



  1. I recommend entering the domain name in the Default Domain box (you can
    press Select to browse to the domain name).
  2. Click OK.

  3. Click Apply, and then click OK.


The RPC virtual directory is now configured to use basic authentication. As stated
in the Recommendations section of this article, you must configure SSL on your RPC
Proxy server (i.e. on your single server). To enable SSL on the RPC virtual directory
you must obtain and publish a certificate. Follow the guidelines on the
Configure SSL on Your Website with IIS
article for more info on this issue
(This procedure assumes that you have obtained and published certificate).



After setting up a Digital Certificate for the Default Website you will need to
configure the RPC virtual directory to require SSL for all client-side connections.



To configure the RPC virtual directory to require SSL for all client-side connections,
follow these steps:



  1. In Internet Information Services (IIS) Manager expand Web Sites, expand
    Default Web Site, right-click Rpc, and then click Properties.

  2. Click the Directory Security tab, and then click Edit under Secure
    communications.





  1. Click to select the Require secure channel (SSL) check box and the
    Require 128-bit encryption
    check box.





  1. Click OK, click Apply, and then click Ok.


Configure the RPC proxy server to use specific ports



After you configure the RPC over HTTP networking component for Internet Information
Services, configure the RPC proxy server. Configure the RPC proxy server to use
specific ports to communicate with the directory service and with the information
store on the Exchange computer.













Warning!

This document contains instructions for editing the registry. If you make any error
while editing the registry, you can potentially cause Windows to fail or be unable
to boot, requiring you to reinstall Windows. Edit the registry at your own risk.
Always back up the registry before making any changes. If you do not feel comfortable
editing the registry, do not attempt these instructions. Instead, seek the help
of a trained computer specialist.



Tip: Instead of manually editing the registry, reader Harry
Bates
has most cleverly designed a small utility that will allow you
to perform all these changes by pressing a couple of buttons. The tool is called
RPCNoFrontEnd (19kb).






Run the tool on your Exchange server, input the server's names and you're done!
Thanks Harry!



If you've used the above tool you no longer need to perform any manual registry
changes and you can safely skip the rest of this guide till the
Global Catalog configuration
section below.



However, if you're still interested to know what's going on for your information,
here are the required changes and information:



No action required - for your information only!



When you run Exchange Server 2003 Setup, Exchange is configured to use the ports
in the following table:


























Server

Port

Service

Exchange Server (Global Catalog)

6001

Store


6002

DSReferral

6004

DSProxy



The three registry values that follow are automatically configured by Exchange Server
2003 Setup. Although you do not have to configure these registry values, you might
want to verify that these registry values are configured correctly.





HKEY_LOCAL_MACHINE
\System\CurrentControlSet\Services\="__mozilla-findbar-search" style="padding: 0pt;
background-color: yellow; color: black; display: inline; font-size: inherit;">
MSExchangeIS\ParametersSystem
Value name: Rpc/HTTP Port
Value type: REG_DWORD
Value data: 0x1771 (Decimal 6001)






HKEY_LOCAL_MACHINE
\System\CurrentControlSet\="__mozilla-findbar-search" style="padding: 0pt;
background-color: yellow; color: black; display: inline; font-size: inherit;">
Services\MSExchangeSA\Parameters
Value name: HTTP Port
Value type: REG_DWORD
Value data: 0x1772 (Decimal 6002)






HKEY_LOCAL_MACHINE
\System\CurrentControlSet\Services\MSExchangeSA\Parameters
Value name: Rpc/HTTP NSPI Port
Value type: REG_DWORD
Value data: 0x1774 (Decimal 6004)




Do NOT modify these registry values. Just make sure they exist.
Action required - configure the RPC proxy server to use specific ports



To configure the RPC proxy server to use specific ports, follow these steps.



  1. On the RPC proxy server (i.e. your Exchange server - this is a single server scenario),
    start Registry Editor.
  2. Locate and then click the following registry subkey:



HKEY_LOCAL_MACHINE
=
"__mozilla-findbar-search" style="padding: 0pt; background-color: yellow; color: black; display:
inline; font-size: inherit;">\
SOFTWARE\Microsoft\Rpc\RpcProxy




  1. In the right pane, right-click ValidPorts, and then click Modify.


Note: The default value for the ValidPorts key is:


ServerNETBIOSName:100-5000


Where ServerNetBIOSName is the NetBIOS name of your server.



  1. Remove all the information from the Value data box, and then type the following
    information:

ServerNETBIOSName:6001-6002;ServerFQDN:6001-6002;ServerNetBIOSName:6004;ServerFQDN:6004


Replace ServerNetBIOSName with the NetBIOS name of your server. Replace
ServerFQDN with the fully qualified domain name (FQDN) of your server.



Note: The above text is ONE LONG LINE. Copy and
paste it into Notepad, and edit it there. Once done, copy it from Notepad and enter
it in the Registry editor.



Note: This is the part where most administrators fail. Take a look
at the following table and enter the correct values based upon this example:

















Role

Names

Windows Server 2003 SP1 + Exchange 2003 SP1 + DC, FSMO, GC + RPC Proxy

NetBIOS name:zeus

FQDN - Internal:zeus.dpetri.net


(this is just an example, the name is bogus)



FQDN - External:mail.dpetri.net


(this is just an example, the name is bogus)





Note: In the above table I've used the same domain name internally as externally
(dpetri.net). This is NOT a best practice, as one SHOULD keep these two domain names
separate, mostly for security and DNS issues. For example, if I would have to re-write
this guide, I'd probably use dpetri.local for the internal domain name, and dpetri.net
externally.



Text to enter in the registry:


zeus:6001-6002;mail.dpetri.net:6001-6002;zeus:6004;mail.dpetri.net:6004


Note: Some guides and articles instruct you to also add the external
FQDN of the RPC Proxy, i.e. the FQDN used to access the server from the Internet.
For example, in the above scenario, you should use:


zeus:6001-6002;zeus.dpetri.net:6001-6002;mail.dpetri.net:6001-6002;zeus:6004;zeus.dpetri.net:6004;mail.dpetri.net:6004


I've experimented with both settings, both work. To be on the safe side I'd recommend using the longer version.



  1. Click OK, and then quit Registry Editor.


Note: You can also use the Rpccfg tool to set and to troubleshoot
port assignments. The Rpccfg tool is included in the Windows Server 2003 Resource
Kit tools (Download
Windows 2003 Reskit Tools
):


C:\WINDOWS\rpccfg /hd
Server Name Port Settings
---------------------------------------------------------
mail.dpetri.net 6001-6002 6004
zeus 6001-6002 6004
zeus.dpetri.net 6001-6002 6004


Configure all your global catalogs to use specific ports for RPC
over HTTP for directory services



Exchange Server 2003 Service Pack 1 note: Exchange Server 2003
Service Pack 1 has a new built-in RPC over HTTP/S GUI setting on the Exchange Server
properties page in Exchange System Manager. If you configure the RPC over HTTP/S
option from the GUI, there is NOT need to make any manual changes in the Registry
.



To make the changes via the GUI follow these steps:



  1. Click Start, point to Microsoft Exchange, and then click System Manager.

  2. Expand your organization, expand Administrative Groups > First Administrative Group
    > Servers.
  3. Right-click on your server name and select Properties.

  4. On the General tab, verify that you have SP1 installed. Verify that a tab
    called RPC-HTTP is present.





  1. On the RPC-HTTP tab, click on RPC-HTTP Back-End Server.





You might get an error:



Exchange System Manager There is no RPC-HTTP front-end in your Exchange organization.
There must be at least one RPC-HTTP front-end server in the organization before
the RPC-HTTP back-end server can be accessed.



Acknowledge the error.



  1. Click Ok all the way out.
  2. You need to reboot your server for the
    settings to take place.


If you did not install Exchange Server 2003 SP1, or if you did not configure
the RPC over HTTP/S option from the GUI, then you MUST manually perform the changes
in the Registry.



To do this, follow these steps:



  1. Start Registry Editor.
  2. Locate and then click the following registry subkey:




HKEY_LOCAL_MACHINE
\SYSTEM\CurrentControlSet\Services\NTDS\Parameters




On the Edit menu, point to New, and then click Multi-String Value.



Note Make sure that you select the correct value type for the registry subkey. If
the registry subkey type is set to anything other than Multi-String Value, you may
experience problems.



  1. Name the new registry value NSPI interface protocol sequences.

  2. Right-click NSPI interface protocol sequences, and then click Modify.

  3. In the Value data box, type

ncacn_http:6004


and then click OK.



  1. Quit Registry Editor, and then restart the computer.


Configure the Outlook 2003 computer to use RPC over
HTTP/S



You must now configure a client computer that meets the requirements specified at
the beginning of this article to use RPC over HTTP/S.



Follow the instructions found in the
Configure Outlook 2003 to use RPC over HTTP/S
article.






Test the RPC over HTTP/S connection



Next, the natural step is to test your configuration. Testing can be done on the
LAN or on the WAN.



Follow the instructions found in the
Testing RPC over HTTP/S Connection
article.






If a successful connection is made then you can start deploying your Outlook clients
and begin using RPC over HTTP/S.



Related articles



You may find these related articles of interest to you:




Links




Exchange Server 2003 RPC over HTTP Deployment Scenarios



How to configure RPC
over HTTP on a single server in Exchange Server 2003 - 833401




RPC over HTTP Security




RPC over HTTP Deployment Recommendations

Monday, February 16, 2009

SQL Server 2008 - Can't Save Changes to Table

For those who tested the new SQL Server 2008, you probably got this message, when trying to change the columns in some tables, add columns or change nullity conditions. "Save is not permitted"... and something like tables have to be dropped and re-created. The only choice you have is to click cancel, or to choose to save the message to a text file, which is, i think, not very useful.

The solution i found today is in SQL Books Online, nd it is pretty easy:

Tools -> Options -> Designers, and uncheck the option "Prevent saving changes that require table re-creation".

Wednesday, February 11, 2009

ASP.NET Tag Cloud

This looks to be just what I'm looking for for a project.

http://www.codeproject.com/KB/aspnet/cloud.aspx

Web sites such as del.icio.us, Technorati and Flickr, which allow tagging of their content, depict the popularity of tags using a tag cloud. The popular items have larger font sizes. This concept can be applied to any list of items where each item has an associated weight. For example, a list of products can be displayed in a cloud weighed by the cost of a product. Using the ASP.NET server control presented in this article, you can display your own domain specific items as a cloud. The image below shows a sample cloud for articles on Ajaxian. sample image

Tuesday, February 10, 2009

XMLRPC over HTTP with Structured XML - VB.NET w/ Real-World Code

I've been working on a project for the past month on sending and receiving data to a vendor using XMLRPC over HTTP technologies. It proved to be a real bear to figure out as we got started as I couldn't see the format of XML I was sending and they never told me exactly what it needed to look like either. I've finally got it "licked" and thought I'd share some of the journey here in case it helps anyone else.

First off, I found it extremely helpful to use WireShark to analyze my network traffic. This finally gave me some specific information as to the XML I was sending and what I was getting back. I'd recommend it.

I found a set of C# classes that would do all the basics of XMLRPC over HTTP. I'm a VB.NET programmer by habit so this isn't my native language, but I haven't had to even touch this code, it works so well. You can get it at www.xml-rpc.net.

So, let's get into this. Using the basic functionality of XML over RPC, I originally came up with this bit of code that seemed to be sending data, but was constantly getting Internal Server Error (500) responses from the server.

Imports CookComputing.XmlRpc

Public Interface iGetClaim

<CookComputing.XmlRpc.XmlRpcMethod("api.server.clients.claims.search_for_client_claims")> _
Function SearchForClientClaims(ByVal api_id As String, ByVal api_password As String, ByVal client_id As String)

End Interface

Module Module1

Sub Main()

CallRPC()

End Sub


Sub CallRPC()
Dim Proxy As iGetClaim
Dim Protocol As XmlRpcClientProtocol
Dim XmlRpcHost As String = "http://api.xxx.com/rpc"
Dim ApiId As String = "aaa"
Dim Password As String = "bbb"
Dim ClientID As String = "ccc"

'Prepare the request
Proxy = CType(XmlRpcProxyGen.Create(Of iGetClaim)(), iGetClaim)
Protocol = CType(Proxy, XmlRpcClientProtocol)
Protocol.Url = XmlRpcHost

'Get the response
Dim result As String = Proxy.SearchForClientClaims(ApiId, Password, ClientID)
MsgBox(result)



End Sub

End Module




Once I got ahold of WireShark, I was able to analyze what was going out my network "door" and emailed the vendor the exact XML I was sending him:


<?xml version="1.0"?>
<methodCall>
<methodName>api.server.clients.claims.search_for_client_claims</methodName>
<params>
<param>
<value>
<string>aaa</string>
</value>
</param>
<param>
<value>
<string>bbb</string>
</value>
</param>
<param>
<value>
<string>ccc</string>
</value>
</param>
</params>
</methodCall>




This is when we started figuring it out. That's not what they were looking for. What they were looking for was something like this:
<?xml version="1.0"?>
<methodCall>
<methodName>api.server.clients.claims.search_for_client_claims</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>api_id</name>
<value>
<string>aaa</string>
</value>
</member>
<member>
<name>api_password</name>
<value>
<string>bbb</string>
</value>
</member>
<member>
<name>client_id</name>
<value>
<string>ccc</string>
</value>
</member>
<member>
<name>paging</name>
<value>
<struct>
<member>
<name>offset</name>
<value>
<i4>0</i4>
</value>
</member>
<member>
<name>rows</name>
<value>
<i4>2</i4>
</value>
</member>
</struct>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>


Ok... How in the world do we fix that? I almost resorted to tossing the XMLRPC software and writing my own HTTP request and response handler and manually parsing the XML. I could have done that... but really, really, didn't want to. After much googling and a little hair pulling, we figured out how to structure the requests (and later the response) as a heirarchy of VB.NET Classes - XMLRPC code did the rest! Here's what a request winds up looking like in VB:

Imports CookComputing.XmlRpc

Public Interface iClaimInfo
<CookComputing.XmlRpc.XmlRpcMethod("api.server.clients.claims.get_claim")> _
Function GetClaim(ByVal value As Request) As Response

Class Request
Public api_id As String
Public api_password As String
Public claim_id As String
Public claim_number As String
End Class

Class Response
Public claim As Response_ClaimInfo
End Class

Class Response_ClaimInfo
Implements iClaimsFormsObject

Public Sub AddChildNodes(ByRef MyNode As System.Windows.Forms.TreeNode) Implements iClaimsFormsObject.AddChildNodes
'Do Nothing
End Sub

Public Sub ShowInPanel(ByRef Panel As System.Windows.Forms.Panel) Implements iClaimsFormsObject.ShowInPanel
Dim lbl As New Windows.Forms.Label
lbl.Text = XmlRpcInfo.GetProperties(Me)
lbl.Dock = Windows.Forms.DockStyle.Fill
Panel.Controls.Add(lbl)

End Sub

Public Sub DoubleClickNode(ByRef MyNode As System.Windows.Forms.TreeNode) Implements iClaimsFormsObject.DoubleClickNode
MsgBox(XmlRpcInfo.GetProperties(Me))
End Sub

Public client_id As String
Public client_parent_id As String
Public claim_status_description As String
Public claim_number As Integer
Public claim_status_key As String
Public claim_type_name As String
Public claim_created As String
Public adjuster As String
Public client_name As String
Public claim_location_of_loss_city As String
Public claim_date_of_loss As String
Public claim_client_claim_number As String
Public claim_id As String
Public adjuster_id As String
Public claim_location_of_loss As String
Public claim_received As String
Public last_modified As String
Public claim_priority As Integer
Public claim_completed As String
Public claim_type_id As String
Public client_parent_name As String
Public claim_last_worked As String
Public client_display_name As String


Public Function GetAmounts() As iClaimAmounts.Response
Dim a As New ClaimAmounts(claim_id)
Return a.GetAmounts()
End Function

Public Function GetPayments() As iClaimPayments.Response
Dim x As New ClaimPayments(claim_id)
Return x.GetData()
End Function

Public Function GetJournalEntries() As iClaimJournalEntries.Response_JournalEntry
Dim x As New ClaimJournalEntries(claim_id)
Return x.GetData()
End Function

End Class

End Interface

Public Class ClaimInfo

Private _ClaimId As String
Private _ClaimNumber As String

Public Sub New(ByVal ClaimId As String, ByVal ClaimNumber As String)
_ClaimId = ClaimId
_ClaimNumber = ClaimNumber
End Sub

Public Function GetClaim() As iClaimInfo.Response_ClaimInfo

Dim Proxy As iClaimInfo
Dim Protocol As XmlRpcClientProtocol
Dim Response As iClaimInfo.Response
Dim Request As iClaimInfo.Request

'Prepare the request
Proxy = CType(XmlRpcProxyGen.Create(Of iClaimInfo)(), iClaimInfo)
Protocol = CType(Proxy, XmlRpcClientProtocol)
Protocol.Url = XmlRpcInfo.XmlRpcHost

Try

'Send the Request
Request = New iClaimInfo.Request
Request.api_id = XmlRpcInfo.ApiId
Request.api_password = XmlRpcInfo.ApiPassword
Request.claim_id = _ClaimId
Request.claim_number = _ClaimNumber

'Receive the Response
Response = Proxy.GetClaim(Request)

'Return the claim
Return Response.claim

Catch ex As Exception

'Record any errors
MsgBox(ex.ToString)
Return Nothing

End Try

End Function

End Class

Here's an example of the returned XML that these classes can process:

<?xml version="1.0" encoding="us-ascii"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>claim_list</name>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>claim_status_key</name>
<value>
<string>C8</string>
</value>
</member>
<member>
<name>claim_id</name>
<value>
<string>aaa</string>
</value>
</member>
<member>
<name>employee_name</name>
<value>
<string>first last</string>
</value>
</member>
<member>
<name>employee_id</name>
<value>
<string>89DC932C-DE87-3BDC-9219-186A08A7C3E3</string>
</value>
</member>
<member>
<name>claim_number</name>
<value>
<int>xxx</int>
</value>
</member>
<member>
<name>claim_client_claim_number</name>
<value>
<string>xxx</string>
</value>
</member>
<member>
<name>claim_date_of_loss</name>
<value>
<string>03/31/2007</string>
</value>
</member>
<member>
<name>claim_insured</name>
<value>
<string>xxx xxx</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>claim_status_key</name>
<value>
<string>CD</string>
</value>
</member>
<member>
<name>claim_id</name>
<value>
<string>B3ADD56D-DD4D-3F9F-9D50-212489623927</string>
</value>
</member>
<member>
<name>employee_name</name>
<value>
<string>xxx xxx</string>
</value>
</member>
<member>
<name>employee_id</name>
<value>
<string>91ECC175-2074-3C24-B834-6A20CF807B58</string>
</value>
</member>
<member>
<name>claim_number</name>
<value>
<int>xxx</int>
</value>
</member>
<member>
<name>claim_client_claim_number</name>
<value>
<string>xxx</string>
</value>
</member>
<member>
<name>claim_date_of_loss</name>
<value>
<string>04/01/2007</string>
</value>
</member>
<member>
<name>claim_insured</name>
<value>
<string>xxx xxx</string>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>


I've found that I had to kind of "guess" as to whether or not I would get back integers, strings, doubles.... the program would break if I got the wrong type, so I'm still tweaking that. I also developed a few "helper" functions to ease in the writing of code and identifying properties of the returned XML. I'll post a few here:

Public Class XmlRpcInfo
Public Shared XmlRpcHost As String
Public Shared ApiId As String
Public Shared ApiPassword As String
Public Shared ClientId As String

Shared Function GetKeys(ByVal coll As Object, Optional ByVal IncludeDims As Boolean = False) As String

Dim de As Object
Dim str As String = ""
Dim xml As XmlRpcStruct = coll(0)

For Each de In xml.Keys
If IncludeDims = True Then
str += " Public " & de & " as string" & vbCrLf
Else
str += de & vbCrLf
End If
Next

Return str
End Function



All in all, this is turning into one powerful XML over HTTP processor. It looks like I'm going to be able to use it not only for one client but for seveal other around the country, and I'm excited that I finally figured out the basics of how it works. If you have any questions or thoughts, please comment; I'd love to learn more.

RDP Keyboard Shortcuts

I'm always looking for these shortcuts, so thought I'd post them here... hope they help you as well!

  • CTRL+ALT+END: Open the Microsoft Windows NT Security dialog box (CTRL+ALT+DEL)
  • ALT+PAGE UP: Switch between programs from left to right (CTRL+PAGE UP)
  • ALT+PAGE DOWN: Switch between programs from right to left (CTRL+PAGE DOWN)
  • ALT+INSERT: Cycle through the programs in most recently used order (ALT+TAB)
  • ALT+HOME: Display the Start menu (CTRL+ESC)
  • CTRL+ALT+BREAK: Switch the client computer between a window and a full screen
  • ALT+DELETE: Display the Windows menu
  • CTRL+ALT+Minus sign (-): Place a snapshot of the entire client window area on the Terminal server clipboard and provide the same functionality as pressing ALT+PRINT SCREEN on a local computer (ALT+PRT SC)
  • CTRL+ALT+Plus sign (+): Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer (PRT SC)

Tuesday, August 12, 2008

Getting the Motorola V3M to sync with Windows Media Player

Source: http://motov3m.com/tiki-index.php?page=UsingBasics

This is a guide to setting up your phone to sync with Windows Media Player.

The Motorola V3m serves not only as a phone, but also as a multimedia device. One of its primary uses is as a music player. It is a fairly robust music player, allowing for music syncing with the device through Windows Media Player 10. Out of the box, the device works only with the Windows WMA format, so WMP 10 is required to ensure that songs that are synced to the device are in the proper format.

It should be noted that the only thing required to sync Windows Media Player with your computer is a USB to mini-USB cable, with this being an example. (NOTE: You need a mini-USB 5-pin cable.)

You will also want to purchase a microSD (transflash) card for your phone, if you want to have more than the approx. 30MB of storage space built into the phone ( = approx 10 song capacity). Transflash cards range from 128MB (approx $20), to the newly released 2GB capacity; the 2GB card does not appear to be compatible with the V3m (the entire 2GB will not be available for use).

A 1GB transflash card can be purchased, with USB adapter, from the link on the right of this website. The USB adapter is handy if you don't have an SD card reader for your computer (the transflash fits into an SD adapter for copying files - however this requires an SD card reader on your computer; the USB adapter requires only a USB port for use with the card).

Verizon sells a music essentials kit for the phone for $30, which includes drivers for the music sync, a mini-usb to usb cable, and a pair of earphones that have a mic attached so you can answer the phone while listening. However, it appears that many have had trouble getting this kit to work out of the box, possibly due to out-dated drivers on the CD.

The following is a step-by-step process on how to get Windows Media Player 10 configured for use with the V3m. It requires only a V3m phone, a mini-usb to usb cable, and Windows Media Player 10.

Steps to Configure Windows Media Player 10 Sync with V3m:
1) Download and install this program: http://www.bvrp.com/Customers/Motorola/DriverTool.zip
This program will uninstall any old Motorola drivers, and install the appropriate drivers for your phone to connect to Windows Media Player.
2) Turn your phone off and plug it into the computer
3)Wait for the phone to be recognized as a modem by your computer - a box should pop up informing you that "Motorola USB modem" has been attached
4) Turn your phone on
5)In your phone, go to Menu....Get It Now Menu....Get Tunes and Tones...Sync Music
6) Windows should recognize your phone as an MTP device, and ask you if you want to open Windows Media Player
7) You should now be able to sync files in Windows Media Player, just like with a regular device

Troubleshooting:
In certain circumstances, it has been reported that WMP10 will not sync with the V3m, despite the above instructions. I have had this happen to me when I installed WMP11, then uninstalled and reinstalled WMP10. For the life of me, I couldn't get the computer to sync with the phone after that. If you run into problems syncing, try this patch. It is the only thing I have found so far that restored functionality.

File Conversion Issues:
If you are trying to copy MP3 files, it appears that the WM10 file conversion tool does not work properly. Files are converted and copied to the phone, but produce no sound when played.

If you encounter this issue try using a different audio program (such as Adobe Audition) to encode the files to WMA format before copying them. This process was tested and worked with Constant bit rate encoding, Windows Media Audio 9.1 - CBR 192 Kbps, 44 KHz, 16 bit, stereo. Other settings may work, but have not yet been tested.

You can still use WM10 to copy the files to your device. WM10 certainly copies files to your phone faster than BitPim or MPT.

Source: http://motov3m.com/tiki-index.php?page=UsingBasics

Thursday, March 13, 2008

Web Page Scraping

One of the ways we've been gathering data for years has been called "screen scraping." You log onto a program, find certain text in certain portions of the page, and "scrape" it off for your own application's needs.

This has become a whole new animal with the explosion of the Internet. So much more information is available now, but it's constantly changing as well! We are able to use RSS, blogs, XML, Web Services and other types of feeds to obtain much of the information you may need on your site, but every once in a while we still have to get out there and scrape certain information right off of a page.

We can provide this functionality on your website, or can provide you with the development tools to do it yourself! Contact us for more information or click here for a live demonstration.

Data-Driven META Tags

We have recently developed an ASP.NET control that allows for database driven META tags and page titles for pages on your website. This control, when placed on a page, will look up META data and page TITLE information from the database and incorporate into the page. This is extremely useful on sites that use master pages and completely data-driven virtual pages, such as this very page, or any other in our 'Content' directory on this site.

We invite you to check out this tool in action by looking at the bottom of the Contact Us page on this site, or any other of the pages where we have added custom META Keywords or Page Titles. This control automatically removes existing titles and tags if it finds conflicts, and will help you make your data-driven site much more search engine friendly.

For more information on this project, click here.

Website Uploads

If your business is a service provider to other businesses or even individuals, you may often need for them to send you large computer files for you to work on for them, such as accounting software backups or logo designs. Often these files are too large to send via email, so another method must be used. We have developed a simple "web site upload" application that will allow your clients to upload files of any given size to your website. The files can be marked as public or private, and can then be accessed via a password from your place of business.

Additional features of this application include an automatic email notification feature that will send you an email whenever someone uploads a file to your system. We can also add additional levels of privacy protection so that each of your clients has their own private "store" of information and they, and only they, can access those files.

We can add this feature to any website we develop for you, or can even add it to many existing websites you may already have. All of the source code is also available for purchase. Contact us with any questions you may have about this product.

You can view a working example of this application here

Data-Driven School Corporation Websites

We've been doing some work with some local high schools and entire school corporations and are beginning to see a need for consistency and data-driven templates to better allow these organizations to effectively communicate and connect with the visitors to their sites.

You can read more about this project here.

Daily Bible Reading Companion

We've recently built a smashup (I think that's the technical term) that combines several types of information feed into a single page. The application reads a database to find a Bible reading for a given day of the year from a SQL Server database hosted on the site, and then queries an external web site via a URL and Querystring for that passage. Depending on copyright rules, the text is displayed in-line or in an IFRAME html element. The page contains links to other days readings, making it ideal for search engine placement, as well as the RSS feed that is made available via the URL bar or an RSS link. The page also contains other RSS feeds from the Daily Audio Bible Forums site, which is a messaging board for people going through this reading plan together.

You can view the application here. We'd be happy to create a reading plan or other similar type of smashup application for your site. Get your creative juices flowing and give us a call!

Blog Archive

Hits and Stats


Stats