Hi All,
I'm having a very strange issue that I have been unable to resolve for several weeks. I have a Web Part developed against SP 2007 and 2010 that is having an issue running under 2013. This Web Part displays a list of items retrieved by calling
a web service and has an option to view the detail of an item in the list. Selecting this option calls a detail aspx page that is installed in a folder we create during the installation process in the "_layouts" folder.
I can add the Web Part to a page and it successfully calls the Web Service and displays the list of items. So far, so good. However, when I click the option to display the item detail, I get a "500 - Internal Server Error". Hoping
to get more details on the cause, I setup the site config file (turned off customErrors and turned on the debug setting) but that didn't give my any additional error information. I then setup the site in IIS to log 500 errors but that didn't
help either. The server event log was also of no use.
Knowing that the Web Part works on SP07 and SP10, I created a site collection using the "2010 Experience" setting, added the Web Part to a page on that site and it worked fine. I thought this was interesting so, I created another "2010
Experience" site collection and added the Web Part to it, made sure it worked correctly and then converted that site to a 2013 site and the Web Part worked fine on that site as well. At this point to summarize, I have a working Web Part under 2013
if I add it to a page for a "2010 Experience" site or for a "2010 Experience" site that is converted to a 2013 site but not on a "native" 2013 site.
Looking and the urls I noticed that for the 2010 and the 2013 converted site (again converted from a 2010 experience site) look like this when accessing the detail page when that option is selected:
http://mysharepointserver:9402/sites/EventListWebPartTest/_layouts/compulaw/eventdetailpage.aspx?uri=55523
But for the native 2013 site collection the url looks like this:
http://mysharepointserver:47448/sites/EventListWebPartSP13/SitePages/_layouts/compulaw/eventdetailpage.aspx?uri=55523
Examining the urls I noticed that the 2013 site adds "/SitePages/" to the url. If I remove that and change the url to this:
http://mysharepointserver:47448/sites/EventListWebPartSP13/_layouts/compulaw/eventdetailpage.aspx?uri=55523
The detail page displays (although the page styling is messed up).
I suspect the issue is with the injection of “SitePages” into the url. I tried changing the code and calling Page.ResolveUrl instead of using a relative path to the aspx pages in the _layouts folder but with the same result. I even tried replacing
one of the aspx pages with a blank one but I still get the 500 error. It’s obvious that IIS is having an issue accessing the _layouts folder for the site and throwing the error but isn’t including any details on the cause.
Fiddler shows that I get a “401” error just before the “500” error. But apparently this is normal for the security model I selected when the site was created (NTLM, Claims Based Authentication). I get the “401” on the other sites as well which
doesn’t seem to cause any problems there. The IE and Chrome dev tools aren’t helping me either as they only show the 500 but no additional information indicating the cause.
I’m at a complete loss as to what is going on here or what to try next. Does anyone have any ideas what I'm doing wrong or what I can try next? I've been all over the web looking for some direction but nothing has panned out. Any help would
be greatly appreciated.