Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows App/Pocket PC/Web Service Nightmare!

Status
Not open for further replies.

clegg

Programmer
Jan 25, 2001
98
GB
What i'm trying to do is improve on one of our competitiors software but my Web Service/Pocket PC experience is limited. This is the scenario:

There is a Windows App that the user enters their SQL server connection settings into - this is written to the windows registry.

There is a Pocket PC app that calls methods from a Web Service to get the data from the SQL database, using the connection settings in the registry.

There is a Web Service!

I can't see how the web service is retrieving the settings from the Windows Registry - as far as I can tell you can't do this because of security.

If i change the web.config file to store the Connection Settings instead of in the registry, i'm going to have to store the web service url in the registry so that the windows app can call it (the url will alway be different so I can't just rely on the web reference - i'm explicitly setting it as in myWebService.Url = etc after i've instantiated it.

This is a solution but its not very pretty.

How the hell is this original app accessing the registry? Is it possible to do it using impersonation (just throwing in words i've come across!) - but if so surely you'd need to know the user you want to impersonate?

Any ideas would be greatly appreciated before I go grey ;-)

Clegg
 
Either the aspnet user has been granted read permission to the registry (unsafe) or the web service is running under a specific user who has this permission (more likely)

To grant read permission to a user open RegEdit and select Edit|Permissions and set them as required. You will probably need Administrator permission to do this of course!

You can then use the standard .NET facilities to read the registry.





Bob Boffin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top