Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

Web Applications talking to SharePoint

I have been working on a web application recently and have hit a problem with integration into sharepoint.

Basically the web application is a stand alone website,  which uses sharepoint document libraries to store documents.

I am using the sharepoint object model to read the content (HTML Files) from the libraries to the page in the web application.

Everything works fine on my dev machine,  but when i put it on the server, any page which is talking to sharepoint to recover a document from the document library stalls when loading for about 3 to 4 seconds.

If i comment out the code which looks at the sharepoint document library and try exactly the same process,  the page loads very fast.

I am using windows Authentication on the web app,  and have set up SPN's for kerberos and the app pool accounts.

Any ideas why the web app should slow down so much when talking to sharepoint and any ideas how to stop it slowing down ?

The document library has about 5200 documents in it,  which are stored in a date folder structure so that each container does not contain any more than 50 or so other documents / containers....

I have now tested this on a couple of servers and the problem is consistent throughout including one which is a brand new install with SQL / SharePoint on and thats it...

Any help appreciated..
0
rmtactas
Asked:
rmtactas
  • 2
  • 2
1 Solution
 
abhitrigCommented:
There could be a variety of factors:

-Are you creating web objects for every request?
-The calls are going through ISA/Firewall?
-The SharePoint itself might be slow. Remember, all these files are stored in SP databases.
-The antivirus might be kicking in when the html files are downloaded to your web application/temp location

If its static html files, consider caching. Also try to trace the calls using fiddler/SP trace logs

0
 
Justin SmithSr. System EngineerCommented:
How many documents are being returned on the load?  All of them?

You may try creating a test view that only pulls back maybe 1000 docs, and see if that loads quicker?
0
 
rmtactasAuthor Commented:
Basically what is happening is that a link from the document library with the Doc ID opens up another web application,  this is running as a seperate IIS website on the box with its own app pool etc.
When the page in the web application some code runs on the SharePoint object to retrieve the document (Which is always an HTML Email),  this then reads the file and renders it to the screen via a literal control.

The point where the application slows right down is not when it attaches to sharepoint or when it reads the file,  it is when it get the file from the document library.

(See Below for Code)

I have tried to do this using SPQuery and GetItemByID, both seem equally slow.

There is an ISA Server on the the production machine,  but i am getting this same slowdown with test server set up without this.

On the production server we have disabled scanning with the AV on all the appropriate folders.



Dim htmlFile As SPFile = RFQDocLib.Items.GetItemById(docID).File

Open in new window

0
 
Justin SmithSr. System EngineerCommented:
By including the .items in your call, you are actually returning all items in that library before selecting the one you want.  You should use RFQDocLib.GetItemById(docID).File instead.
0
 
rmtactasAuthor Commented:
Guess this was one of the ocassions where you cannot see the wood for the trees lol, fairly obvious when you think about it, takes a Pro to point it out.

Thanks for all the help guys.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now