|
|
hi ,
thanx i cud find so any points in the link2
T.Balaji
|
|
|
|
|
|
hi abhijit,
This is simply superb..thanx
T.Balaji
|
|
|
|
|
I am developing a Website portal using ASP.Net ( C# ).
I want to restrict the number of users to 10 who are accessing my website simultaneously.
If 11th user want to access the website then it should prompt to user that "Website is too busy while processing request". When one of the 10 users leave the website then another user can visit that website.
Please help me in this regards how to implement this technique using ASP.Net ( C# ).
|
|
|
|
|
I doubt if anything will be reliable as you need to take into account the browser back button, user simply leaving the browser on your page, session timeout etc etc.
It does beg the question as to why you only want 10 users at a time, but I guess thats up to you
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Yes, I think There is a way. You can try to implement it using Global.asax file. In Global.asax file, there is a method Session_Start()
here you just use a variable to count the number of session, because for first request one session will be created , so you just count number of seesion, if count==11 , just in page load of your application send what ever message you want to so !!!
This will solve your problem !!!
cheers,
Abhijit
|
|
|
|
|
What abhijit has said is correct and it should solve your problem. But can you please explain why do you want to restrict number of users?
I don't think it is a good option as they won't feel happy and ultimately won't visit your site again. If it is because of performance then i must say you should try to improve the design of site rather then restricting users.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
AhsanS wrote: If it is because of performance
I dont think it only because of the performance. because 10 user is too less for any web application. may be reason is other .
cheers,
Abhijit
|
|
|
|
|
hi frnds,
this code will find the browser close button,,,,,
but ineed to disappear slowly while close the web page . where i have to write the code using javascript
is it possibel ? if it is possible plz give me the solution
function confirmUnload()
{
var mes = "Your message here";
if (event)
{
event.returnValue = mes;
}
else
{
}
}
window.onbeforeunload = confirmUnload;
|
|
|
|
|
No, that is not possible.
For the browser to update the display in any way you would have to exit the function, but before you exit the function you have to decide if you will leave the page or not. So you have to choose between leaving the page or displaying the message.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have a working C# program. It's a gui that lets me access my parallel port. I would like to be able to convert it into a web page now. I've tried the copy past and start debugging approach. I think it's over my head.
I would like to know where to go or who to contact to have a pro work on it. I am willing to pay a programmer for a few hours of thier time. I will provide my working program and I can pay with paypal. Can someone please advise.
|
|
|
|
|
Gunnar5759 wrote: It's a gui that lets me access my parallel port. I would like to be able to convert it into a web page now
A webpage can't access the parallel port.
|
|
|
|
|
Please don't cross post.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi..
Is it possible to highlight the first empty row in gridview automatically?
(without selecting gridview row)
if there is data in grid, the first empty row will be highlighted for next data inserting. if there is no data and gridview is blank, the first row will be highlighted.
Could anyone suggest me.. please?
thanks in advance!
|
|
|
|
|
You cab check the value of the row on RowDataBound event and there you can change the style of the row for showing it as selected.
Cheers!!
Brij
|
|
|
|
|
|
I have a gridview with three Select Command fields as columns. I have code that tells me which row the user clicked on but how do find out which Select Command field they clicked
on? Thanks.
|
|
|
|
|
Everyday we get the same error on our production web server....and end up having to restart iis 5.0 to correct it.
OIP-04148: Unable to obtain a free database object from the pool.
I am trying to recreate this error in test to solve the problem and can not seem to do it...iis always works fine as intended ie: reusing, pooling connections and keeping sessions down. How is it that in a matter of seconds, 50 sesssions are created as if there is a lock (no lock btw).
any ideas?
|
|
|
|
|
I have been trying for hours now. but unable to access the connection strng from app config file.
1. Application has reference to System.Configuration.dll
2. App Config file has the connectionString
still the following code returns nothing.
Private Shared Function GetConnectionString( _
ByVal name As String) As String
Dim returnValue As String = Nothing
Dim settings As ConnectionStringSettings = _
ConfigurationManager.ConnectionStrings(name)
If Not settings Is Nothing Then
returnValue = settings.ConnectionString
End If
Return returnValue
End Function
can any one guess what's going wrong?
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Hi,
just a wild guess, but I think you have to use the connectionstring within the web.config file. ASP.NET projects get their application settings from there.
Must look like this:
<connectionStrings>
<add name="MyConnectionString" connectionString="here it goes" />
</connectionStrings>
Regards
Sebastian
|
|
|
|
|
it's a seperate library project for DataAccess (DAL). Added a app config file. I'm trying to take the connection string from there instead of passing it through the presentation, BAL...
this is what I have in app config file
<connectionStrings>
<add name="Name" providerName="Provider Name" connectionString="Connection String" />
</connectionStrings>
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Hmm,
don't know if this works. As far as i know the config is loaded by the app, and in this case this is a web-app, expecting a web.config. But maybe you can load the app.config with the configuration manager manually?
Regards
Sebastian
|
|
|
|
|
Have you stepped into the code? Are you getting ConfigurationManager.ConnectionStrings as NOTHING ?
|
|
|
|
|
yes, ConfigurationManager.ConnectionStrings returns NOTHING . but i have a valid connection string with a NAME and PROVIDER NAME in the app config file.
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|