Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Dynamic Data Sources for Data Views

  Asked By: Leslie    Date: Sep 07    Category: Sharepoint    Views: 1269

I've hit a bunch of stumbling blocks in trying to figure out how to pass the
server information to aspx pages created using SPD and I don't have to manually
touch them in each environment (to point them to the correct database. It
seems like the web.config idea is the most widely accepted, although with a few
changes (actually put the connection string as the key for an application in the
web.config in the <datasources> section, not just the server name). However,
with either method the issue comes down to where the code is run. To allow this
to be server-side code (so the user doesn't have the database information), I'd
need to update the web.config to allow server-side code in the pages since
Microsoft turns it off by default.

My next idea (be afraid, be very afraid) is that create a web service that the
pages can use as the data source. As parameters, the page will pass the service
the query string it wants as well as the application name. The service would
then do the lookup on the web.config for the connection string (since its
backend code, no issues), and return the data back to the page. The generic
service should be usable across the board for all data views this way, and we
can further secure it by setting up a single sign on in SP for the service (so
only the pages will use this service).



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Dynamic Data Sources for Data Views Or get search suggestion and latest updates.