|
Hi
We are running an C# ASP.NET 2.0 web application connected to an SQL server 2005 database. After the application has been running for a few hours, the application begins to get timeouts while communication with the database. The database sever is still working fine(no hectic activity). I can also execute the same SQL statements in the Management Studio and they work fast. It makes no sense at all, so I restart the application by editing the web.config and restarting the application pool. The timeouts then seem to disapear.
As far as I know its not connection pooling as the number of connections to the SQL server seem to low. I also make sure all connections are closed after they are used so the standard .net connection pooling is being used properly.
What can I do to fix or further debug and find the cause of the problem as it seems to recur daily and does not seem to be related to the number of users using the application?
Thanks
|
|
|
|
|
When the timeouts start happening, have you tried using sp_who2 from the a sql query window. Perhaps for some reason one of your database queries is causing some blocking. There is a BlkBy column. If you see a number in this column it is the spid of the process that is blocking. If you are closing your connections then in must be a blocking problem.
Ben
|
|
|
|
|
Thanks.
I will give it a try as soon as the error occurs again.
Richard
|
|
|
|
|
Hi Guys,
I'm trying to get a website to run locally, but i'm having a problem. When i run the app, it loads up IE, stops debugging, and then displays a 403 error. I'm totally baffled as to what to do as if i run it in debug, it handle remote calls.
I'm running it in Cassini, on Vista, and the site requires HTTPS. The initial query string is for HTTP. Running the app without opening a page, and trying to navigate to it manually result in the same 403.
Could anyone give me some pointers as to why it won't run locally?
Cheers
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
I've created a web user control with a few properties that I want to assign to a different object during postback but it seems like the user control gets re-instantiated or something and passes back as null. What am I doing wrong? I've tried with a simpler user control and the same thing happens.
Here's the code I'm using. Hope it makes it clearer.
WebUserControl.ascx
<asp:textbox id="TextBox1" runat="server"></asp:textbox>
<asp:button id="Button1" runat="server" text="Click" />
WebUserControl.ascx.cs
private string _Text;
public string Text // property to assign later
{
get { return _Text; }
set { _Text = value; }
}
public event EventHandler ValueChanged;
protected void OnValueChanged(EventArgs e)
{
if (ValueChanged != null)
{
ValueChanged(this, e);
}
}
protected void Button1_Click(object sender, System.EventArgs e)
{
Text = TextBox1.Text; // assign property value
OnValueChanged(e); // raise event
}
Then, after dropping the user control onto the web form...
Default.aspx
<uc1:webusercontrol id="WebUserControl1" runat="server" onvaluechanged="WebUserControl1_ValueChanged" />
<br />
<br />
<asp:button id="btnAssign" runat="server" onclick="btnAssign_Click" text="Assign Value" />
So far so good...
Default.aspx.cs
string _MyText; // want to assign to this
protected void WebUserControl1_ValueChanged(object sender, EventArgs e)
{
btnAssign.Text = WebUserControl1.Text; // This works
}
protected void btnAssign_Click(object sender, EventArgs e)
{
_MyText = WebUserControl1.Text; //This says WebUserControl1.Text = null
}
I'm sure it's something really stupid that I'm forgetting to do or maybe the way I've gone about it but it's got me stuck & I'd really appreciate someone telling me where I've missed it.
Thanks.
|
|
|
|
|
I figured it out - I'm getting it to work using viewstate.
Is this good practice or is there a better way?
|
|
|
|
|
assign property value on pageload event of WebUserControl.ascx.cs
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
Text = TextBox1.Text;
<br />
}
best regard
Pathan
---------------------------------------------------
|
|
|
|
|
there is a column in the table named type_ of_emp in the "emp" table.
where in the front end i am accepting the value for the type_of _emp from the checkboxlist control.(IT IS DESIGNED IN ASP.NET AND CODE-BEHIND IS VB.NET)
where the checkbox names are. "beginner,experience,and expert".
there we can selct multiple values for one emp also.
now how will i save those multuple value againest a single coloumn.
aslo what will be the code to accept multiple selected checkbox in the checkboxlist control
|
|
|
|
|
|
Hi
Is there any difference between
Integrated Security=True and Integrated Security=SSPI?
Regards
saravanan
|
|
|
|
|
|
Hi i have one doubt,
I have one textbox in my grid,
It want to accept only 5 digits,
That also want to be in time format(HH:MM)
Suppose if we give 840 like,it want to take it as 08:40
Or if i give 2210,then it want to take it as 22:10
Like this only it want to accept how to do that?,
Advance thanks,
Regards,
Magi
|
|
|
|
|
use regularexpressionvalidator and give validation expression as
([0-9][0-9][:][0-9][0-9])
Hope it works!~!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
Ya thank u for ur reply,
But it will accept the time 44:23 also,
But it want to accept only 24 hrs format,
Plz hlp me,
Regards,
Magi
|
|
|
|
|
I was trying with ([00-24]:[00-59])
with even this wont solve ur problem...
Try a javascript and show an error when he writes a wrong time!!
I guess that should solve it!!
eg..
var firstint=44;
var secondint=23;
if(firstint > 24)
alert("error");
if(lastint > 59)
alert("error");
if(firstint=24)
{
if(lastint>0)
alert("error");
}
If ive missed any conditions add them up and check!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
use MaskedEditExtender control.Get it Click here
---------------------------------------------------
|
|
|
|
|
Ya thanx for reply,
I saw that site before itself,
They given the time as 12 hrs format and AM/PM,
But i want my textbox want to accept only HH:MM format only,
Regarding that plz hlp me,
Regards,
Magi
|
|
|
|
|
U can implement ur task by using these two property of MaskedEdit control
Mask="99:99" and AcceptAMPM="false"
Best Regard
pathan
---------------------------------------------------
|
|
|
|
|
Hi all
Iam trying to connect to an access 2007 datatbase with the following connection string :
Dim conn as new oledb.oledbConnection(“Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False;”)
try
Conn.open
Catch ex as exception
Messagebox.show(ex.message)
End try
Conn.close
----------------------------------------------------------
iam receving this error
Error Message=”Could not find installable ISAM
Any ideas!!!
|
|
|
|
|
|
Are you sure this is for access 2007? cause it is wriiten in the link it is for office 2000
i have tried: Regsvr32 c:\winnt\system32\msexcl40.dll but this dll does not exist
|
|
|
|
|
when I run my web application setup it was successful. I installed on IIS server on XP2005. when I called the url it the default page was displayed but it didn't show the serve side elments, that is the textbox and buttons. Please how do I solve this?
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|
|
Is .NET Framework installed and aspnet_regiis -i run to configure IIS to enable ASP.NET support?
|
|
|
|
|
i need to know waht this property to is it like postback but againts page crossing
md_refay
|
|
|
|
|
ASP.NET provides two mechanisms for transferring control from one page to another. You can use the Transfer method to transfer processing between pages, or you can make a cross-page request by assigning a page URL to the PostBackUrl property of a button control that implements the IButtonControl interface.
In either case, the PreviousPage page property will contain an object that represents the previous or originator page. If, for example, Page A posts to Page B, Page A's IsCrossPagePostBack property (accessible through the PreviousPage property) will be true and Page B's PreviousPage property will have the name of Page A.
|
|
|
|