0

I'm working on SharePoint 2010 environment.

I'm trying to create new web application.

but it shows error like below

enter image description here

Please suggest something

1
  • Can you see in event viewer for any particular log added while this error occurs? Commented Mar 31, 2017 at 7:48

2 Answers 2

1

You can try creating the web application using Powershell as below:

New-SPWebApplication -Name "Contoso Internet Site" -Port 80 -HostHeader sharepoint.contoso.com -URL "https://www.contoso.com" -ApplicationPool "ContosoAppPool" -ApplicationPoolAccount (Get-SPManagedAccount "DOMAIN\jdoe")

New-Spwebapplication

I had faced this issue some time back when trying to create a web application using Central Admin UI. So, as M. Qassas correctly mentioned, that changing registry keys is extremely dangerous. I created the web app using the powershell, it took some around 15-20 mins, but the web app was created successfully.

8
  • hi Gautam, the code provided by you is a working code in PS ? if i am not using hostheader, what changes need to added/removed?
    – dasarp
    Commented Mar 31, 2017 at 8:43
  • 1
    Yes its working code, you can remove the hostheader parameter from the command. The only thing that is required is Name and ApplicationPool. The code would be somewhat as below: New-SPWebApplication -Name "Contoso Internet Site" -Port 1234 -ApplicationPool "ContosoAppPool" -ApplicationPoolAccount (Get-SPManagedAccount "DOMAIN\jdoe") Commented Mar 31, 2017 at 8:46
  • i have tried to create a web appln using the PS , by following the link : blogs.msdn.microsoft.com/rcormier/2012/09/01/… , but due to some changes in SP 2010 / SP 2013 arch or something, it ddint work for me. may be because of get-spmanagedaccount command throws an error , if am not wrong. Thats why I asked the doubt. Thanks , lemme also try to create a web appln with your code , and update here .Because this code is critical when we create web apps in a prod/ pre-prod/ staging/dev env at on shot!
    – dasarp
    Commented Mar 31, 2017 at 8:52
  • Cant we create a application pool is IIS, using a different powershell API, i think , we need to create that apppool, separately. i remember creating the apppool , but thats also was stuck with some errors. with a specific .net framework ..etc etc
    – dasarp
    Commented Mar 31, 2017 at 8:55
  • 1
    Check this link to create application pool - social.technet.microsoft.com/wiki/contents/articles/… , will help you create application pool. Commented Mar 31, 2017 at 9:00
3

Maybe it's a Kerberos authentication issue that occurs when setting Authentication Provider to (Negotiate). so try to select NTLM and check if it is working.

Another reason, the IIS need to be configured to accept larger headers in the registry. MS KB article explains all those settings: http://support.microsoft.com/kb/820129

To Configure IIS to accept larger headers, You will need to adjust The MaxRequestBytes and MaxFieldLength registry keys to in the registry at:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters\
  • MaxFieldLength

    • Default Value: 16384
    • Min – Max Value to set: 64 – 65534 (64kb) bytes
    • Sets an upper limit for each header. See MaxRequestBytes. This limit translates to approximately 32k characters for an URL.
  • MaxRequestBytes

    • Default value: 16384
    • Min-Max value to set: 256 – 16777216 (16MB) bytes
    • Determines the upper limit for the total size of the Request line and the headers. Its default setting is 16KB. If this value is lower than MaxFieldLength, the MaxFieldLength value is adjusted.

Note: Changing these registry keys can be considered extremely dangerous. These keys allow larger HTTP packets to be sent to IIS, which in turn may cause Http.sys to use more memory and may increase vulnerability to malicious attacks.

For more details check

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.