Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
QuestionProblem adding data from a data set to a List Object Pin
AndyASPVB1-Oct-09 11:08
AndyASPVB1-Oct-09 11:08 
AnswerRe: Problem adding data from a data set to a List Object Pin
Dave Kreskowiak1-Oct-09 11:15
mveDave Kreskowiak1-Oct-09 11:15 
QuestionHow do you check to see if a web service is running or not? Pin
AndyASPVB1-Oct-09 10:49
AndyASPVB1-Oct-09 10:49 
AnswerRe: How do you check to see if a web service is running or not? Pin
Dave Kreskowiak1-Oct-09 11:14
mveDave Kreskowiak1-Oct-09 11:14 
AnswerRe: How do you check to see if a web service is running or not? Pin
PIEBALDconsult1-Oct-09 14:55
mvePIEBALDconsult1-Oct-09 14:55 
GeneralRe: How do you check to see if a web service is running or not? Pin
Dave Kreskowiak1-Oct-09 16:23
mveDave Kreskowiak1-Oct-09 16:23 
GeneralRe: How do you check to see if a web service is running or not? Pin
PIEBALDconsult2-Oct-09 3:42
mvePIEBALDconsult2-Oct-09 3:42 
QuestionException while creating table in azure. Pin
VasntKrish1-Oct-09 9:23
VasntKrish1-Oct-09 9:23 
I'm trying to learn and work on azure table storage. The code works perfectly in my local. When I configure to the azure and still trying to work with my local (not using publish), I'm getting an exception.

public bool DoesTableExist(string tableName)
{
ParameterValidator.CheckStringParameter(tableName, false, "tableName");
bool tableExists = false;

RetryPolicy(() =>
{
try
{
DataServiceContext svc = GetDataServiceContext();
svc.MergeOption = MergeOption.NoTracking;
IEnumerable<TableStorageTable> query = from t in svc.CreateQuery<TableStorageTable>(TableStorageConstants.TablesName)
where t.TableName == tableName
select t;
tableExists = false;
try
{
// the query contains the whole primary key
// thus, if the query succeeds we can be sure that the table exists
(query as DataServiceQuery<tablestoragetable>).Execute(); tableExists = true;
}
catch (DataServiceQueryException e)
{
HttpStatusCode s;
if (TableStorageHelpers.EvaluateException(e, out s) && s == HttpStatusCode.NotFound)
{
tableExists = false;
}
else
{
throw;
}
}
catch (NullReferenceException ne)
{
//This is a workaround for bug in DataServiceQuery<T>.Execute. It throws a
//NullReferenceException instead of a DataServiceRequestException when it
//cannot connect to the the server. This workaround will be removed when
//the fix for this bug is released.
throw new DataServiceRequestException("Unable to connect to server.", ne);
}
}
catch (InvalidOperationException e)
{
HttpStatusCode status;
if (TableStorageHelpers.CanBeRetried(e, out status))
{
throw new TableRetryWrapperException(e);
}
throw;
}
});
return tableExists;
}

when it executes the (query as DataServiceQuery&lt;TableStorageTable&gt;).Execute() it has to fail and come to DataServiceQueryException and make tableExists = false and return with the same to create the table. Instead the code goes to the catch (NullReferenceException ne)and says unable to connect to the server. can someone help me onthis please.Thanks.
QuestionXML, XSD VALIDATION Pin
waqasm1-Oct-09 8:16
waqasm1-Oct-09 8:16 
AnswerRe: XML, XSD VALIDATION Pin
Henry Minute1-Oct-09 10:50
Henry Minute1-Oct-09 10:50 
GeneralRe: XML, XSD VALIDATION Pin
waqasm1-Oct-09 11:09
waqasm1-Oct-09 11:09 
GeneralRe: XML, XSD VALIDATION Pin
Henry Minute1-Oct-09 11:48
Henry Minute1-Oct-09 11:48 
GeneralRe: XML, XSD VALIDATION Pin
waqasm2-Oct-09 3:56
waqasm2-Oct-09 3:56 
GeneralRe: XML, XSD VALIDATION Pin
Henry Minute2-Oct-09 5:29
Henry Minute2-Oct-09 5:29 
GeneralRe: XML, XSD VALIDATION Pin
waqasm7-Oct-09 6:14
waqasm7-Oct-09 6:14 
QuestionSqlServerCeException "There was an error parsing the query" help .... Pin
hande541-Oct-09 6:22
hande541-Oct-09 6:22 
AnswerRe: SqlServerCeException "There was an error parsing the query" help .... Pin
Md. Marufuzzaman1-Oct-09 7:07
professionalMd. Marufuzzaman1-Oct-09 7:07 
GeneralRe: SqlServerCeException "There was an error parsing the query" help .... Pin
hande541-Oct-09 7:57
hande541-Oct-09 7:57 
GeneralRe: SqlServerCeException "There was an error parsing the query" help .... Pin
Md. Marufuzzaman1-Oct-09 8:29
professionalMd. Marufuzzaman1-Oct-09 8:29 
GeneralRe: SqlServerCeException "There was an error parsing the query" help .... Pin
hande541-Oct-09 8:50
hande541-Oct-09 8:50 
GeneralRe: SqlServerCeException "There was an error parsing the query" help .... Pin
Abhishek Sur1-Oct-09 10:31
professionalAbhishek Sur1-Oct-09 10:31 
GeneralRe: SqlServerCeException "There was an error parsing the query" help .... Pin
hande541-Oct-09 10:33
hande541-Oct-09 10:33 
GeneralRe: SqlServerCeException "There was an error parsing the query" help .... Pin
Md. Marufuzzaman1-Oct-09 20:15
professionalMd. Marufuzzaman1-Oct-09 20:15 
Questionsocket problem: works in visual studio, not as release Pin
TimWallace1-Oct-09 5:49
TimWallace1-Oct-09 5:49 
AnswerRe: socket problem: works in visual studio, not as release Pin
Luc Pattyn1-Oct-09 6:22
sitebuilderLuc Pattyn1-Oct-09 6:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.