.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Web only error: '0' is an unexpected token. The expected token is '"' or '''.

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :SharePoint

I have a web-enabled InfoPath form that submits data to various sources using web services. Most of the data connections work fine and they all work when testing in the InfoPath client. The only error message I have been able to get out of the SharePoint logs (information/verbose) is this:

Timestamp               Process                                  TID    Area                           Category                       EventID Level      Message  Correlation
09/23/2010 09:08:03.35  w3wp.exe (0x1834)                        0x1B44 Forms Server                   Forms Services Runtime - Data C 82g0 Warning  Form submiss

View Complete Post

More Related Resource Links

ERROR: '"' is an unexpected token. Expecting white space.


I have a project (exe) that calls my web services to extract some data and writes a result message in a text file. When I run this from the local machine where I am hosting the web services and the project exe, It runs fine and results are written in a text file as expected. But when I run this exe from another machine in the network, I get the following error:

ERROR: '"' is an unexpected token. Expecting white space. Line 1, position 50.

Stack Trace:
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.DtdParserProxy.System.Xml.IDtdParserAdapter.T
hrow(Exception e)
   at System.Xml.DtdParser.Throw(String res, String arg, Int32 lineNo, Int32 lin
   at System.Xml.DtdParser.ParseExternalId(Token idTokenType, Token declType, St
ring& publicId, String& systemId)
   at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset)
   at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)
   at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean prese
   at System.Xml.XmlDocument.Load(XmlRe

LINQ to SQL compiler error CS1519: Invalid token 'void' in class, struct, or interface member decl

I get the following compiler errors when creating my first LINQ to SQL class (I just dragged a table "ProfileExtended" onto the designer and hit build):DataClasses.designer.cs(31,11): error CS1519: Invalid token 'void' in class, struct, or interface member declaration these are the offending lines of autogenerated code:#region Extensibility Method Definitions  partial void OnCreated();  partial void InsertProfileExtended(ProfileExtended instance);  partial void UpdateProfileExtended(ProfileExtended instance);  partial void DeleteProfileExtended(ProfileExtended instance);  #endregion

Token-based server access validation failed with an infrastructure error

Hi We have a new Win 2008 Enterprise x64 server running SQL 2008When we try to connect to the server using Windows Authentication, from a user account which is a domain administrator, we get the following message:"Token-based server access validation failed with an infrastructure error"What needs to be configured here for this to work ?ThanksBruce

Login failed for user:Token-based server access validation failed with an infrastructure error


I would appreciate help with the following issue:


I have created a local group in our SQL 2008 server and added two Windows user accounts "DOMAIN\UserName"  I  then added the local group to the database and granted read only access.


The users are trying to link tables using MS Access using and ODBC connection and getting the following error.

Users are not system administrators.


Date                      6/30/2010 1:01:54 PM

Log                         SQ

extra token error on linked server query


I am writing a query across a linked server in SQL Server 2005 and am getting the error below about an extra token.



OLE DB provider "MSDASQL" for linked server "Live_Navision" returned message "[Navision a/s][Navision Attain ODBC Driver]Unexpected extra token: .".

Msg 7321, Level 16, State 2, Line 1

An error occurred while preparing the query "select ManitouSerialno from Navision.dbo.InterfaceSecuritySystemsLLC$CustomerTable" for execution against OLE DB provider "MSDASQL" for linked server "Live_NAVISION".

Lee Markum

Error trying to set Correlation Token at runtime for ReAssigning Task inside while loop.


Hello Friends,

I have developed a custom sequential WF in VS 2010 using custom WorkFlow Content Type and ASPX forms.

Requirements are as below:

1.WF creates an approval task for User A. If User A rejects,then WF completes.
2.If User A approves,task is assigned to User B. If User B approves,then WF completes.
3.Is User A approves and User B rejects,then I need to ReAssign the task to User A.

I am facing problems in the 3rd point above.
I have a while loop having a Sequence Activity and the activities: CreateTaskWithContentType,onTaskChanged and CompleteTask are inside the Sequence Activity.

I am aware that the Correlation Token has to be set at design time in the VS 2010 WF Designer.

The issue is of dynamically assigning Correlation Tokens(Task Tokens) to the activities: CreateTaskWithContentType,onTaskChanged and CompleteTask which are inside Sequence Activity(Inside While Loop).

My Code:
CorrelationToken C_Token =
                 new System.Workflow.Runtime.CorrelationToken();
createTaskWithContentType1.CorrelationToken = C_Token;

I get the error:"This operation can not be performed at runtime" when trying to assign Correlation Token dynamically as above.

Can anyone please hel

SQL Agent Job - PowerShell step giving escape token error



I'm confused as to why I'm getting this error:

The job step contains tokens. For SQL Server 2005 Service Pack 1 or later, you must use the appropriate ESCAPE_xxx macro to update job steps containing tokens before the job can run.).  The step failed.

The job is a single Powershell script step like this:


Get-ChildItem -path "\\server\share-Logs\" -recurse -include *.log | Where-Object {($_.CreationTime -le $((Get-Date).AddDays(-35)))} | Remove-Item


This runs fine from the PS command-line but after testing this part is causing the error: $(Get-Date.AddDays(-35)) , in the Job step

This isn't TSQL or a token - so I don't understand why it doesn't just get put as-is into the PS command-line when the job runs.

Any help appreciated.


Just installed SP2010 RTM. Now receiving "The Security Token Service is not available" error.


I have spent the better part of today researching this error and have not been able to resolve it. I made sure the "SharePoint Web Services" application pool was started. I have also rebooted the server. There was a lot of mention about a HotFix, but it was already installed. Anyone have any other ideas?

Here is the error:

The SharePoint Health Analyzer detected a condition requiring your attention. The Security Token Service is not available.

The Security Token Service is not issuing tokens. The service could be malfunctioning or in a bad state.

Administrator should try to restart the Security Token Service on the boxes where it is not issuing tokens. If problem persists, further troubleshooting may be available in the KB article. For more information about this rule, see "http://go.microsoft.com/fwlink/?LinkID=160531".

Error message "Could not locate the security token referenced by key info" with WCF custom client (V



I’m trying to develop a custom client, a console application, to connect it with a Web Service (Java Web Service) and call publics web methods with Visual Studio 2008 (.Net Framework 3.5) and WCF, but I’m getting an error message (“Could not locate the security token referenced by key info”).

I’m employing two certificates, a server certificate and a client certificate, because I have to sign and encrypt the message that I send to the Web Service. Both certificates are correctly installed in my certificate repository. In my client Web Service generated with “svcutil” tool, I’m added this line to sing and encrypt the message:


Geneva Framework: Building A Custom Security Token Service


A Security Token Service, or STS, acts as a security gateway to authenticate callers and issue security tokens carrying claims that describe the caller. See how you can build a custom STS with the "Geneva" Framework.

Michele Leroux Bustamante

MSDN Magazine January 2009

The underlying connection was closed: An unexpected error occurred on a send.


I am consuming a third party web service wsdl using my .net aps.net page. And I am getting following error message. Cannt get to resolve it. Its working on my machine but not in my development machine. I have installed the certificate also in certificates on that machine. Can somone please help.?

Error -->  The underlying connection was closed: An unexpected error occurred on a send.





ASMX ws: An unexpected error occurred on a receive; failing intermittently



we I have asmx web service, this seems to be working fine for 25 client machines but one site keeps failing. The client gets a small dataset and tries to send it across to server to process. The dataset saved in XML file only makes 450 - 550kB. The web service is contacted twice in a short time every half an hour. The other smaller dataset (50kB) goes across everytime without any troubles. This site is not trying to send the biggest dataset, other site are sending much bigger datasets without problem. The catch is this failing site keeps retrying for 20 times (10 hours) in average and then eventually goes across. I don't think the service webmethod is erroring out as that is all wrapped up in the try and catch and the exception is not getting thrown, also every other try for the exact same webmethod used by any other client site seems to be working fine.

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Ne

'An unexpected error has occurred' on upload after changing limit



I recently changed the max upload size for attachments to TFS work items on our SharePoint site.  I did this by going to the http://tfsserver1:8080/tfs/ProductCollection/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx?op=SetMaxAttachmentSize URL and entering the new size in bytes.

This worked a treat, but not I cannot upload any documents to another site on the same server.

I can open and save documents that are already there, but when I click the 'Upload' button it gives a white page with 'An unexpected error has occurred.' on it.

Is there something else I have to set when I increase the upload limit for work items?


Calculated Columns in a Form Library receive error: Value does not fall within the expected range.


I have a forms library that posts the date the form was created. We would like to create a calculated column that allows us to look at these forms based on the month and year they were created. I had created a calculated column that extracts the month and replaces the number with a text string by using an if statement; "IF(MONTH([Proposal Date])=1,"January","") It goes on to evaluate each month and replace the number with the text string. This formula worked for quite some time, though now when I try to add any calculated columns or edit any existing calculated columns on this form library I receive the following error: Value does not fall within the expected range. Now my existing calculated columns (like the one above) do not work and I can not create new calcualted columns. Any insight would be awesome as this has been plaguing me for a couple of months now.

Object expected error


<input type="button' onclick="timeoutCheck()" value="Click Me!" />

it tells me Microsoft JScript runtime error: Object expected


timeoutCheck() is my script function that i declared above the input tag

can anyone tell me why i am getting this error

hello i need help , any ideas are welcome i have been working on this for two weeks now and cannot seem to be able to advance

Windows Identity Foundation Security Token Service can't stay logged in

I'm using the Windows Identity Foundation **(WIF)** Security Token Service **(STS)** to handle authentication for my application which is working all well and good. However I can't seem to get any long running login with the STS. From my understanding I shouldn't care about the client tokens at the application level since they can expire all they want to and it should redirect me to the STS and as long as they're still logged in on the STS it should refresh their application token. Yet it doesn't seem to want to keep them signed in. Here's what occurs in my login.aspx on the STS var cookie = FormsAuthentication.GetAuthCookie(userName, persistTicket); if (persistTicket) cookie.Expires = DateTime.Now.AddDays(14); Response.Cookies.Add(cookie); var returnUrl = Request.QueryString["ReturnUrl"]; Response.Redirect(returnUrl ?? "default.aspx"); Which was taken almost directly from existing application using normal Forms Auth. From my web.config <authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" timeout="2880" name=".STS" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" /> </auth

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a rec

Hello Guys,         I am getting following exception while web service (ASMX) is returning the response. <!-- [if gte mso 10]> <mce:style> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive.     <!-- [if gte mso 10]> <mce:style>                                                     InnterException (System.IO.Exception): "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."       I think either the Asp.net web server is closing the connection or the response is too long.   Following is my simple code.    1)   namespace JFA.IndiePay.BusinessAccess { public class VerTexProcessor { public DataSet ProcessVerTexForBatch(DataSet dsInputRequest) { DataSet dsResponse = new DataSet(); //Call vertex web service here. VertexService.Service texCalculator = new VertexService.Service(); texCalculator.Timeout = 500000;
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend