| Author |
Message |
Moim Hossain

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
Hello everybody,
I am getting some trouble around SharePoint Object model. I was intended to write a console or windows application that will connect two SharePoint site (One is SharePoint 2003 and the other is SharePoint 2007) and will move/copy documents from one to another. I have tried to connect to the SharePoint 2007 first and it was connecting fine. (I was running my application into the same machine where the SharePoint 2007 is installed). The application was retrieving the Document from the SharePoint 2007 as expected but the trouble raised when it was trying to connect with the SharePoint 2003.
The error was
The Web Application at could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
Then I was running the application from the machine where the SharePoint 2003 installed and here it was connecting to WSS 2003 fine but failed to connect to WSS 2007. Here the error is different then the earlier.
The server instance specified was not found. Please specify the server's address and port.
I have searched the web for this error and found a support article in MSDN. But I have not found any good by following the approach that the article specified.
Can any body help me to get rid of this trouble
One more thing, Can you help me to find out the answer for the following question,
Is it possible to connect to a SharePoint site and retrieve a document from a machine where the SharePoint is not installed by using the SharePoint object model
Advance Thanks for all kind of suggestions
Microsoft ISV Community Center Forums2
|
| |
|
| |
 |
Thomas LEBRUN

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
>> Is it possible to connect to a SharePoint site and retrieve a document from a machine where the SharePoint is not installed by using the SharePoint object model
It looks like it's not possible.
I need to do a similar thing (connect via OM on Sharepoint from a machine where Sharepoint is not installed) and after my researchs, it appears that it's not possible: you need to use the Web Services.
HTH
Bye
|
| |
|
| |
 |
totmakov

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
Hi!
I have the same problem. My web page running on the same web server with WSS v3.0 beta2 and trying to use the WSS OM to retrieve some data from root site. But it fails with the message:
The Web Application at could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
I worte simple console application. It runs Ok without any problems and failures. It seems that this problem is accuring only in web applications. I have hard coded IP on my computer and I've done all stuff, discribed in that MSDN article with mapping virtual server name to IP. It doesn't seem that problem with users rights and impersonation.
Does anybody knows how to fix it
|
| |
|
| |
 |
