Show One Single Thread And Its Replies On One Page?
Mar 29, 2011i am making a forum , the problem which i am facing is that how to show a one single thread and its replys on one page ? i am using DataList.
View 2 Repliesi am making a forum , the problem which i am facing is that how to show a one single thread and its replys on one page ? i am using DataList.
View 2 RepliesI have a solution with some projects. There are several break-points in different projects. I want to trace the first thread hit one of these break-points and continue tracing that single thread despite of other threads entering the same code-blocks.
I know this is possible through defining a condition on the break-point i.e, thread name = ... or thread Id = ... but my case is a heavy loaded asp.net application and as soon as I attach to w3wp.exe many threads will hit the break-points. I need some thing like a ThreadLocal<break-point>.
I have more than 100 videos to display on a single web page. I will keep links on different pages. whenever a user clicks on a video i will redirect him to videos page. The video page will have a DB connectivity and all the paths to the videos and it will display the clicked video on the videos page.
View 10 RepliesI want to remove checked items from checklistbox (winform control) in class file method which i am calling asynchronously using deletegate. but it showing me this error message:-
Cross-thread operation not valid: Control 'checkedListBox1' accessed from a thread other than the thread it was created on.
i have tried invoke required but again got the same error. Sample code is below:
[code]....
How can we debbug a multi-thread program to see local variables of each thread using visual studio 2008.
View 1 RepliesI'm new to threading and have used it successfully, but limited. I can spawn a thread and have the main thread reference variables in the spawned thread, but I don't know how to allow the spawned thread to reference (and update) variables in the main thread.
Any example threading code I've seen on the web appears to be WAY more complicated than what I do, so I am unable to understand or integrate into my code.
Here is a quick example of how I use threading:
[code].....
I am reading the Asp.net security documentation on msdn.I come across these tow terms and get really confused.
# WindowsIdentity = WindowsIdentity.GetCurrent()
which returns the identity of the security context of the currently executing Win32 thread.
# Thread = Thread.CurrentPrincipal
which returns the principal of the currently executing .NET thread which rides on top of the Win32 thread.
I have a password page and when someone enters an incorrect password I want to simply foil a brute force attack by having
bool isGoodPassword = (password == expected_password);
lock (this)
{
if (!isGoodPassword)
Thread.Sleep(2000);
}
I would expect that this would allow all correct passwords without stalling, but if one user enters a bad password another successful password from a different user would also be blocked. However, the lock doesn't seem to lock across ASP.NET threads.
I want a example of multithreading .i want to use it in a web form not on console.i am using C#.net .and how to use thread.sleep method for a particular thread.
View 5 RepliesI'm using a datalist that uses an item template to display results from an objectdatasource. The thing is, I'm only fetching a single record so a datalist doesn't seem like the best option. Is there a more suitable control I can use?
Also, how do I access the data on an objectdatasource that has been created in design view from code-behind. I've tried google but with no success.
So basically here I am trying to wait for my server to connect to my website signaling it that its done and so the page needs to be refreshed(cause sql was updated). Thing is when I try to use the response/request in the thread it simply doesn't want to work.
Here the code
Code:
[code]....
Errors I am getting are:
1. If I have the headers clear thing there it gives requires integrated IIS pipes or something like that.
2.If I don't have the clear headers it says the headers were already sent.
I have a GridView and a linqdatasource. The GridView is editable and when the user clicks to edit a row I want to concatenate two of the fields in the linqdatasource and place it in a single textbox.
I tried something like:
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Field1") %> - <%# Bind("Field2") %>'></asp:TextBox>
I have a ASPX page which queries from a database. Once we have the dataset it is bound to a gridview and displayed on the page. All this happens in the Page_Load event.Ofcourse this a simplistic approach. What is the best way to inform the user that data is being retrieved and when we have the data to update the page with the results in the dataset.I want all this to happen within the same ASPX page and do not want to hop around pages to achieve this. I looked at update panels however it wasn't clear to me how this could be done with an update panel without having a control which triggers the update for the update panel. There are no controls on my page whhich initiate the database query, it occurs as the page is loaded
View 1 RepliesFrom a web page I start a time consuming job and update it's status on the UI using webmethod.
Job is done in a thread:
ThreadPool.QueueUserWorkItem(new WaitCallback(DoJob), parameters); Job set's it status using static properties, and when web page, using javascript, calls web method it read those properties.
[System.Web.Services.WebMethod]
public static ProcessStatus GetProgressStatus()
{
Jober.Lock.EnterReadLock();
ProcessStatus st = new ProcessStatus(Jober.PercentageCompleted, Jober.TotalNumber);
Jober.Lock.ExitReadLock();
return st;
}
The UI progress is updated through javascript, the problem is that after thread completes I need to update UI on server side, so javascript won't help me here. What Is the best way to signal when thread is completed?
I'm having the Thread was being aborted exception in this simple code, running on IIS 6 when i run a long query.
[Code]....
I've got a page that I'm using as an e-mail template. I'd like to spin off a new thread, take the rendered page, and put it into an e-mail. Is this possible? If so, how? I haven't had luck so far.
View 3 RepliesI have an application that initially display 4 grid views at page load. This process takes 50-60 seconds and I would like to change the process to display the web page, show message like "Data being loaded, please wait..." and then spin off a thread that fills the various grid view. When this is done I would programatically like to do a post back to show the result. Not sure if this is possible? I tried something like this:
[Code]....
I need to call a function everytime a visitor visits one of my website's page. But I do not want the execution of the function to interfere with the interface between the user and the website i.e. different thread. What is the best way to do that on ASP.Net?
View 3 RepliesAjaxControlToolkit.ToolKitScriptManager.OnInit() throws thread abort exception for every aspx page. I have an asp.net 2.0 Ajax application, where I have set the following properties of ToolScriptManager on my pages.
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnableScriptGlobalization="true"
EnableScriptLocalization="true" CombineScripts="true" EnablePageMethods="true">
<Scripts>
I have this configuration on all the aspx pages in my application. When I checked the .NET CLR exception Performance counter I figured out a large number of exceptions, mainly one exception per page load is occuring. On running windbg I was noticed that
AjaxControlToolkit.ToolKitScriptManager.OnInit() has the following code block which is getting executed. The OutputCombinedScriptFile() returns true. But since I am setting my controls on DesignTime still designmode is set to false for toolkitscriptmanager.
if (!DesignMode && (null != Context) && OutputCombinedScriptFile(Context))
{
// This was a combined script request that was satisfied; end all processing now
Page.Response.End();
}
I am not sure if this is a reported bug or even a bug with ajax, but this is causing havoc in my load test results as I have around 3 hundred thousand HTTP requests to be handled per day out of which 80% are aspx page requests resulting in a large number of threadafbortexceptions, thus affecting the performance.
I am using a custom error page in IIS 6:<customErrors redirectMode="ResponseRedirect" mode="On" defaultRedirect="Error2.aspx"/>I want to disable authentication for the custom error page because the error being raised is related to an authentication module and I don't want to get into an infinite loop and I want to display a clean error page to the user. I have been trying the following configuration to do that.
<location path="Error2.aspx">
<system.web>
<authentication mode="None"/>
[code]...
I wnat to evaluate the performance of my web page. How can I show the time comsued of a page?
View 3 RepliesI have a stored procedure that returns 3 tables within the single recordset it returns. If I set a SqlDataSource to get data from this procedure, it works, but it only returns the first table. I want to have a GridView display the data from the 2nd or 3rd table using a SqlDataSource, but I can't figure out how to specify a particular table.
While there are some posts discussing this out there, I can't get a definitive answer about whether or not this is even possible (?). In a worst-case scenario, I can create another SP that only returns the 3rd table - but that creates a little maintenance headache that I would prefer to avoid.
For context: First of all, I am new to LINQ, as I have been using SubSonic for quite some time now.
I have two tables, Users, and Affiliates. They both have a very typical schema. The FK that joins them is the UserId field, which is in the Affiliates table. I want to create a LINQ query that pulls the Username from the Users table using the AffiliateId value. The AffiliateId is a primary key of the Affiliates table.
I have tried to accomplish this using many variations of the following code:
[Code]....
In the above query, I expect to get a single row result set. However, I instead receive the entire table of results.
How can I make this work? I have yet to see an example or article out there to do what I am trying to do.
I have huge excel files that I have to open from web browser. It takes several minutes to load huge file. Is it possible to open a single worksheet (single tab) at a time from excel file that contains many worksheets? I have to do this using C# / asp.net MVC
View 5 RepliesI am trying something apart of my boundries, is there any way to disable a single intem in dropdownlist or stop the ddl change event for a single item.
View 2 Replies