Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Web Applications talking to SharePoint

Posted on 2011-09-16
5
Medium Priority
?
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:abhitrig
ID: 36550345
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
ID: 36554196
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
ID: 36558709
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 2000 total points
ID: 36560301
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
ID: 36566232
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

704 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