locked
New virtual directory / webservice - 500 Internal Server Error RRS feed

  • Question

  • Hello, I am getting a 500 Internal Server error when I try to access a .NET asmx web service.  Here is what I have done:

     

    1) Removed asmx from Blocked File Types in central admin

    2) Created an "Application" under the SharePoint web site  (we have multiple sites, using host headers and SSL)

    3) Gave the new application its own Application Pool with .NET 4.0

    4) Restarted the app pools for both the SharePoint site and the web service app

     

    I read that I needed to restart IIS on the servers for SP to exclude the path after creating the application, but cant because other SP web sites run on those servers as well.  Any ideas is appreciated. 

     

    Also, do I need to somehow disable web.config inheritance when doing this? 

     

    I should add that I have to do something like this due to our weird network.  Putting the webservice on another server wont work due to cross-domain script issues in IE.



    • Moved by Mike Walsh FIN Sunday, July 17, 2011 7:29 AM not general (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    Saturday, July 16, 2011 10:30 PM

Answers

  • Hi,

    I think your going to have many problems in attempting to support .NET 4 as a Child of a SharePoint 2007 site using .NET 2.0.

    1. Yes, disable inheritance or you will merge .Net 2x with .Net 4x web.Config entries

    2. Why not create a seperate IISWebSite for the .NET App and consume the service through SharePoint.

    3. We have been consuming webServices with the dataview WebPart from external sources without any cross domina violations since 2003 check out Bill Simser post on consuming MoneyCentral...http://weblogs.asp.net/bsimser/archive/2004/12/26/332467.aspx

    Please not the following:

    WSRP – Consumer

    SharePoint provides an out-of-the-box web part called “WSRP Consumer Web Part”, which allows you to display a WSRP portlet in a MOSS page. Reference: How to use the WSRP Consumer Web Part: http://www.wssdemo.com/blog/Lists/Posts/Post.aspx?List=d5813c18%2D934f%2D4fd6%2D9068%2D5cdd59ce56ba&ID=234

    Web Services – Consumer

    SharePoint can leverage web services exposed by other applications using the Business Data Catalog (BDC). This is done using an XML-based definition of what is exposed by that application and usually involves describing entities, properties and actions that are exposed by that application. Once the BDC definition is in place, you can expose those via the BDC-related web parts. You can also integrate the BDC data as a content source for Search. Another option is to write a custom web part that consumes the external web service and provides a user interface to interact with it. Reference: Business Data Catalog Overview: http://msdn2.microsoft.com/en-us/library/ms551230.aspx

    P.S.: Also, as suggested by Ian Morrish, the Data Form Web Part (known as Data View Web Part in the previous version) can render Web Services and XML using XSL. For details around this, check http://www.sharepointblogs.com/ssa/archive/2007/02/24/showing-web-service-data-in-a-data-view-web-part.aspx

    I would not recommend the approach you have taken, it is not necessary to host the .NET 4 WebService as a child of a SharePoint webApp in order to consume it within SharePoint..

     

    -ivan


    Ivan Sanders My LinkedIn Profile, My Blog, @iasanders.
    • Marked as answer by Scott Hutter Monday, July 18, 2011 1:22 AM
    Sunday, July 17, 2011 9:10 PM

All replies

  • Hi,

    I think your going to have many problems in attempting to support .NET 4 as a Child of a SharePoint 2007 site using .NET 2.0.

    1. Yes, disable inheritance or you will merge .Net 2x with .Net 4x web.Config entries

    2. Why not create a seperate IISWebSite for the .NET App and consume the service through SharePoint.

    3. We have been consuming webServices with the dataview WebPart from external sources without any cross domina violations since 2003 check out Bill Simser post on consuming MoneyCentral...http://weblogs.asp.net/bsimser/archive/2004/12/26/332467.aspx

    Please not the following:

    WSRP – Consumer

    SharePoint provides an out-of-the-box web part called “WSRP Consumer Web Part”, which allows you to display a WSRP portlet in a MOSS page. Reference: How to use the WSRP Consumer Web Part: http://www.wssdemo.com/blog/Lists/Posts/Post.aspx?List=d5813c18%2D934f%2D4fd6%2D9068%2D5cdd59ce56ba&ID=234

    Web Services – Consumer

    SharePoint can leverage web services exposed by other applications using the Business Data Catalog (BDC). This is done using an XML-based definition of what is exposed by that application and usually involves describing entities, properties and actions that are exposed by that application. Once the BDC definition is in place, you can expose those via the BDC-related web parts. You can also integrate the BDC data as a content source for Search. Another option is to write a custom web part that consumes the external web service and provides a user interface to interact with it. Reference: Business Data Catalog Overview: http://msdn2.microsoft.com/en-us/library/ms551230.aspx

    P.S.: Also, as suggested by Ian Morrish, the Data Form Web Part (known as Data View Web Part in the previous version) can render Web Services and XML using XSL. For details around this, check http://www.sharepointblogs.com/ssa/archive/2007/02/24/showing-web-service-data-in-a-data-view-web-part.aspx

    I would not recommend the approach you have taken, it is not necessary to host the .NET 4 WebService as a child of a SharePoint webApp in order to consume it within SharePoint..

     

    -ivan


    Ivan Sanders My LinkedIn Profile, My Blog, @iasanders.
    • Marked as answer by Scott Hutter Monday, July 18, 2011 1:22 AM
    Sunday, July 17, 2011 9:10 PM
  • Thank you for your reply.  The problem with a separate web site is that since this is a farm configuration using host headers, I cant seem to get the same host header to work on a different port.  Not sure why.  The site works, but under that configuration, it just times out.

    I will look into your other suggestions.  Thanks again

     

     

    Monday, July 18, 2011 1:22 AM