Hi all,
I am facing problem while accessing document from SharePoint server located on port other than 80.
I want to access SharePoint document in my C# application.
I have two options; either to use Dot Net dialog boxes or MS Word dialog boxes.
1) Using MS Word dialog box in C#, I can open the document successfully. I am accessing MS Word dialog box using Word.Application in C# (com - Word 11.0 library).
But the problem exists with saving the document. The newly created document to save is not necessarily Word document, it can be pdf or txt (or with some other extension). So I need to pass filters to Save File Dialog box. And For MS Word Save File dialog box, we can not pass filters (It gives runtime error).
If we can pass filters to MS Word Save File dialog box, then also my problem can be solved.
2) I have preferred to use Standard dot net dialog boxes (Which are similar as dialog boxes used in notepad) due to limitation of MS Word dialog box specified above.
Standard dot net dialog boxes works finely with filters but has some problems with accessing SharePoint documents on port other than 80.
SharePoint server is located at path:
http://sharepoint-serv:26791/sites/mysite
I have uploaded text document (SharePoint Doc.txt) on path
When I opened this txt document, the path returned was from "Temporary Internet Files" folder.
If you open any document on SharePoint server located on port 80, it is directly opened from SharePoint server without downloading it on local machine.
I has observed same problem in notepad also.
I tried to access the document as:
1) I opened notepad
2) Clicked on File>>Open menu
3) Typed path http://sharepoint-serv:26791/sites/mysite in Filename section, and selected file SharePoint Doc.txt.
4) But the file opened as SharePoint Doc[1].txt, means notepad downloaded to folder - "Temporary internet files" which is not
expected(if you open any word document on SharePoint server, it is directly opened from SharePoint server without downloading
it on local machine).
5) When I tried to save the document, the Error message displayed as
Cannot create the C:\Documents and Settings..... \Temporary Internet Files\...\Sharepoint Doc[1].txt
Make sure that path and filename are correct.
I have also tried to open the document as \\sharepoint-serv:26791\sites\mysite\SharePoint%20Doc.txt, still its not working.
If the SharePoint server is located on default port (port 80), this problem doesn't exist.
When I tried to access document on other SharePoint server http://sharepoint-serv/Shared%20Documents, It's working perfectly.
About environment, I am using operating system Windows XP with service pack 2 installed. I am using Visual Studio 2005 and Microsoft Office 2003.
SharePoint server in located in intranet having operating system Windows Server 2003
It seems notepad dialog box/Dot net dialog box can not open documents for port other than 80.
Are there any settings required to solve this problem
(I have already posted same problem in "General Questions" section but haven't found any answer, so I am posting this problem in this Development section)