Link to home
Start Free TrialLog in
Avatar of ccwestbrook
ccwestbrookFlag for United States of America

asked on

ASP.NET web applications as virtual directories of a Sharepoint 2010 site

I have several ASP.NET 3.5 web applications that I need to have run as virtual directory applications on a sharepoint 2010 site.  However when I try to do that it doesn't work.  I thought it had to do with the framework version and tried using different application pools, but to no avail.  Also tried converting the web apps to .NET 4.0 using Visual Studio 2010 also with no luck.  any ideas?
Avatar of ChetOS82
ChetOS82
Flag of United States of America image

What do you mean by "it doesn't work".  Are you getting an error messages?  Most common issue is that each of these applications need to be made applications in IIS.  What version of IIS are you running?
Avatar of ccwestbrook

ASKER

It throws an internal server error 500.  Its Server 2008 R2.  
In IIS, go to the directory that is an application, right click and choose "Convert to Application".  Click OK to accept the default settings.  See if that helps.

You will need more information from the server.  If all you are getting is "500 Internal Server Error" you may need to access the site from the server (using Remote Desktop Connection) or turn off Friendly HTTP Errors in IE.
It is an application in IIS.  I went to try to change the errors section for the app and received the attached error message.  Maybe it is a web.config compatibility issue between versions of .Net or something?  


iis-error.jpg
IIS7 defaults to using .NET 4.0.  You could either change the application pool to use .NET 2.0 (which supports 3.5 as well), or modify your web.config file.

The machine.config file for 4.0 already includes the System.Web.Extension handlers, thus the duplicate error.  You either need to downgrade the app pool to 2.0, or remove the offending httpHandler entries from your web.config.  You can either remove them one at a time until it starts working, or do a Google search to determine which ones to remove (this looks like a good resource: http://stackoverflow.com/questions/1808680/web-application-problems-web-config-errors-http-500-19-with-iis7-5-and-asp-net)
It's strange because the pool is using 2.0.  I can run the application off of a different site on the same server, but when I put it on the sharepoint site it doesn't work even using the same application pool.  
Are you are sure you converted it to an application?  Just having it as a virtual directory isn't sufficient.
Yes, I add it as an application.  It works on one site, but not on the sharepoint site
Here's the IIS console
screen.jpg
Is the applications running under the same apppool as "Sharepoint - 80"?
I am reading (http://www.eggheadcafe.com/software/aspnet/31168652/creating-virtual-directory-under-sharepoint-site-in-iis.aspx) that you may need to add a site exclusion for the Virtual Directory.
Yep, it runs unde the same pool.  I've tried changing pools too.  The application works fine in the WebApps site I created, it just doesn't work in the sharepoint site.  the site exclusions are no longer used as of Sharepoint 2007.  very strange problem
ASKER CERTIFIED SOLUTION
Avatar of ChetOS82
ChetOS82
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
Thanks for your help.  I had to remove those entries, then I had to add a session state module, change the trust level, and it works now