|
Who told you that using SessionPageStatePersister is a better technique to hold page data.
I think it is better to have viewstate in hiddenfield using HiddenFieldPageStatePersister which is default. I think Everyone here will accept this(Even microsoft do think this, thats why they placed it as Default)
Using excessive session is not a good idea. Actually Session is cleared only when Session TimeOuts, or you manually clear the Session during Logout Request / or anywhere. PageStateAdapter can just refresh the Session Page state on every request.
Dont load lots of Data in one single Application Pool. This will endanger your site if large no of request is made to the site.
If possible, try to minimize the Viewstates transferred to the page.
|
|
|
|
|
The idea here is eventually to move the session to sql server in a load balanced enviroment. Having the viewstate on the page is breaking in a load balanced enviroment.
Thanks for your reply
-Tilak
|
|
|
|
|
Well... moving Inprocess session to StateServer will make your site 10 - 25% slower. Storage of Complex DataTypes will make it even slower.
Normally we do this when we have multiple servers for the same site, which makes it impossible to have session in one process.
So if you are not having multiple web server, storing viewstate to SQL server will reduce performance...
|
|
|
|
|
Hi Abhi,
Exactly the point, we are trying to loadbalance our website to a web farm architecture and don't want the viewstate on the page.
Also most of our screens are transactions which are carrying a viewstate of around 300k on an average and use a lot of partial postbacks and we are looking at options of minimizing data turnaround on each postback(partial or full) between the client and server as the server is planned to be sitting in a remote location in India. So I tried the above approach and got stuck at a point the session grows indefinitely, although eventually I plan to move the session to sql server but wanted to close this minor yet critical hole in the design. I was also thinking when they have an object made available like that they would have taken care of this memory release and may be I am missing something and the answer would be staight forward, but apparently not.
Although viewstate serialization and transfer can put additional burden of 10 to 25% as you said, in my case I want to explore this option, as each partial postback is taking seconds to process when the server is remote as opposed to local which is way faster.
Do you know any good performance test tools which will be helpful in my case above.
Thanks and really appreciate your time,
Tilak
|
|
|
|
|
Yes... There are lots of Tools available. The one that I like the most is Fiddler.
http://www.fiddler2.com/fiddler2/version.asp[^]
You might take a look into it.
Yes, you can modify the page with maximum nos of partial postbacks to make the calls smaller.
Also if you create your form dynamically in the client side without the viewstate and pass to an HTTPHandler, it would remove unnecessary postback data as well.
You might also go for Client Cache for scripts/images/ css etc, and Also few data caching which is required for every call to improve the performance of the page(You might use Cache server to hold your cache).
Finally GZip / Deflate compression makes the request/ response smaller.
You might take a look into my article to have an idea:
Compress Response and HTML WhiteSpace Remover[^]
You can see how the performance is increased in fiddler tool.
Cheers.
|
|
|
|
|
Hi ,
We are trying to implement Java WebService in .Net . But getting error like
An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
We registerd the security certificate everything but still getting this issue .
The issue what we found is we are getting X509IssuerSerial alias: null in xml request generated by .Net application
Can any one please guide how to sort out this issue.
the app.config is as follows
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<client>
<endpoint address="http://localhost:1919/testWs/services/HelloWorld"
behaviorConfiguration="ClientCertBehavior" binding="customBinding"
bindingConfiguration="JavaInterop" contract="localhost.HelloWorldPortType"
name="HelloWorldHttpSoap12Endpoint">
<identity>
<dns value="YALAMANCHILI" />
</identity>
</endpoint>
</client>
<bindings>
<customBinding>
<binding name="JavaInterop">
<security defaultAlgorithmSuite="Basic128Rsa15" allowSerializedSigningTokenOnReply="true"
authenticationMode="MutualCertificate" requireDerivedKeys="false"
securityHeaderLayout="Lax" includeTimestamp="true" messageProtectionOrder="EncryptBeforeSign"
messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
<issuedTokenParameters keyType="AsymmetricKey">
<issuer address="" binding="customBinding" bindingConfiguration="JavaInterop" />
<issuerMetadata address="">
<identity>
<certificateReference x509FindType="FindByIssuerName" isChainIncluded="false" />
</identity>
</issuerMetadata>
</issuedTokenParameters>
<localClientSettings detectReplays="false" />
<secureConversationBootstrap defaultAlgorithmSuite="Basic128Rsa15"
allowSerializedSigningTokenOnReply="true" authenticationMode="MutualCertificate"
requireDerivedKeys="false" securityHeaderLayout="Lax" messageProtectionOrder="EncryptBeforeSign">
<issuedTokenParameters keyType="AsymmetricKey" />
</secureConversationBootstrap>
</security>
<textMessageEncoding messageVersion="Default" />
<httpTransport />
</binding>
</customBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="ClientCertBehavior">
<clientCredentials>
<clientCertificate findValue="f1 88 d8 95 76 76 5b be 74 53 90 92 fc cf 16 e0 67 5e 4d 34"
storeLocation="CurrentUser" storeName="My" x509FindType="FindByThumbprint" />
<serviceCertificate>
<defaultCertificate findValue="d4 79 bc 17 94 3a 3c 14 a1 a2 1f c7 ba b7 a7 3e 08 1b 0a 8d"
storeLocation="CurrentUser" storeName="My" x509FindType="FindByThumbprint" />
<authentication certificateValidationMode="None" revocationMode="NoCheck" />
</serviceCertificate>
<peer>
<peerAuthentication certificateValidationMode="None" />
<messageSenderAuthentication certificateValidationMode="None"
revocationMode="NoCheck" />
</peer>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
|
|
|
|
|
I also have this problem, I think there's wrong w/ how you use the service, not the service itself.
|
|
|
|
|
Hi peoples,
I am opening a window by following code,
function mypopup()
{
mywindow = window.open("Bulk_Insert.aspx", "mywindow", "toolbar=no,location=no,directories=no,status=no," +
"menubar=no,scrollbars=no,resizable=no,width=500,height=300");
mywindow.moveTo(100,200);
}
i have 3 questions here
1) i want to make this window as modal window so that the user cant access the parent page
2) i gave resizable to NO, but the widnow is allowing the user to resize, even the status bar is also coming at bottom
3) and i need to get some input from that modal window(page) to my parent page
please help me,
|
|
|
|
|
All the thing that you are trying to build using window can be done easily using AJAX Modal PopUP Window or you can use DIV to implmement such functionality
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hii ,
Is there anyway to do photo tagging , just like we see in orkut and facebook.
With Warm regards
|
|
|
|
|
|
Hi,
can i use "System.Windows.Forms.RichTextBox" in asp.net. If yes then, How can i do this?
Thanks,
Sonia
|
|
|
|
|
No... Browser just knows Html. So you need to find one equivalent Richtexteditor built using Html.
Why dont you try HTML Editors ?
Might try Yahoo RichText editor, Its free and easy to implement.
http://developer.yahoo.com/yui/editor/
Cheers.
|
|
|
|
|
Thanks for your reply, in html editors we can assign different colors to text by selecting the text and then choosing the color for it, but i want to select and color the text programmatically. How can i do this.
Sonia
|
|
|
|
|
Yes why not.
html richtexteditors generates proper html and places it in the editors.
HTMLs can easyly handle colors and if the API supports color of text for the editor you are using, it is easily possible.
|
|
|
|
|
you can even use FreeTextBox or FCK Editor
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
Sir,
How to make connection to the SQL Server 2005 & to call stored procedure in JAVASCRIPT using disconnected architecture?
|
|
|
|
|
No.. It cant directly call using JAvascript. Rather you could put a handler which will call the stored procedure and return the output. Call the handler using AJAX.
|
|
|
|
|
I have a linkbutton. I set its oncontextmenu attribute to a javascript function.
It seems like when the name of the function and its parameters' names are long, I get an error.
When I replace my function with: f(1,1,1,1) I get no errors.
both the first and the second functions perform the same simple thing : alert('hi');
|
|
|
|
|
Why dont you create your html yourself.
Check what is put in the html using view -> page source to inspect what is going wrong with the javascript element.
|
|
|
|
|
Hi Team,
I am having problem with window. I am having one path I am taking in String. On button click I am calling Response.Redirect (str) where str=path of the url.
I need to open the url in another browser how to do this?
Thanks in Advance
|
|
|
|
|
To open in a new browser window, you should use
window.open rather than Response.Redirect .
Response.Redirect works in Server side, so it just replaces the url you called with the url you redirect for.
If you want this to open in a new window, either write a javascript block element in the button_click (You might use this.ClientScript.RegisterStartupScript ) from the server, or you may use javascript directly from the client to open in a new window and call the url from the new window using onclick="javascript:window.open('url.aspx','');" like this.
Cheers.
|
|
|
|
|
use the following code to open a new window
window.open('pagename.aspx', '_blank');
If you want to open a window with specific size then use
window.open('Pagename.aspx', 'Help', config = 'height=800,width=1013,left=' + left + ', toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, directories=no, status=no');
Pankaj
|
|
|
|
|
hi,
I have made one stored procedure for adding and updating some data in the table "tbClients" .
I want to enter the current date in the column "PurchaseDate" Column using parameter "@PurchaseDate" while executing the stored procedure.
The query is something like"
exec Emp_Sp_AddnUpdate @ClientCreditId='0', @ClientId='12',
@PurchaseDate='12/21/2009',
@Amount='2000',
@Narration='This ia just an example',
@Credits='234.54';
In the above statement at the sql server 2005,
there is an error "Error converting data type varchar to int."
plz help
thank you
|
|
|
|
|
Well...
Remove the quote of all the integer fields. I mean if @ClientId is int field, place like @ClientId=12 .
Are you executing this in Query Analyser?
Also, Is it by any means related to ASP.NET ??
Why did you put it here?
|
|
|
|