Expense Example - Missing SQL Scripts?

Hi,

Just downloaded and ran the Expense Reporting sample, and created the DBs using the Workflow Tracking and Workflow Persistence scripts. However, after building and running ExpenseHost.exe I discovered that the SQL script files to create the required tables and stored procs are missing.

Are they available from anywhere?

Regards,

Michael

[372 byte] By [MichaelWittenburg] at [2007-12-23]
# 1
The sql script needed for the tracking and persistence databases comes with the product. Their location is dependent on which version you have installed. With Beta 2.2 and prior builds they are found under %windir%\WinFX\v3.0\Windows Workflow Foundation\SQL\EN and for any of the RC build they can be found under %windir%\Microsoft.NET\Framework\v3.0\Windows Workflow Foundation\SQL\EN. One clarification, the scripts don't create the database they will only add the schema and logic to the database you run them against.
TomLake at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2

Tom thanks, that was well useful.

Of course now that the DB works I ran into the next problem :-)

When I run ExpenseHost.exe it breaks when trying to open the ServiceHost to create listeners. This uses the address http://localhost:8081/WFSamples/ExpenseService as per the App.config file for ExpenseHost.csproj. I get the following error:

HTTP could not register URL http://localhost:8081/WFSamples/ExpenseService/. Your process does not have access to this namespace.

Can't figure out how to configure IIS under Vista to point to port 8081. Should this be an IIS app, or virtual directory?

Feel like a bit of an idiot because I can't get it to run and suspect it's something really simple... :-(

But thanks for your help so far :-)

MichaelWittenburg at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 3

I found this post - http://mark.michaelis.net/Blog/WindowsCommunicationFoundationWithWindowsVistaAndUAC.aspx - which pretty much describes my problem. However, creating the .MANIFEST file (created ExpenseHost.exe.MANIFEST and ExpenseContracts.dll.MANIFEST, just in case) but I still get exactly the same error.

So any pointers would be hugel appreciated!

MichaelWittenburg at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 4

Holy smoke I got the thing working.

So the .MANIFEST file in the above URL (Mark Michaelis' blog) is on the right track but incomplete and syntactically incorrect. Um, not trying to sound critical or anything, just hoping this helps the next guy.

It should look like this:

<?xml version="1.0" encoding="utf-8" ?>

- <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="ExpenseHost" type="win32" />

<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">

- <security>

- <requestedPrivileges>

<requestedExecutionLevel level="requireAdministrator" />

</requestedPrivileges>

</security>

</trustInfo>

</assembly>

The notable changes are the addition of the assemblyIdentity tag, and closing the requestedExecutionLevel tag.

I'm a little concerned about a web service needing admin rights to execute - surely there's a lower/least-privilege way to do this?!? Also a bit bleaked out about having disabled my admin account because I had no clue that the default password is apparently blank (untried, the account is locked after x amount of invalid tries).

Anyways, the code now works. And I second the sentiments I read in another post. Some documentation outlining such issues is very useful.
MichaelWittenburg at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 5

In general, you need elevated privileges to reserve an HTTP endpoint. In Vista, even when logged in as an admin, you are running with lowever privileges. You can modify your Visual Studio shortcurt or the exe properties to run as the administrator (there is a check box on the properties page for the shortcut).

Matt

MattMilner-Pluralsight at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified