none
The Web application could not be found RRS feed

  • Question

  • Hello,

    • I have a machine that has s share point portal .
    • I create WCF on the same machine and set it on IIS and the identity of application pool is the administrator of machine 

              PlatformTarget : 64 bit ,  Framework : .net 4.5

    • I have added sharepoint.dll as refrenece in WCF project.
    • The identity 
    • I have a method on the WCF :

              public void Test(string siteCollectionURL)
              {

                    SPSite siteCollection = new SPSite(siteCollectionURL);

               }

    • When I call this method , I get the following Error :

             The Web application at http://[servername]:9090/sites/Dhofar could not be found. Verify that you have typed the      URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

    • Iam sure the url is correct  . So how can I solve it

    ASk

    Wednesday, August 20, 2014 1:27 PM

All replies

  • Hi,

    For a better trouble shooting, I suggest you do as the followings:

    You can recreate a new WCF Service for SharePoint to test whether it works.

    More information about how to create WCF Service for SharePoint:

    http://www.thesharepointblog.net/Lists/Posts/Post.aspx?List=815f255a-d0ef-4258-be2a-28487dc9975c&ID=64

    http://msdn.microsoft.com/en-us/library/ff521584(v=office.14).aspx

    Best regards,

    Zhengyu Guo


    Zhengyu Guo
    TechNet Community Support

    Thursday, August 21, 2014 7:14 AM
  • Hi,

    Based on your description, I'm ruling out the probability of 'invalid url'. I've seen this types of error with 32-bit build DLLs. Since you have setup IIS platform 64 bit, can you please build your WCF project in 64-bit instead of "Any CPU"? Also the SharePoint Site URL is pointing to a site in the same server where WCF hosted? Maybe you know already, you can only access SharePoint sites using SharePoint Server Object Model that are hosted in the same server.


    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

    Thursday, August 21, 2014 8:08 AM
  • Hello ,

     Thanks for your reply .

      I have already done all the following ;

    • I use Windows server 2008-R2 64-bit .
    •     I build WCF project in 64-bit instead of "Any CPU.
    • I  WCF and share point are on the same server .

     So I don't know  where this  exception comes from .


    ASk

    Sunday, August 24, 2014 11:39 AM
  • Can you just try the same url in a console app (possibly 64-bit build)? using code snippet like below:

    using (var site = new SPSite(siteUrl))
    {
        using (var web = site.OpenWeb())
        {
        }
    }


    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

    Monday, August 25, 2014 5:02 AM
  • Hi,

    Check the below site

    http://blog.sharepointrx.com/2009/08/26/the-web-application-at-url-could-not-be-found-verify-that-you-have-typed-the-url-correctly-if-the-url-should-be-serving-existing-content-the-system-administrator-may-need-to-add-a-new-request-url/

    Also u can try building your application on x64 CPU .

    Thanks

    -Rahul


    Monday, August 25, 2014 5:09 AM