locked
Error when creating Web App RRS feed

  • Question

  • Hi, Cant create a Web App on Our SharePoint 2013 Dev server. (March 2016 CU)

    Error:

    System.Xml.XmlException: Invalid character in the given encoding. Line 746, position 41.   
     at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)    
     at System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount)    
     at System.Xml.XmlTextReaderImpl.GetChars(Int32 maxCharsCount)    
     at System.Xml.XmlTextReaderImpl.ReadData()    
     at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)    
     at System.Xml.XmlTextReaderImpl.ParseAttributes()    
     at System.Xml.XmlTextReaderImpl.ParseElement()    
     at System.Xml.XmlTextReaderImpl.ParseElementContent()    
     at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)    
     at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)    
     at System.Xml.XmlDocument.Load(XmlReader reader)    
     at System.Xml.XmlDocument.Load(String filename)    
     at Microsoft.SharePoint.Administration.SPAspConfigurationFile.Copy(FileInfo srcFile, DirectoryInfo destDir, String validationKey, String decryptionKey, Boolean bMergeWebConfig, Boolean bBackupExistingFile)    
     at Microsoft.SharePoint.Administration.SPWebApplication.InstallFiles(DirectoryInfo vrPath, String validationKey, String decryptionKey)    
     at Microsoft.SharePoint.Administration.SPWebApplication.Provision()    
     at Microsoft.SharePoint.ApplicationPages.ExtendVirtualServerPage.BtnSubmit_Click(Object sender, EventArgs e)    
     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)    
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Any Ideas?


    Wednesday, September 7, 2016 11:06 AM

Answers

