Design Problem!!

J

Jay

Hello,

I have Windows Forms application which uses MS Access Database and a Pocket
PC application which uses Datasets, Iam trying to pass Datasets between
these applications using WebServices. Both these applications are shrink
wrapped so they need to perform with little user configuration

WebService/IIS is running on the computer having the Windows Application and
Pocket PC connectss to the webservice through Active Sync.

Iam trying to accomplish following task and am breaking my head over it-

1. How does the Webservice know where the MS Access Database is present. ie
How will the windows application let webservice know the location of the MS
Access database?
* I thought of registry but WebService might not have permission to read
it.
* I thought of saving an xml file in wwwroot but it could be read only.
* Web.config solution is not possible because end user is not very computer
savvy, so every time MS Access database changes its path Web.config needs to
chnage.
* Finally I thought of Web Cache. But evertime user restarts his computer
cache might get over written.
Any other workable suggestions?

2. When application starts up in the pocket pc, how will it find the name of
the host computer to get to the location of the webservice? Since the
client's computer name is not known in advance, can pocket pc application
find it other than entering the name manually.

Thanks a lot.
Jay
 
J

Jan Tielens

1) I would go for storing the location in the web.config. You can create a
setup package that alters the web.config while installing the app. No user
interaction is needed.

2) I think you better post this question in a compact framework newsgroup...

Another question, are you planning to run web services on a desktop pc?
 
R

Rick Spiewak

I would recommend that the Windows Forms application pass the location of
the Access database to the Web Service. The Web Service can store it in the
cache. As far as restarting the computer, you can put the Windows Forms app
(or one of its friends) in the startup group, and have it pass the
information then. Of course, the Windows Forms app will have to know where
the database is, but then someone has to start this thing!

If the Pocket PC is connected via ActiveSync, you could have the Windows app
put a config file into the mirrored files on the host, where it would
automatically get synced to the PPC. The profile for the PPC would have to
include syncing files. For example, here's where some files are that get
synced to one of my PPC's:

C:\Documents and Settings\Rick\My Documents\IPAQ_3650 My Documents\Business
 
T

Tom Krueger [MSFT]

Hi Jay,

Let me restate to clarify,
You are developing two applications, one WinForms and one Pocket PC that
both need to connect to the same database. The database will be located on
the client desktop. You also are trying to use a Web Services to connect to
the database where the Web Service is running on the desktop.

Let me first start by questioning your use of Web Services on a client
desktop that needs to be easily configured. Obviously I don't know your
exact situation, however, deploying .NET Web Services to each client will as
you know require IIS to be setup and configured. This alone sounds to
increase the complexity for end users and for the most part(in my opinion) I
would say IT would not want IIS running on all the end user desktops.

Too the questions:
How does the Web Service know where the database is?
In this situation, I would suggest the web.config. You could utilize the
Web Cache to facilitate a slightly faster lookup of the connection string,
however, the cache needs to still be loaded from some place. Again the
web.config should suffice. The problem I assume you are running into is
that you are having the WinForm directly conect to the database and the
PocketPC connect to the Web Service thererfore having to manage the database
connection string in two places.

One option is to have the WinForms app point to the Web Service as well.
However, this may not give you the performance you are looking for.
Another option is build a single Data Layer and point the Web Service to
that Data Layer as well as the WinForm app.

In the end, (with out specific knowledge of your problem) I would suggest
not using a Web Service and connecting the PocketPC directly to the database
through ActiveSync.

Now if this was a Server based solution my recommendations would be
different, and most likley include Web Services. The great thing about
using a web service is you would be able to sync the PocketPC database over
wireless.

Btw- You never mentioned how you were storing the data on the PocketPC. You
mentioned Datasets, however, datasets are not going to help you when the
PocketPC is off unless you are planning to serialize them. You may want to
consider using SQL CE on the Pocket PC and MSDE on the Desktop. If you do
this you can leverage the built-in replication features.

Let me know if you need anything else,

Tom Krueger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top