403 Forbidden immediately after creating web
-
09-12-2019 - |
Question
I can't tell exactly what's causing the 403 Forbidden error (that's literally all of the information I have in the browser regarding the error) but this is the scenario:
I navigate to my application page which creates a sub-site and applies a template.
It creates the sub-site fine (and the logs claim that the application of the template was fine).
It applies a web template - who's feature activated event receiver creates sub-directories in the new sub site's document library and applies custom content types to this document library.
Now, like I say the site is created fine - but the document library sub-directories are not there - and the content types are not applied to the doc library - so I'm assuming for some reason (relating to a 403!?) the event receiver is not being fired - or it's not getting that far.
What I've Tried/Looked Into
- First I checked the ULS logs - there doesn't seem to be any exceptions that I can see that would cause this
- Checked the content types actually exist in the new sub-site - they do
- Tested again on dev machine - this is all working fine on my dev machine - so I know that it's not a case of features being deployed to the wrong level of site/site collection etc.
- Tried removing any code from the featureactivated event receiver, still getting the 403.
Any help HUGELY appreciated.
Please note: I can access the sub site (all it's _layouts pages and the default WelcomePage) without any access problems.
Solution
I had a similar problem. After I created my Web Application I received a strange error, But my Web Application was created, so I continued creating a Site Collection on it but received "403 forbidden" in the end.
These instructions helped me: http://support.microsoft.com/kb/2543306
After I raised the timeout parameters in the IIS I recreated the WebApp and the Site Collection.
I hope it can be of some help for you or others.
OTHER TIPS
Raising Timeout parameter in IIS and recreating Web App & Site Collection worked for me as well. https://support.microsoft.com/en-us/help/2543306