Web Connection
Network data files access from Webconnect
Gravatar is a globally recognized avatar based on your email address. Network data files access from Webconnect
  Naeem Afzal
  All
  Jun 28, 2015 @ 05:14am
Hi,

I want to access vfp free tables from my LAN via webconnect. How can I set it to use files from my LAN ? What is the best way in webconnect ?

I have installed web connection 5.xx to my pc.

A link to a tutorial or step by step instructions are requested.

Regards,
Naeem

Gravatar is a globally recognized avatar based on your email address. Re: Network data files access from Webconnect
  Rick Strahl
  Naeem Afzal
  Jun 28, 2015 @ 09:30am

This has nothing to do with Web Connection - this is a network/OS configuration issue and is no different than what you would have to do with a desktop application.

To access remote data you have to make sure that you have permissions to reach the remote drives within the context of your FoxPro server's security context. Typically that'll be determined by the Application Pool that hosts your application in IIS - you configure the ApplicationPool identity to the account that has rights to access the data.

Once that's in place you can reference remote drives by UNC pathing or mapped drives - but make sure that the drives are mapped as part of an unattended Windows session (ie. a startup script or as part of your application startup).

+++ Rick ---


Hi,

I want to access vfp free tables from my LAN via webconnect. How can I set it to use files from my LAN ? What is the best way in webconnect ?

I have installed web connection 5.xx to my pc.

A link to a tutorial or step by step instructions are requested.

Regards,
Naeem



Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: Network data files access from Webconnect
  Naeem Afzal
  Rick Strahl
  Jun 28, 2015 @ 11:30am
Thanks Rick.

I saw a recent post to map network drives through a startup script.

I need to give data (dbf) access to my webconnect code scripts only. I need to hide my data from remote users.

Can this be done by assigning a domain user to my app pool in IIS ?

2) I am trying to learn webconnect from its demos. I tried to copy wwdemo.prg to a mycode.prg and inserted another case statement in wcdemomain.prg to run my code. Is there any better way to manually generate webconnect processes or i should only generate wwProcesses through webconnect wizards? Do i need to set some additional settings to run mycode successfully?

Regards,
Naeem

Gravatar is a globally recognized avatar based on your email address. Re: Network data files access from Webconnect
  Rick Strahl
  Naeem Afzal
  Jun 28, 2015 @ 03:56pm

You can map drives either with a startup script or by using built in functions to provide the mappings. But the account definitely needs to have elevated rights to actually create the mappings.

You can do the following in your server's YourServer::OnInit() method to map drives (do this as one of the first things in your code:

mapnetworkdrive("i:","\\server1\data","username","password")

The other option as discussed is to set a policy with a startup script that has those network mappings in it.

You can also use UNC paths directly - so referencing your files using \\servername\share\path\data.dbf for example. But in general UNC pathing can be slow unless your network is very quick. Drive mappings tend to be much faster especially for first file access.

+++ Rick ---


Thanks Rick.

I saw a recent post to map network drives through a startup script.

I need to give data (dbf) access to my webconnect code scripts only. I need to hide my data from remote users.

Can this be done by assigning a domain user to my app pool in IIS ?

2) I am trying to learn webconnect from its demos. I tried to copy wwdemo.prg to a mycode.prg and inserted another case statement in wcdemomain.prg to run my code. Is there any better way to manually generate webconnect processes or i should only generate wwProcesses through webconnect wizards? Do i need to set some additional settings to run mycode successfully?

Regards,
Naeem




Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: Network data files access from Webconnect
  Rick Strahl
  Naeem Afzal
  Jun 29, 2015 @ 08:43am
More info posted in a blog post here:

http://west-wind.com/wconnect/weblog/ShowEntry.blog?id=911

+++ Rick ---



Thanks Rick.

I saw a recent post to map network drives through a startup script.

I need to give data (dbf) access to my webconnect code scripts only. I need to hide my data from remote users.

Can this be done by assigning a domain user to my app pool in IIS ?

2) I am trying to learn webconnect from its demos. I tried to copy wwdemo.prg to a mycode.prg and inserted another case statement in wcdemomain.prg to run my code. Is there any better way to manually generate webconnect processes or i should only generate wwProcesses through webconnect wizards? Do i need to set some additional settings to run mycode successfully?

Regards,
Naeem




Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

© 1996-2024