|
i have store procedure which tooks 10 mints to execute so it will get time out in my application.
i think we can set Connection.Timeout in web config.
can any one tell me where to set that in web config??
|
|
|
|
|
Use <connectionstrings> in Web.Config like this
<connectionStrings>
<add name="TestConnectionString" connectionString="Data Source=Test_XXXX;Initial Catalog=DB_Name;Integrated Security=True; Connection Timeout=200;" providerName="System.Data.SqlClient"/>
</connectionStrings>
Go through this link, You can get good idea about connection strings.
connectionstrings[^]
P.S: Check why that procedure taking two much time (10 minutes).
Happy Coding
Regards,
Eswar
|
|
|
|
|
Thanks for the swift reply..
like this means..how?? because i want syntax...where to add and ahta i have to add
i check link given by you...but it has nt mention any where....any thing related to time out
|
|
|
|
|
Mugdha_Aditya wrote: ike this means..how?? because i want syntax...where to add and ahta i have to add
For Web.Config concept See this http://msdn.microsoft.com/en-us/library/w7w4sb0w(v=VS.80).aspx[^]
Mugdha_Aditya wrote: i check link given by you...but it has nt mention any where....any thing related to time out
Link is only about connection strings with respect to different databases & different parameters.
Are you want sample syntax of web.config file?
|
|
|
|
|
i waant to add timeout hours in web config...
i want sample for tht... so i can add same thing in my web config for time out
|
|
|
|
|
10 minutes? Sounds more to me like you need to refactor/refine your stored procedure and schema a bit. I've written queries that take as long as three seconds, but never *minutes*. Believe me when I say the timeout is the least of your worries.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
ok..
but still how can i add time out time in webconfig
|
|
|
|
|
You can't. That timeout is for connecting to the database, not executing a command on it. See my other post for more info.
|
|
|
|
|
Ummm, I hate to rain on everyones parade here, but changing the timeout in the connection string doesn't work. That's the timeout for the CONNECTION to the database, not the timeout for executing a command on the database.
You're looking at CommandTimeout[^].
But, like JSOP said, if you've got a long running query like this, you're best option is to try and improve the query's performance first. Having done that, if still too long, run the query async so your code isn't blocked waiting 10 minutes for the query to return. Look at the Begin* methods of the SqlCommand object.
|
|
|
|
|
There are two type of timeout which we can use in asp.net-
SqlCommand.CommandTimeout = timeout limit for your SQL query. Means, how much time a (eg: SELECT, UPDATE) query can take for its execution. If it exceeds SqlCommand.CommandTimeout, then it stops execution. A command timeout error will occur.
SqlConnection.ConnectionTimeout = timeout limit for your connection. Means, how much time your connection object can try to connect. If it exceeds the specified time, it stops connecting. A connection timeout error will occur.
HELLO GUY
|
|
|
|
|
Hi developers
I am here to clear my serious doubt about an issue,that came in between my coding.I made a sticky note software in c#.net and it also has a user registration criteria.So in order to do that,that software asks for the username and organization name in a form,and the end user types his name and other details in the textbox and submits it.When user clicks submit,the form carries out the data to the web (opening in an explorer),and shows the name and other details in the web-page controls and stores it in a database.Actually how to do this?I need a quick solution.Please help me your answers dears!
varun
|
|
|
|
|
varun.g wrote: Actually how to do this?
That is your task. Although it is not exactly clear whether this is a Windows Forms or Web question.
varun.g wrote: I need a quick solution.
Try some research into your problem and come back here when you have a more specific question.
I must get a clever new signature for 2011.
|
|
|
|
|
Dear Richard
Thanks for your comments.BTW why don't you see the title "windows application contents available and save online".It clearly tells issue.I need to show the windows application contents in a web page and save that content directly to the web database.I need a wise solution please..
|
|
|
|
|
varun.g wrote: "windows application contents available and save online".It clearly tells issue.
It may be clear to you but it does not explain exactly what problem you are having.
varun.g wrote: I need a wise solution please..
Then you need to do some wise research.
I must get a clever new signature for 2011.
|
|
|
|
|
... varun.g wrote: windows application contents in a web page ...
Perhaps you could write your windows application data to a database that the web site can then use as a datasource.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Yeah thanks mates
Actually i am just aware of having "USING SYSTEM.NET" namespace and "httpwebrequest" keyword.But how to perform it in an application?
|
|
|
|
|
I was given a wsdl file to create a web service client.
When I use VS to load Web Reference, from the wizard screen I can see the three methods. But once I go to project object broswer, I can't see the methods or the data types.
But if I use load Service Reference, I can see everything. however the problem is this way only generates an Interface not a class. Still I can't create use it to create a web service client.
I also tried on VS2003 and VS2005. the result is similar.
Any guru can help ?
|
|
|
|
|
Try using the SvcUtil utility to generate the proxy.
You will get more control over various settings if you use this program.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
i use a tcpclient to connect to a server it works fine, but when i disconnect the tcpcleint and then again try to connect to
server it gives th exception saying this endpoint is already in use. any idea to solve this. when disconnecting i call the tcpclient.close().
thanx in advance.
|
|
|
|
|
I'm fairly sure you can't reuse it, but I don't recall ever trying.
|
|
|
|
|
thanx for your reply, so is that mean once a tcpclient bound to an endpoint we cannot use that endpoint for another tcpclient even we close the first tcpclient ?
thanx in advance
|
|
|
|
|
Again, I've never tried, I always make a new endpoint.
See my TelnetSocket[^] article for how I use them.
|
|
|
|
|
I think there is a fairly lengthy delay (in the order of minutes) before the same endpoint can be re-used. A quick Google search should find the details for you.
I must get a clever new signature for 2011.
|
|
|
|
|
I need to navigate to a site in IE, login, and then navigate to the Upload page, populate the File field with a file name, and click the Submit button - all from inside a CE Class.
Anyone know how to do this? I'm not even sure what to Google for this?
Thnks
Everything makes sense in someone's mind
|
|
|
|
|
Explain CE class? Windows CE?
I know the language. I've read a book. - _Madmatt
|
|
|
|