All replies

  • Hi Danie Claassen,

    What do you mean the web app? Is the web application or hosted app? How did you create the web app? And the error may occur in one xml file.

    For troubleshooting the issue, you could check things below:

    1. Check the detailed information about the issue in the ULS log.

    2. Reset IIS to check if it can work.

    More references:

    Why do I get the error 'Invalid character in the given encoding'.

    http://support.liquid-technologies.com/kb/a84/why-do-i-get-the-error-invalid-character-in-the-given-encoding.aspx

    Character Encoding in the .NET Framework.

    https://msdn.microsoft.com/en-us/library/ms404377(v=vs.110).aspx

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, September 8, 2016 2:55 AM
  • Hi Sara

    Trying to create the Web App via central Admin. On a server:port with no host header. That bit above is from the ULS log. Will see what else i can find in ULS with the next error.

    Tried a few things but let me start from scratch and troubleshoot this properly.

    This is probably the first web app I'm trying to create since i upgraded to the March 2016 CU... Think i will do a PSconfig as-well if iisreset dont work.

    IISReset - No Luck

    The Web App Creates but does not function properly...Can create a site collection ontop of it but cant access it.

    Logs:

    Quite a few for the correlation but here are the obvious errors:

    Application error when access /_admin/extendvs.aspx, Error=Invalid character in the given encoding. Line 746, position 41.  
     at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)    
     at System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount)    
     at System.Xml.XmlTextReaderImpl.GetChars(Int32 maxCharsCount)    
     at System.Xml.XmlTextReaderImpl.ReadData()    
     at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)    
     at System.Xml.XmlTextReaderImpl.ParseAttributes()    
     at System.Xml.XmlTextReaderImpl.ParseElement()    
     at System.Xml.XmlTextReaderImpl.ParseElementContent()    
     at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)    
     at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)    
     at System.Xml.XmlDocument.Load(XmlReader reader)    
     at System.Xml.XmlDocument.Load(String filename)    
     at Microsoft.SharePoint.Administration.SPAspConfigurationFile.Copy(FileInfo srcFile, DirectoryInfo destDir, String validationKey, String decryptionKey, Boolean bMergeWebConfig, Boolean bBackupExistingFile)    
     at Microsoft.SharePoint.Administration.SPWebApplication.InstallFiles(DirectoryInfo vrPath, String validationKey, String decryptionKey)    
     at Microsoft.SharePoint.Administration.SPWebApplication.Provision()    
     at Microsoft.SharePoint.ApplicationPages.ExtendVirtualServerPage.BtnSubmit_Click(Object sender, EventArgs e)    
     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)    
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    System.Xml.XmlException: Invalid character in the given encoding. Line 746, position 41.   
     at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)    
     at System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount)    
     at System.Xml.XmlTextReaderImpl.GetChars(Int32 maxCharsCount)    
     at System.Xml.XmlTextReaderImpl.ReadData()    
     at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)    
     at System.Xml.XmlTextReaderImpl.ParseAttributes()    
     at System.Xml.XmlTextReaderImpl.ParseElement()    
     at System.Xml.XmlTextReaderImpl.ParseElementContent()    
     at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)    
     at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)    
     at System.Xml.XmlDocument.Load(XmlReader reader)    
     at System.Xml.XmlDocument.Load(String filename)    
     at Microsoft.SharePoint.Administration.SPAspConfigurationFile.Copy(FileInfo srcFile, DirectoryInfo destDir, String validationKey, String decryptionKey, Boolean bMergeWebConfig, Boolean bBackupExistingFile)    
     at Microsoft.SharePoint.Administration.SPWebApplication.InstallFiles(DirectoryInfo vrPath, String validationKey, String decryptionKey)    
     at Microsoft.SharePoint.Administration.SPWebApplication.Provision()    
     at Microsoft.SharePoint.ApplicationPages.ExtendVirtualServerPage.BtnSubmit_Click(Object sender, EventArgs e)    
     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)    
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Xml.XmlException: Invalid character in the given encoding. Line 746, position 41.    
     at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)    
     at System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount)    
     at System.Xml.XmlTextReaderImpl.GetChars(Int32 maxCharsCount)    
     at System.Xml.XmlTextReaderImpl.ReadData()    
     at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)    
     at System.Xml.XmlTextReaderImpl.ParseAttributes()    
     at System.Xml.XmlTextReaderImpl.ParseElement()    
     at System.Xml.XmlTextReaderImpl.ParseElementContent()    
     at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)    
     at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)    
     at System.Xml.XmlDocument.Load(XmlReader reader)    
     at System.Xml.XmlDocument.Load(String filename)    
     at Microsoft.SharePoint.Administration.SPAspConfigurationFile.Copy(FileInfo srcFile, DirectoryInfo destDir, String validationKey, String decryptionKey, Boolean bMergeWebConfig, Boolean bBackupExistingFile)    
     at Microsoft.SharePoint.Administration.SPWebApplication.InstallFiles(DirectoryInfo vrPath, String validationKey, String decryptionKey)    
     at Microsoft.SharePoint.Administration.SPWebApplication.Provision()    
     at Microsoft.SharePoint.ApplicationPages.ExtendVirtualServerPage.BtnSubmit_Click(Object sender, EventArgs e)    
     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)    
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
     at System.Web.UI.Page.HandleError(Exception e)    
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
     at System.Web.UI.Page.ProcessRequest()    
     at System.Web.UI.Page.ProcessRequest(HttpContext context)    
     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Starting a PSConfig via the wizard. Failed on the Web App that failed...Deleting them and restarting PSConfig.

    If this PSConfig passes and it still fail i will create a Web App Via powershell and check if it works that way....Assume i would get same error but will test.


    Thursday, September 8, 2016 6:51 AM
  • Ok...Now the PSConfig was successful.

    Retrying Creating Web App via Central Admin. Same Error

    Now i will try powershell (Think i should have removed the -SecureSocketsLayer but dont think it made a difference)

    Thursday, September 8, 2016 7:35 AM
  • Hi Danie Claassen,

    For troubleshooting the issue, you could check things below:

    1. Delete the web application which is not available in the Center Administration.

    2. Clear the SharePoint configuration cache. For more detailed information, you could refer to the article below.

    SharePoint 2010 / 2013: Clearing the Configuration Cache.

    https://spcachecleaner.codeplex.com/

    If the issue still exists, uninstall and re-install the SharePoint products.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    • Edited by Sara Fan Friday, September 9, 2016 12:16 AM
    Thursday, September 8, 2016 9:24 AM
  • Ok, still trying to get to the bottom of this...
    Failing on a PowerShell PSConfig:
    PSCONFIG.EXE -cmd upgrade -inplace b2b -wait -force

    Restarted the Server
    Still got the error

    Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object SPUpgradeSession Name=Upgrade-, in the PSCONFIG (17344) process, on machine . View the tracing log for more information about the conflict.

    Running Command: stsadm -o setproperty -pn command-line-upgrade-running -pv No

    Restarting the SharePoint Timer service.
    Re-running the psconfig.

    Still failing.
    New Error in Logs:

    Error running SQL DDL Script:               IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[Versions]') .... System.Data.SqlClient.SqlException (0x80131904): CREATE TABLE permission denied in database 'AppServiceDB'.    

    Granting access to DB's for Instalation account (Owner, not sure if this is right...But Dev (:  )

    SettingsServiceDB and AppServicesDB
    (One of the reasons im sitting here is trying to configure App Catalog and that is what i need the Web App for so those 2 DB's are new)

    And PSConfig Completed.

    Now creating Web App Again...Update will follow soon.
    Thursday, September 8, 2016 12:03 PM
  • Nope, same error.

    Invalid character in the given encoding. Line 746, position 41.

    Thursday, September 8, 2016 12:05 PM
  • Hi Danie Claassen,

    I have updated the reply. You could check it.

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, September 9, 2016 12:37 AM
  • Ok, cleared the cache. No luck... 

    Uninstall and reinstall.....I have done this side by side but never had to uninstall & re-install.

    So how i see this working:

    Uninstall

    Reinstall

    Connect to config DB

    Actually it should be quick and easy or am i missing something?

    Also...This error seems to appear in the Application log everytime i get the error...Does not look related but you never know...

    The Open Procedure for service "BITS" in DLL "C:\Windows\System32\bitsperf.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

    and

    The Open Procedure for service "WmiApRpl" in DLL "C:\Windows\system32\wbem\wmiaprpl.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

    And sometimes more...

    Granting WSS_WPG access to registry according to this

    https://sharepoint4admin.wordpress.com/2014/11/21/event-1008-errors-in-windows-server-2012-after-installing-sharepoint-2013/

    Then also these when i delete the broken web app's

    There was an error during processing of the managed application service auto-start for application pool: 'SecurityTokenServiceApplicationPool'.  Some application services may not have been processed correctly.  Please check the configuration for application service auto-start for the application(s) assigned to this application pool.  The data field contains the error code.

    Really trying here not to reinstall SharePoint. (:

    Friday, September 9, 2016 7:25 AM
  • Hi Danie Claassen,

    For troubleshooting the issue, you could check things below:

    1. Increase the property "shutdown time limit" for the central administration application pool.

    Go into IIS, go to application pool, right click the central admin application pool, and change the property "shutdown time limit" for the central admin application pool from 90 to 300 seconds.  Restart IIS and try to create new web-application.

    For more detailed information, you could refer to the article below

    Internet Explorer cannot display the webpage when creating new Web Application in SharePoint 2013.

    https://absolute-sharepoint.com/2013/11/internet-explorer-display-webpage-creating-new-web-application-sharepoint-2013.html

    2. To restart the W3SVC and HTTP services by using the net command below, open the windows PowerShell as administrator.

    net stop w3svc

    net stop http

    net start w3svc

    net start http

    More reference:

    Event ID 2303 — IIS Worker Process Availability.

    https://technet.microsoft.com/en-us/library/dd638642%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, September 12, 2016 1:33 AM
  • Already wanted to do this but was already on 300...

    Changing to 600 and testing. No luck.

    What procedure would one follow to uninstall and reinstall SharePoint?

    Guess we can just add remove programs and uninstall.

    Reinstall with same CU.

    Connect to existing Config DB.

    Thanks


    Monday, September 12, 2016 8:42 AM
  • Hi Danie Claassen,

    To uninstall the SharePoint 2013, you could refer to the article below.

    How to Uninstall SharePoint 2013 - Complete Steps.

    http://www.sharepointdiary.com/2015/05/how-to-uninstall-sharepoint-2013.html

    To install the SharePoint 2013, you could refer to the article below.

    Install and configure SharePoint 2013.

    https://technet.microsoft.com/en-us/library/cc262957.aspx

    Best regards,

    Sara Fan


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Proposed as answer by Victoria Xia Wednesday, September 14, 2016 9:33 AM
    • Marked as answer by Victoria Xia Friday, September 16, 2016 7:46 AM
    Tuesday, September 13, 2016 9:29 AM
  • Thanks

    Not sure if the part of deleting the databases is correct but will follow that, not delete the databases and connect to other DB's in SQL...

    Saw this was marked as answer...let him it is. Will update when im done but cant take that server down at the moment.

    Friday, September 16, 2016 8:13 AM
  • Hi Danie Claassen,

    Thanks for your sharing and understanding.

    Best regards,

    Sara Fan

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, September 16, 2016 8:16 AM
  • Hi Guy's

    Eventually got a window to reinstall SharePoint.

    Completed and <g class="gr_ gr_65 gr-alert gr_gramm gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="65" id="65">issue</g> is resolved.

    Thanks for the support Sara

    Thursday, December 1, 2016 8:15 AM
  • Hi Danie Claassen,

    It is very happy that you have resolved your problem.

    Thank you for your sharing and it will help others have the same issue.

    Best regards,

    Sara Fan

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    • Edited by Sara Fan Thursday, December 1, 2016 8:29 AM
    Thursday, December 1, 2016 8:29 AM