The remote server returned an unexpected response: (405) Method Not Allowed

Answered The remote server returned an unexpected response: (405) Method Not Allowed

  • Saturday, August 18, 2012 3:17 PM
     
     

    I created a SharePoint autohosted application, and removed the web project, and changed AppManifest.xml to the followings:

    <?xml version="1.0" encoding="utf-8" ?>
    <App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest"
         Name="LocalMenu"
         ProductID="{bec8327f-c2a7-40b8-9fd5-5e163c9a78c1}"
         Version="1.0.0.0"
         SharePointMinVersion="15.0.0.0"
    >
      <Properties>
        <Title>LocalMenu</Title>
        <StartPage>https://localhost:44319/Default.aspx?{StandardTokens}</StartPage>
      </Properties>

      <AppPrincipal>
        <RemoteWebApplication ClientId="5df27d08-ff82-4a8c-a452-a21c2e3f5536" />
      </AppPrincipal>

      <AppPrerequisites> 
        <AppPrerequisite Type="AutoProvisioning" ID="RemoteWebHost" /> 
      </AppPrerequisites> 
    </App>

    But while I start it with Visual Studio 2012 RC, I get the following error:

    Error occurred in deployment step 'Install App for SharePoint': The remote server returned an unexpected response: (405) Method Not Allowed.

    And the app is installed on Office365 after that, but it says "Sorry, something went wrong with adding the app. Click to retry." And I cannot remove it.

    While I click the "Start" button again in Visual Studio, I get the following error:

    Error 1 Error occurred in deployment step 'Uninstall App for SharePoint': Value cannot be null.
    Parameter name: value

    Can anyone explain this for me? Thank you.



    • Edited by Peter SPO Saturday, August 18, 2012 3:18 PM
    • Edited by Peter SPO Saturday, August 18, 2012 3:18 PM
    •  

All Replies

  • Saturday, August 18, 2012 3:20 PM
     
     

    And even I use the following AppPrerequisites:

      <AppPermissionRequests>
        <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="Write" />
      </AppPermissionRequests>

    I got the same error.

  • Saturday, August 18, 2012 3:40 PM
     
     

    It is seemed that I found a walk-around:

    Upload the app file to the App Catalog site, and add it to the developer site, it works.

    After that, to start the app in Visual Studio works also, no error any more.

    Is it a bug of Visual Studio 2012 rc? And what's the difference between to deploy the app with App Catalog site and in Visual Studio 2012? Thanks.

  • Monday, August 20, 2012 8:04 PM
    Moderator
     
     

    Hi Peter - It is not clear to me why you created an auto app and then removed the web project.  If you don't need the web project you should create a SharePoint hosted app.  Can you explain what type of app you are trying to build and especially what types of SharePoint artifacts you are using (list, pages, etc...)

    Mike Morton - Senior Program Manager - Visual Studio

  • Tuesday, August 21, 2012 7:38 PM
    Moderator
     
     

    Hey Peter, yes that worked because you manually reinstalled the app. The suggestion I made in this other thread can also work. You probably experienced an intermitency with the service.

    http://social.msdn.microsoft.com/Forums/en-US/appsforsharepoint/thread/f33ea9d6-a846-42ce-8a5b-55f5306abe5d

    Thanks

  • Wednesday, August 22, 2012 2:42 AM
     
     

    Hi Humberto, thank you, sure, I experienced the intermitency, but I can reproduce this issue this week still, so I think maybe it is not a part of the intermitency.

  • Wednesday, August 22, 2012 3:10 AM
     
     Answered

    Hi Mike, thank you, I think I made a fault, I should use a provider-hosted app, I'm using Azure(cloud.net), and I need to use the Azure emulator, so I need to remove the web project and use the one deployed on Azure.

    If I use the StartPage with the fixed host and a fixed ClientId in the provider-hosted app, it works properly.

    Maybe office365 will check the StartPage and ClientId for the autohosted app, so I got the error, thank you.

    • Marked As Answer by Peter SPO Wednesday, August 22, 2012 3:10 AM
    •