|
Is there code to check the excel file to see if it's OK?
No, not really.
You need to write your code to handle the situation where it's not. This includes properly wrapping sensitive sections of your code that deals with opening, reading, and closing the Excel file and properly handling those exceptions according to your business rules for processing the file.
|
|
|
|
|
hello, i have a service in WCF that wil recieve a alrge xml in response. here is my config
<bindings>
<basicHttpBinding>
<binding name="CVSCValidateContactAlertSOAP" />
<binding name="CVSCUpdateOperationsContactSOAP" />
<binding name="ContactRegisterSOAP" />
<binding name="FindContactsListSOAP" />
<binding name="FindReviewsByAccountSOAP" />
<binding name="AddReviewSOAP" />
<binding name="ProductOfferingSOAP" />
<binding name="OperationSupportSOAP" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
transferMode="Streamed">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
<binding name="CustomerAccountSOAP" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
transferMode="Streamed">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
<binding name="BusinessInteractionSOAP" />
</basicHttpBinding>
</bindings>
the answer from the server is
Server stack trace:
en System.ServiceModel.Channels.HttpInput.ThrowMaxReceivedMessageSizeExceeded()
en System.ServiceModel.Channels.HttpInput.GetMessageBuffer()
en System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream)
en System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(HttpRequestMessage httpRequestMessage, Exception& requestException)
en System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
en System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
en System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
en System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
en System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
en System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
en System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
en System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
en IServicioCuenta.buscarCuenta(Auditoria auditoria, CriterioSeleccion criterio)
en ServicioCuentaClient.buscarCuenta(Auditoria auditoria, CriterioSeleccion criterio)
|
|
|
|
|
|
|
I found this SHARE_INFO_503 structure (Windows)[^] which uses the same value names, but in this documentation the actual values are mentioned.
0100000101101110011001000111001011101001
|
|
|
|
|
At the bottom of that MSDN document, you'll see it says "Header: Lmshare.h (include Lm.h)".
Searching the header files listed in Lm.h for one of the values will lead you to LMaccess.h. The values start on line 1250 of that file:
#define ACCESS_NONE 0
#define ACCESS_ALL ( ACCESS_READ | \
ACCESS_WRITE | \
ACCESS_CREATE | \
ACCESS_EXEC | \
ACCESS_DELETE | \
ACCESS_ATRIB | \
ACCESS_PERM \
)
#define ACCESS_READ 0x01
#define ACCESS_WRITE 0x02
#define ACCESS_CREATE 0x04
#define ACCESS_EXEC 0x08
#define ACCESS_DELETE 0x10
#define ACCESS_ATRIB 0x20
#define ACCESS_PERM 0x40
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am looking for a solution by which i type some keyword and get the list of url which contain that world
|
|
|
|
|
Where are all these URLs stored?
|
|
|
|
|
I am to search these URL from web. It's like google. google serach key world from web pages i want the same but as we know that google work on the indexing. I want to return only the website url that is similiar to entered word
|
|
|
|
|
Then you first need to create a database of all URLs that exist in the world; that will be quite a big list.
|
|
|
|
|
You could only do this by building up a list of all visitable URL's and then you could query that.
|
|
|
|
|
I am to search these URL from web. It's like google. google serach key world from web pages i want the same but as we know that google work on the indexing. I want to return only the website url that is similiar to entered word
|
|
|
|
|
When you search via Google, they aren't going off and hunting for matches on the web at that point. They search their indexed versions, which they have previously crawled. You need to take a similar approach in order to satisfy your requirement.
|
|
|
|
|
Why don't you use google for that. Try the following search:
allinurl: codeproject answers
This will give you all urls that contains "codeproject" as well as "answers" as keywords.
Try it out!
Cheers
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
Hi,
I am developing Google Earth application using C# WPF. To navigate Google Earth Plug-in URL, I used
WebBrowser control in wpf window but I am getting Java Script error while Google Earth plug-in to webBrowser in
WPF. Same code i applied in C# winform but not throwing any javascript errors and it is working good.
Google Earth Plug-in javascript Error:
Could not complete the operation due to error 80131509
Line: 38
Character: 7
Google Earth Plug-in Link:
http:
Please let me know to resolve the problem in WPF Window.
Regards,
chittibabu
|
|
|
|
|
citibabu wrote: Line: 38
Character: 7
Please don't expect people to guess what may be on this line at character 7.
|
|
|
|
|
i want help on the way i could implement skype on my windows 8 using c# and xaml
|
|
|
|
|
I would start here[^] then.
|
|
|
|
|
I am running a C# 2010 windows application that calls a C# 2008 console application to make various calls to a web service. I am getting the following timeout error. I am wondering what part of the application I should look at to determine what is causing the timeout? Both applications are compiled in debug mode.
I am wondering if you can tell in the application what timeout parameter(s) need to be changed? What coding changes would I make to prevent the timeout errors from occuring?
Here is the error message:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
2013-01-24 16:40:03.3082|ERROR|Sample|************* Stack Trace *******************
2013-01-24 16:40:03.3238|ERROR|Sample| at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
|
|
|
|
|
As your stack trace mentions SQLClient in almost every line I would suspect it is your database query that is timing out, that will live in your WCF. You can change both the the connection timeout and/or the command timeout.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
dcof wrote: I am wondering what part of the application I should look at to determine what is causing the timeout
If it is a large application and especially if it is a system (multiple applications like you're having) you might want to consider some serious logging. The timestamps in the log can immediately tell you where the culprit is.
I suggest thinking the logging mechanism over for a while before jumping in a quick and dirty solution. Good logging saved my day in numerous times.
Hope this helps.
|
|
|
|
|
dcof wrote: What coding changes would I make to prevent the timeout errors from occuring?
What you need to do FIRST is determine what is being processed (presuming some SQL.)
The SECOND you need to determine what a reasonable time for that process to take - especially from the business side.
As an example it unreasonable to expect a user to wait for an hour for a web site to finish processing a request (where the web app is blocked until it is done.)
To "fix" a problem like this depends on the specifics of the problem but some or all of the following might be necessary but this is not a complete list.
- Tune the database/schema
- Adjust the SQL operation parameters or SQL itself.
- Rearch/design the interface to preclude such operations.
- Rearch/design the interface to create a batch processing system where a request is posted, some other process processes each request, and some time later a result is created, then the caller at some later time, may submit another (different) request to retrieve the result.
|
|
|
|
|
Hi,
It is never easy!! We have a response file which has two types of decisions, ACCEPT and DECLINE with in the comma separated name/value pair. I am inserting this information in to the database and want only the decision ACCEPT. In cases in line contains DECLINE, I want to skip this current line and go to the next line.
I am using the StreamREader to read the file.
Thanks!
|
|
|
|
|
Very simplistic, but something along the lines of:
if (line.Contains("ACCEPT"))
else
Just some pseudo code but that might set you off in the right direction. Might have been useful to see some code.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
try something like this.
using (StreamReader sr = new StreamReader(path))
{
while (sr.Peek() > -1)
{
string line = sr.ReadLine();
if( line.Contains("Accept"))
{
}
}
}
Jibesh V P
modified 24-Jan-13 16:53pm.
|
|
|
|