Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'd like to access data from a list in one web application in another web application. They are both in the same farm. For instance, web app 1 has a custom list and web app 2 has a CQWP that wants to show the web app 1 list. In my case, I have a MySite collection (web app 2) which needs to consume data from our main site (web app 1) where data is maintained centrally.

Is there a way to use something like crossdomain.xml and/or clientaccesspolicy.xml to do this?

share|improve this question
    
You might be able to do this with web services or custom code. I guess it really depends on what you want to do with the data and what types of permissions or controls the users have that will be able to see it. Could you provide a bit more detail on what this data would be used for? –  spevilgenius Mar 24 '10 at 20:53
    
SiddR post some snipped code Also have you tried using Shareplint Designer you can get alot done there too.. –  Patrick May 13 '10 at 5:42
add comment

3 Answers 3

up vote 2 down vote accepted

Since your web applications are within the same farm, you can even use the object model to query the data. It's been a while since I've re-checked this, but from what I can remember one of the following conditions must be true.

1) Your application pool identity for web app 1 must be the same as the app pool identity for web app2, OR

2) The application pool identity of web app 1 must have sufficient rights to the content database for web app2.

In both cases its to do with the permissions on the relevant content DBs

I should also mention that the calling user would need to have permissions to access the data being retrieved.

share|improve this answer
add comment

I have developed custom web parts, and also used some third party web parts to do this in the past by going through the web services.

Since it is available via web services you also have the option of using an ajax library like jQuery or the SPServices project which makes that even easier.

SPServices - http://spservices.codeplex.com/

share|improve this answer
add comment

You could create a Data View Web Part in SPD using a data source pulling in the lists web service on your other web application.

Or alternatively as Mike has said take a look at SPServices.

Or if you want to develop something then you can use the OM as Paul has mentioned.

So you have many options to achieve this.

The basic idea here is that whilst this is achievable in many ways there is probably only one optimal way for your requirements. If you want more information then as SPEvilGenius has stated you must give us all more information on the requirements that you are working with.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.