Solved

Web Applications talking to SharePoint

Posted on 2011-09-16
5
185 Views
Last Modified: 2012-05-12
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
Comment
Question by:rmtactas
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:abhitrig
Comment Utility
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
 
LVL 38

Expert Comment

by:Justin Smith
Comment Utility
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
 
LVL 2

Author Comment

by:rmtactas
Comment Utility
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
 
LVL 38

Accepted Solution

by:
Justin Smith earned 500 total points
Comment Utility
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
 
LVL 2

Author Closing Comment

by:rmtactas
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now