I started getting an error when trying to use AJAX:
soap:ReceiverSystem.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String
res, String arg) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlTextReader.Read() at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.Read()
at System.Xml.XmlReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocolHelper.GetRequestElement() at System.Web.Services.Protocols.Soap12ServerProtocolHelper.RouteRequest()
at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest
request, HttpResponse response, Boolean& abortProcessing) --- End of inner exception stack trace ---
Anyone have any ideas? Apparently the "Data at the root level is invalid" error is caused by malformed XML files... but if I remove the rewrite rule, it works.
The above rule automatically rewrites for ALL subdomains.
The following rewrite works for ajax and rewrites only for the subdomain specified (mubina), but does not work really well when it comes to redirecting to subdomain directories:
From your description above, I'd like to suggest you to check whether your Directory Browsing is disabled,
Enable
directory browsing when you want client browsers to display a Web page that lists the contents of a directory when a request does not specify a document name and IIS cannot return a default document. A default document cannot be returned when IIS does not
find a file in the directory that matches a file name specified in the IIS default document list, or when the Default Document feature is disabled in IIS,
hope it helps,
Regards
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
24 Points
51 Posts
Subdomain rewrite causes AJAX to malfunction
Aug 28, 2013 03:12 PM|cdf53|LINK
After rewriting on my site using
I started getting an error when trying to use AJAX:
soap:ReceiverSystem.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlTextReader.Read() at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.Read() at System.Xml.XmlReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocolHelper.GetRequestElement() at System.Web.Services.Protocols.Soap12ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) --- End of inner exception stack trace ---
Anyone have any ideas? Apparently the "Data at the root level is invalid" error is caused by malformed XML files... but if I remove the rewrite rule, it works.
Member
24 Points
51 Posts
Re: Subdomain rewrite causes AJAX to malfunction
Aug 28, 2013 03:27 PM|cdf53|LINK
The above rule automatically rewrites for ALL subdomains.
The following rewrite works for ajax and rewrites only for the subdomain specified (mubina), but does not work really well when it comes to redirecting to subdomain directories:
All-Star
32817 Points
3815 Posts
Re: Subdomain rewrite causes AJAX to malfunction
Sep 02, 2013 04:34 AM|Angie xu - MSFT|LINK
Hi,
From your description above, I'd like to suggest you to check whether your Directory Browsing is disabled,
Enable directory browsing when you want client browsers to display a Web page that lists the contents of a directory when a request does not specify a document name and IIS cannot return a default document. A default document cannot be returned when IIS does not find a file in the directory that matches a file name specified in the IIS default document list, or when the Default Document feature is disabled in IIS,
hope it helps,
Regards
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.