It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
In my project session was only available for 30 minutes (Which is by default).
BUT... I want to disable this kind of session timeout. Means I required unlimited time for session by which my website never get log-in process again.
NEVER do this!
If user press X button on his browser his session (and all it's objects) will always be kept in server memory!
The solution is keeping ASP.NET Session alive using this simple javascript hack, not making extremely long sessions.
Javascript forces the page to post empty data to the server, it's a kind of ping.
Server doesn't post anything back but the session timeout is automatically resetted.
You can configure session time on 20 mins, and ping timer on 19 mins.
try this
maximum session timeout
<configuration>
<system.web>
<sessionState timeout="525600"></sessionState>
</system.web>
</configuration>
try that it increase timeout. if you want to store login info use cookies
<configuration>
<system.web>
<sessionState timeout="525600"></sessionState>
</system.web>
</configuration>
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am developing a sample Encryption/Decryption solution in biztalk. for that purpose I created Test certificate by using Testcert utility. Then I successfully encrypted a message through MIME/SMIME encoder using test certificate. My problem is when I try to decrypt the previously encrypted file I get following error message:
There was a failure executing the receive pipeline: "EncryptionDecryption.ReceivePipeline1, EncryptionDecryption, Version=1.0.0.0, Culture=neutral, PublicKeyToken=de95fc107454e1ca" Source: "MIME/SMIME decoder" Receive Port: "ReceivePort4" URI: "C:\BIZTalkProjects\EncryptionDecryption\DecIN*.xml" Reason: There was an authentication failure. "Failed to decode the S/MIME message. The S/MIME message may not be valid.
What could be the reason? please help me. I am using biztalk server 2010.
Regards,
Shabbir
Did you check the procedures to write and read out the data? Decoding usually happens before the content is decrypted. Make sure that the file is complete and fully available in memory before the decrypt methods are called.
I am developing an application in asp.net 2.0, where i am products details from one site to another. But as there are thousands of products to upload, request time out occurs and the process does not complete.
Can any one help me or suggest me how i can avoid request timeout to occurs in between.
my application is in asp.net 2.0 and using InProc session state.
Thanks in advance.
i also set execution time out in web.config as follows:
<httpRuntime executionTimeout="3500" maxRequestLength="2097151" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" enableVersionHeader="true"/>
You can use sessionState. Similar question was answered here.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
i want to get website name using asp.net
i have one website that website contain generic handler page. so my client's website send http request to my site. that time i want to validate whether the request come from my client website or any other site?. so how to find the website name?
I want to create api to send and receive http request. so thats way i need this coding.
Request Example:
http://MySite.com/GetRequest.ashx?mobile=9894380156&opt=RA&amt=10"
Response Example:
Recharge Accepted
Websites don't have a name property that you can pickup, but you can check various properties of the Request object and attempt to infer the origin of the request. For what I think you're trying to do you'd probably need to maintain a list of IP addresses/domains for your client sites and code some logic for this yourself.
Hope this helps.
I think what links between you and another website is the URL and you can use the information available in the new Uri("Your Site URL") and it can provide you with some valuable information about the url u are calling.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
How to secure a hard disk programmatically through C#?
Like if a user wants to open a hard disk and first he/she has to give a password to access it. If the password is wrong then the hard disk is hidden from that user..
If you're trying to do this inside an app written in C#:
Get logical drives:
string[] drives = Directory.GetLogicalDrives();
Also check this out:
http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_23825199.html
http://bytes.com/topic/c-sharp/answers/276247-get-drive-letter-win32_diskdrive
You'll need to expand that more. Associate a drive letter with a password and keep that stored somewhere. If the entered password is correct, show that drive as you already have a list/array of them. (note it's too early for me to write this all out and I have a cold - but it's fairly simple).
You have your list of drives, you check a password to see if they can see a drive, if so let them see it.
If you are trying to restrict the entire windows system from showing drive letters based on a password, I would say do not use C#. This is a windows security issue.
I would recommend reading abot MS Group Policies. This article can help you:
http://support.microsoft.com/kb/231289
I don't think this can be done transparently (you can access the file with any program) and securely (that is, the disk is actually encrypted, not just hidden from the shell) in C# (on Windows, not on Singularity). To decrypt the disk on the fly you need a kernel mode driver. And you can't write that in .NET.
On Linux you might be able to write a FUSE (usermode) driver in C#+Mono.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I have developed a ASP.NET application,I have used sessions for parameter passing.
I dont want to let the user to enter data when the session expired.Please suggest me how to do that.
Create a base page, inheriting from System.Web.UI.Page and in the on load event check your sesion object and if its null then redirect to the homepage and then have all your pages inheriting from that.
However as already commented on by others you database connection should not be left open anyway. Your UI shouldn't have any knowledge of your db connection. Your business layer is where you should be using your db connection.
In your business layer assuming your are using SQL you should have a statement something like:
using (SqlConnection con = new SqlConnection(connectionString))
{
}
At the end of the using statement your sql conection will be disposed. For more information, you might want to look at this article:
MSDN SqlConnection
Thanks
Paul