|
Thanks Pete, that's a good idea, I'll see what I can do.
Cheers
Julian
|
|
|
|
|
How large is the ViewState becoming, i remember a way back i was doing something stupid and i had ended up having a ViewState that was almost 10MB...
i had to remove the control i was using as a table cell on a large table page and refactor it was painfull
|
|
|
|
|
Windows Forms don't use ViewState. You're getting confused into thinking the OP was talking about ASP.NET.
|
|
|
|
|
Phew, thanks Pete, thought I was missing something there....
|
|
|
|
|
No problem. I had to check which post it was replying to beforehand.
|
|
|
|
|
If you want your application to speed up. The first place you need to look at is the database design. Partition it into smaller table for query speed.
______________________________________________________________________________
Easy fast local ads Listing for free at 4sellpage.com
charliezcr
|
|
|
|
|
Thanks for your input charliezcr. I don't have a problem with the queries. I'm logging all the queries I'm doing and can see how long each one takes. they are all normal. I am exploring other avenues at the moment whilst looking at another part of the code, so don't worry.
Thanks
Julian
|
|
|
|
|
I am currently trying to call multiple wcf services under a single transaction scope and got the following exception :
System.ServiceModel.CommunicationException: The maximum retry count has been exc
eeded with no response from the remote endpoint. The reliable session was faulte
d. This is often an indication that the remote endpoint is no longer available.
My client and service are using wsHttpBinding with the endpoint used in the operation. The service operation are both update operations performed on an Oracle database (10g) using ODP.Net (11g). My client and service are both running on my local machine and MSDTC is properly configured on it (I figure it is because I'm able to monitor transactions that are enlisted during service call).
To be more specific, The exception is cut on the second call to the endpoint (the same endpoint in both call)s. The first operation is a simple update witch doesn't requires a lot of time to perform, on the other hand, the second operation, is more consuming (about a minute to perform). Without a transaction, both operations are working fine (but it is not a viable long term solution).
I got success performing multiple service call to simple database operation. The transaction works fine and completes. But it seems that, when I call a service that requires more processing, the problem happens.
Here is the binding that I use :
<wsHttpBinding>
<binding name="WSHttpBinding_Provider" closeTimeout="00:01:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
bypassProxyOnLocal="false" transactionFlow="true" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="200000000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<reliableSession ordered="true" inactivityTimeout="00:20:00" enabled="true"/>
<security mode="None">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
Here is my Oracle connection string :
connectionString="DATA SOURCE=LPRG;USER ID=/;pooling=true;PROMOTABLE TRANSACTION=promotable; Enlist=true"
I have tried ws2007HttpBinding and got the same issued. It seems that the "The maximum retry count" cannot be set in wsHttpBinding. I could, of course, create a customBinding for that purpose (and I tried but got another strange exception). However, I am wondering if the wsHttpBinding could possibly work.
Thanks in advance,
Phil
|
|
|
|
|
The ServiceBehavior transactiontimeout attribute was set to 00:10:00 (10 minutes) which overrided the inactivity timeout. We updated this setting and finally got success.
However, we definetely have to work on our database performance issues (probably due to some lacks in the design of deletion(cascade delete involved)). But that's another issue.
Oh welll...
Phil
|
|
|
|
|
1. How to read and write registry using configuration Management Application Block 5.0
2. How to keep my logging settings in registry and how to ovveride that logging setting in app.config/web.config.
3. How to keep my logging settings in database and how to ovveride that logging setting in app.config/web.config.
4. I am not able to find more code samples and documentation on CMAB 5.0
Please help on the above items.
Thanks in advance.
Vamshi Krishna.
|
|
|
|
|
Try these links[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I have a WinForms application that uses an assembly (v1) provided by a Third-party vendor. Now the vendor has released a newer version of the assembly (v2). The newer version is not available on all client machines, some still have only v1 installed while some have both v1 nd v2 installed.
How do I make my app load v2 of the assembly or fallback to v1 if v2 is not available. Assume that v2 is backward compatible with v1, i.e., the type names, contracts, etc, are the same.
Both these assemblies are installed into the GAC and I cannot use any private copies since they're very complex and have a lot of dependencies.
I tried using assembly redirection using application configuration file but that seems to be a permanent redirection. It does not check for existence of the assembly to redirect. So if I set redirection from v1 to v2 (and compile my app against v1), it always tried to load v2 and fails if v2 is not available. Similarly, if I set the redirection from v2 to v1 (and compile my app against v2), it always loads v1 even if v2 is available.
I tried using AppDomain.ResolveAssembly event, but using Assembly.Load inside the event handler keeps raising the ResolveAssembly event that results in a stack overflow.
Is there a better way to do it?
[SOLUTION]
I think I did the ResolveAssembly event in the wrong way. The ResolveAssmbly event is fired only when an Assembly load fails. I compiled my app against v2 and was trying to load v2 thru a Assembly.Load call (it also fails and fires a ResolveAssembly event leading to a Stack Overlfow). The correct way is to just load the v1 thru Assembly.Load and return it.
[/SOLUTION]
modified 10-Feb-12 9:35am.
|
|
|
|
|
I'm now using EF 4.0,and I create a sample table named TableB,Table B‘s PK is (Id,YearMonth,Time),and column ClientId has been set as auto increased identity
when I Add a new record , Exception occrued And the full callstack is
System.Data.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source)
System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache)
System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
System.Data.Objects.ObjectContext.SaveChanges()
However,if I set the CientId column not as a identity column,every thing works fine
Can anyone tell me why this problem happens? thanks in advance
|
|
|
|
|
I have been facing some issues lately with Pinvoke calls to native functions of advapi32.dll from managed code and i haven't found yet a way to make it work properly, facing multiple problems related to the classic "A call to ... has unbalanced the stack" and "attempt to read/write protected memory".
My question here is regarding on how to debug those situations properly, as i may not have experience debugging this i ran into the situation where i cannot get information enough to know where the error is.
Is there any way to debug/step into those calls from VS2010 that im not aware of, or maybe a way to read the memory that is being allocated and try to discover it by myself?
To give an example, i have a PTR to a memory address which is supposed to hold a structure, which is pretty big and consist of a lot of another sub-structures and i believe the problem is related to the definition of those as i might not be using the correct data types.
So, for instance, how i can read a specific memory block from a PTR and see which data is allocated there to see if it fits into the structure in the correct fields?
I'm sorry if this is a confusion question, but I'm more like looking for some guidelines and tips into this... hope to get some comments.
|
|
|
|
|
Don't report your question. You've already posted this in the QA forum. Posting it again doesn't get you anything.
Besides, you haven't listed what you're trying to P/Invoke and the code you're using to try to call this stuff.
Listing ALL the tips and what to look for and how to do things would take more than a couple of forum posts.
|
|
|
|
|
1. stack problems are caused by using the wrong calling convention. Fix that first.
2. the easiest way to debug code in general is by adding log statements, and NOT by relying on fancy tools (which require boring interaction) or lots of MessageBoxes. That way you get a chronological and structured result, and you can see up to what point things go well.
3. the one way to debug P/Invoke stuff I know of, is by writing the code one piece at a time, starting with simple stuff, then adding to it. Which also means I provide some simple and some more complex dummy native functions, and get them to work first.
4. when in charge of both sides, keep your API simple; have the managed world do all the memory allocation; and use logging, also let the managed world log native information using a callback. I've explained that and more here[^].
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
Thank you very much for the reply, i had found P/Invoke Article really useful, I will have to play around with the code now...
|
|
|
|
|
You're welcome. And good luck with it.
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
Dear All,
could anyone body assist about this error regarding to generate crystal report from the ASP.Net. the exception is this...
Invalid Argument provided. Failed to open a rowset. Error in File C:\WINDOWS\TEMP\
|
|
|
|
|
Don't crosspost, already you have posted the same question in Q/A section. Check my answer there.
Report Generated problem[^]
BTW always post the relevant code(where the error occurs) in your question.
|
|
|
|
|
I am using paypal sandbox to doing testing, however after click the continue button that i wish to complete the transaction, but the page is keep loading. So i click to go back on the browser, and then click to go forward again, then it will only display "You've already completed your purchase. Please click Close to continue to the merchant." My problem is i want it auto return me the success page, but not click the back and forward to view the return to merchant. thanks you
The page keep loading URL
https://www.sandbox.paypal.com/webapps/checkout/webflow/sparta/expresscheckoutvalidatedataflow?execution=e8s2[^]
|
|
|
|
|
This question would be better posted in the ASP.NET forum or referred back to paypal.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi,
Can anyone please let me know, how to kill the application session when the user clicks on the browser "X" button to close the browser.
I have googled and none of the examples seems to be working, appreciate a sample code.
Thanks,
Deb
|
|
|
|
|
If someone kills the browser, the server has no way of knowing. It just has to wait for the session to timeout.
|
|
|
|
|
You need one javascript function to capture browser unload event and one hidden server control button with click event. In that javascript function write code to click the hidden button. In the button click event you can do the actions you want like session clean up.
Ex:
//Javascript
javascript:window.onbeforeunload = function(){
if((window.event.clientX<0) ||
(window.event.clientY<0)){
if(document.getElementById("ctl00$testbutton")!=null)
document.getElementById("ctl00$testbutton").onclick();
}
}
//button event
protected void testbutton_ServerClick(object sender, EventArgs e)
{ Session["test"]=null;
Session.Abandon();
}
Hope it helps
|
|
|
|