Stonefield Query comes with sample code for running Stonefield Query reports through an ASP.NET Web interface using the SQProxyWrapper and SFQWrapper classes.
This sample project is called QueryWeb and can be found in the QueryWeb subdirectory of the Stonefield Query Studio folder.
This QueryWeb project is provided as a sample only and not as a complete web interface for Stonefield Query. As such, Stonefield Software will only be able to provide limited Technical Support for its use.
Running on a Development Machine
To test this project, do the following:
Open the "QueryWeb.sln" Solution file in Microsoft Visual Studio or Visual Web Developer.
Add the SQProxyWrapper, SFQWrapper, and interop references to the QueryWeb project as described in the Using SQProxy in .Net Applications help topic.
Edit the GlobalResources.resx file and set the ProjectFolder resource string to the folder that contains your Stonefield Query project INI file (SFQuery.ini). You can also adjust the ProxyTimeout and ReportOutputFolder resource strings if required.
ProxyTimeout lets you set the number of seconds that SQProxy will wait for Stonefield Query to finish setting up before a timeout error occurs.
ReportOutputFolder is the name of the subdirectory of the QueryWeb directory where report output files go. For example, if the QueryWeb project is at C:\Development\QueryWeb\ and you want generated reports to be stored at C:\Development\QueryWeb\ReportOutput, set ReportOutputFolder to "ReportOutput".
You should then be able to compile and run the QueryWeb sample project in your default Web Browser on your development computer. You will see an interface similar to the image below:
Running from a Live Server
To use this web application with your Stonefield Query project on a live web server, do the following:
Generate a setup executable for your Stonefield Query project as detailed in the Creating a Setup Executable help topic. Note that your ISS script also needs to install and register the SQProxy.exe file. To do so, add the following to the [Files] section of your ISS file:
Source: "{#SQPath}sqproxy.exe"; DestDir: {app}; Flags: ignoreversion
and add the following to the [Run] section:
Filename: {app}\sqproxy.exe; Parameters: /regserver
Install your Stonefield Query project to the web server using your generated setup.exe file.
Publish the QueryWeb project to your web server to the desired folder (such as C:\inetpub\wwwroot\QueryWeb).
Ensure the ASP.NET user that the QueryWeb Application runs under has the following permissions on the Web Server:
Stonefield Query Program folder (such as C:\Program Files\Stonefield Query Sample Application): Read and Execute Permission.
Stonefield Query Data folder (such as C:\Program Files\Stonefield Query Sample Application\Data): Read, Write and Execute Permission.
ReportOutputFolder (such as C:\inetpub\wwwroot\QueryWeb\ReportOutput): Read, Write and Execute Permission.
You should then be able to navigate to the appropriate URL (for example, http://www.yourserver.com/QueryWeb/Default.aspx) to test the web interface.
© Stonefield Software Inc., 2023 • Updated: 09/18/18
Comment or report problem with topic