Link to home
Start Free TrialLog in
Avatar of rmtactas
rmtactasFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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..
Avatar of abhitrig
abhitrig
Flag of United States of America image

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

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?
Avatar of rmtactas

ASKER

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

ASKER CERTIFIED SOLUTION
Avatar of Justin Smith
Justin Smith
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.