I have a full screen provider hosted app (.NET MVC 5) with chrome control (to implement styles of the host web) which uses CSOM to make requests to the host web.

Weeks ago I thought I would need a JavaScript ClientContext, so I followed instructions to get an AppWeb created to wich I can make REST calls using RequestExecuter.

Since this change, when opening the app (via appredirect.aspx) a request parameter SPAppWebUrl is appended to the url.

the problem: If the request parameter SPAppWebUrl exists, the file https://app-*****.site.com/apps/myApp/_layouts/15/defaultcss.ashx is referenced, which results in a broken layout. If I remove this parameter, it's all right.

Today I know I don't want and need the additional app web, so I removed the empty feature and Elements.xml causing its creation.

So how can I prevent creating the app web or how can I prevent the adding of SPAppWebUrl to the entry url? I simply don't want it but cannot go back to the state before. The app web seems always be created.

1 Answer 1


I found the solution:

As long as a Package\Package.package is included in the Visual Studio project, an app web will be created.

It seems like a bug, but it was not possible to remove or delete the folder with Visual Studio.

So I deleted the Package folder using Windows Explorer and removed the specific lines from my .csproj file. Now the package isn't included anymore and the app will be installed without an app web.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.