MS ISV Buddy Team

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
I passed this issue to a Microsoft support engineer, and here is what he said:
Based on what I gather from the case notes and the article that was pointed out, I think the customer is running into a known problem when connecting to SharePoint 2003. There is a bug in the wss object model code when connecting to a site using the fully qualified domain name. The problem arises under this circumstance because wss does not go out to the DNS server to do name resolution.
The scenario of using a fully qualified domain name in the code will only work if the host header is local to the IIS metabase, this is easy to do in a test environment where everything is in the same environment but will not work in a production environment with a DNS server.
The only workaround to this is to use either the IP address or the netbios name of the server rather than passing the fully qualified domain name to the object model when referencing a site.
So instead of writing code like this:
SPSite site =new SPSite(http://test.domainname.com);
You need to write it like this:
SPSite site =new SPSite(“http://<IP address>”); or
SPSite site =new SPSite(“http://<Server Name>”);
A good way to approach this is to have the IP address encrypted as a key in the configuration file, read the key and decrypt it in the code and use the value to establish the connections to the sites. The advantage of this is that you won’t need to hard code any values in the code.
I think this will take care of the problem for the customer but please let me know the results.
The customer also had the question of “Is it possible to connect to a SharePoint site and retrieve a document from a machine where the SharePoint is not installed by using the SharePoint object model ”, I have address this below.
Yes, there are ways to connect to a SharePoint site from a machine which does not have Sharepoint installed, however, you cannot use the object model directly. You will need to create an application (web or console) that will make use of the SharePoint web services hosted on the SharePoint server machine. There is also the option of using FP RPC to connect to and manipulate document libraries.
--Thanks
Lisa (ISV Buddy Team)
|
| |
|
| |
 |
sahridhayan

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
Hi,
My environment is this standalone instllation of MOSS 2007 Beta 2 (No TR) at W2k3 sp1 (Virtual PC)
My client environemnt is win xp.
I hav an Web Service app hosted in to w2k3 server where MOSS exists.
When i try to add a file thru Web Service using object model i get the following errors.
when use machine name for opening spweb (SPWeb site = new SPSite(AbsoluteURL).OpenWeb();)
"The request Failed with HTTP Status 401 UnAuthorized"
when using ip address at AbsoluteURL
getting
The Web Application at http://172.26.7.224:5493/Shared%20Documents/imsd.doc could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.errortested
But when i use thesame code inside a Winforms application at running from server it works great!!!
Please show my some light...
i am held up with a lot behind this trial...
I have tried the following,
1. I have proxy server configured at our network tried removed that setting at IE also.
2. I hav given permission to NETWORK SERVICE ASPNET IUSR Administrator of W2k3 accouts for Sharepoint Web Application (admin site)
3. Also given permission thru SP Admin website for adding documents to "Shared Documents" for the above accounts.
tia
regards
sahridhayan
|
| |
|
| |
 |
sahridhayan

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
Hi
I have also tried
setting
site.AllowUnsafeUpdates = true
It does not help too.
Please direct me where i am missing.
tia
sahridhayan
|
| |
|
| |
 |
jhered

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
I'm having the same problem... i wasn't the one who installed sharepoint on the server... so i have no idea if sharepoint was installed using the OM or not... (How can i tell without asking him office politics hah)
i tried using the machine name
i tried using the ip address
i tried using the fully qualified domain name
I still get filenotfoundexception as described by the OP (original poster)
|
| |
|
| |
 |
DarkJediOverlord

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
Did you ever figure this out I am having the same problem and it is driving me crazy. Thanks!
|
| |
|
| |
 |
JeffHeary

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
I too am running into the same issue. Just wondering if anyone has come across a resolution.
Thanks.
|
| |
|
| |
 |
Dimitrian

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
I have the same problem. Try to set the same ApplicationPool as use WSS for the web-application that use WSS object model.
|
| |
|
| |
 |
JDPeckham

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
any updates on this
i tried ("machinename") ("machinename.domain.com") and ("ip address") none of them have worked as i stated above. Do we have any further information about this Are we only to be using the WSS OM from the server machine
|
| |
|
| |
 |
yichuan

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
I want to use a web service to connect the sharepoint 2007, and then call the sharepoint object model to do some operations, such as adding web in a specific site.
But it's running the "SPSite site = new SPSite(http://shareserver:65432/sites/portal)", the system throw a System.IO.FileNotFoundException. The error message just like the post 1 showing.
I don't know what's wrong with it and how to solve it. Please help me.
Thanks.
Yichuan
|
| |
|
| |
 |
Robert Monteiro

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
Guys, I had been struggling with this issue for a couple of weeks and thanks to Ishai, I manage to resolve it. It appears to be a permissions issue. Have a look at: http://www.sharepoint-tips.com/2007/04/content-query-limitations-and-object.html
-- Rob
|
| |
|
| |
 |
mh8759

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
I have an account with which I run my console app and try to connect to WSSv2 site and it doesn't work (the same FileNotFound exception) even after I added that account as DB login, account already is a member of SharePointAdmins group and is a administrator for Site Collection/Site.
I am running my code from a machine where MOSS2007 is installed and as it seems code works ok. It just doesn't connect. Also to note - the same code does not work at a server with WSSv2.
i'm stuck here, anyone solved it yet
|
| |
|
| |
 |
WebDev2000

|
Posted: ISV Open Discussions, Trouble while dealing with Share Point Object Model |
Top |
Robert Monteiro wrote: |
Guys, I had been struggling with this issue for a couple of weeks and thanks to Ishai, I manage to resolve it. It appears to be a permissions issue. Have a look at: http://www.sharepoint-tips.com/2007/04/content-query-limitations-and-object.html
-- Rob
| |
I tried all the suggestions provided in the thread. I still get the error, any one else having the same issue
or If you know something I can do to fix this issue, please let me know. thx.
|
| |
|
| |
 |
| |