|
The TCP stack will not necessarily deliver a whole message like this. You have to be prepared to join message fragments together.
You also have to be prepared for multiple messages to be concatenated.
For more information, read the Winsock Programmer's FAQ[^].
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi mike,
Thanks for giving me such a valuable information.
Vinu.netguy
|
|
|
|
|
hi,
in my system i have .NET 1.1 & .NET 2.0.i hosted a website also.so when i browse the site which version will invoke.
and that application is built on .net 1.1.
what could be the problems updating .net1.1 to .net 2.0.
thanks & regards
naveen.
|
|
|
|
|
If you go to your website properties under IIS, you see that with the installation of .NET 2.0 a new tab was added named: "ASP.NET". There you can select your .NET version.
Furthermore .NET 2.0 is fully compatible with 1.1 and 1.0, so .NET 1.1 code can be compiled and run without problems under .NET 2.0
Gidon
|
|
|
|
|
hi,
thanQ for reply gnjunge.
its showing as .net 1.1(read only).iam unable to edit the configuration.
And why its taking 1.1 as default instead of 2.0. even i updated to .net 2.0 from .net 1.1.
And one more thing is while browsing iam getting an error as "Server Error '/' in Application".And end of the page its displaying .net version as 1.1.
Thanks & Regards
Naveen.
|
|
|
|
|
Hi Naveen,
First of all, if you compile your project in VS 2003, it will use the .NET 1.1 runtime. You can also make it support the 1.0 runtime through your project properties in VS.NET.
"Modifying this property causes the project system to update the web.config file in your project by adding assembly binding (<bindingredirect> and <assemblyidentity>) tags in a <dependentassembly> section. Web pages in Visual Studio-built ASP.NET Web applications are precompiled to a .dll file with a dependency on the runtime associated with the compiler."
I guess setting that option in the ASP.NET tab, will compile the aspx pages on runtime to one supporting the 2.0 runtime (but not the pre compiled files, since that option was set in VS.NET)
So if you would compile your project in VS.NET 2005, it will use the .NET 2.0 runtime.
Gidon
|
|
|
|
|
How do I get the key code F5 of the DataGrid?
I use the following code:
FORM:
protected override bool ProcessDialogKey(Keys keyData)
{
switch (keyData)
{
case Keys.Control | Keys.F:
Seek();
break;
case Keys.F5:
break;
case Keys.Escape:
this.Close();
break;
case Keys.F1:
CallHelp();
break;
default:
break;
}
return base.ProcessDialogKey(keyData);
}
DATAGRID:
private void baseDataGrid_KeyPressed(object sender,System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyCode == Keys.F5)
{
this.Cursor = Cursors.WaitCursor;
dsDataSet.Dispose();
dsDataSet = mBaseBuisness.GetAllRows();
m_dvCurrent.RowFilter = "";
baseDataGrid.DataSource = m_dvCurrent;
this.Cursor= Cursors.Arrow;
}
}
I get the key code of all keys, but not from the key F5.
Regards
Uwe
|
|
|
|
|
Can anyone tell the diffrence btn. Multithreading and APPDOMAIN, as i know Appdomain is "Application domain is a construct in the CLR that is the unit of isolation for an application." and Mutithreading is " the ability of an operating system to concurrently run programs that have been divided into subcomponents, or threads"
So whats the diff. btn. two and which to be used when?
Vipsi
|
|
|
|
|
A thread typically runs a portion of code. If you have more than one thread running (by default they run at the same time) your application is multi-threading. For example, if you were calculating the value for pi to 100,000,000 digits it would take a very long time. You would still want a user to interact with your app while it's calculating, and not "freeze" your app. In this scenario you would use a thread to do the asynchronous work of calculating the value of pi.
An application domain is really just a box to run things in. When you create a new thread it, but default, runs in the application domain of your main program. Now, lets say you have 3 threads running and you haven't created any applicaiton domains. If one thread crashes they will all crash. An application domain gives you the security of keeping everything running inside it from influencing other processes. You can create single or nultiple threads in an application domain. So, if you have 3 threads and each one is in a different application domain, if one thread crashes the other two will continue to run.
That's the basics of it. I'd go to MSDN for the details about how app domains work in terms of security, isolation etc..
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconapplicationdomainsoverview.asp
|
|
|
|
|
Thanks. This clears my doubt regarding APPDOMAIN and multithreading.
|
|
|
|
|
Hi everybody,
I have a DataGrid in my form that bound to a DataSet, I use background thread to update the data in the dataset, bacause there are a few threads working behind, I don;t want the updated data to be displayed in the Grid until all the threads finish. I try to use SuspendBinding, but it doesn't work.
Does anybody have idea of how to solve it?
Thanks
Alan
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|
|
You could, of course, create two DataSets, and with a simple assignment when your worker thread completes its operation, have the data inserted into the second data set. Then call the Data Binding method, binding to the second data set, and Refresh.
I'll bet you already thought of that, though,...
|
|
|
|
|
Hi everybody,
I want to insert thousands of rows into an Access database, I use OleDbCommand to execute the insert sql, but it works pretty slow,
is there any good way to solve the problem?
Thanks for any help in advance!
Alan
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|
|
Actually, in my experience whery big ammount of inserts is allways not too fast, especially if you are executing it in some kind of for() or while() cycle.
Some time ago I created a 2D map in database where insert was wery simple like that: insert (x,y, <somemaptype>) values (1,2,34). In my case I used 2 for() cycles and OdbcConnection with OdbcCommand. insert statement was executed 1`000`000 times and it took 15-20 minutes because someMapType was Random generated number.
I suggest you have to check and try optimize your code, maybe even create transaction sql file and execute it in database side with you oledb. And there is one more thing - Access is the sickest database I ever seen. Maybe you should try some other database.
|
|
|
|
|
I used to use classwizard in VC++ 6.0, to add functionality of an event(eg: to override onLButtondown in view class).
I think, The classwizard is not available in VC++ 7.0(.Net version). So how to add this event.
Should I manually add the function signature in c++ and header file?
Thanks
Vinay
|
|
|
|
|
Go to the implementation file for the dialog, and then in your Properties window and there should be a toolbar button in it with a green block. Clicking it will list the available MFC overrides.
"Your coding practices might be buggy, but your code is always right."
Internet::WWW::CodeProject::bneacetp
N-Tech Productions
http://www.n-tp.com/
|
|
|
|
|
|
You're welcome.
"Your coding practices might be buggy, but your code is always right."
Internet::WWW::CodeProject::bneacetp
N-Tech Productions
http://www.n-tp.com/
|
|
|
|
|
Hi,
I am experiencing some weird problems with an ASP.NET web application that is making use of System.Data.DataSet and System.Data.DataRow classes.
On a machine with single CPU, the application is running fine.
On a machine with Hyperthreading CPU, after a couple of seconds of running OK, the
application is crashing and the stack dump indicates that the error appears when trying to write in a System.Data.DataRow object.
If I am disabling the CPU Hyperthreading feature the application runs OK also on this machine.
Did anyone experienced also issues like this ?
Here it is the stack dump:
Source Error:
Line 1834: }
Line 1835: set {
Line 1836: this[this.tableSubscription.RequiredStatusColumn] = value;
Line 1837: }
Line 1838: }
Source File: c:\inetpub\wwwroot\CDS\DectDataSet.cs Line: 1836
(My note: this file is auto-generated from an XML schema file)
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
System.Data.RecordManager.NewRecordBase() +49
System.Data.DataTable.NewRecord(Int32 sourceRecord) +20
System.Data.DataRow.BeginEdit() +42
System.Data.DataRow.set_Item(DataColumn column, Object value) +260
CDS.SubscriptionRow.set_RequiredStatus(Int32 value) in c:\inetpub\wwwroot\CDS\DectDataSet.cs:1836
CDS.Subscription.Remove(ResultDelegate resultDelegate) in c:\inetpub\wwwroot\cds\subscription.cs:752
CDS.SubscriptionManagement.Remove(String number) in c:\inetpub\wwwroot\CDS\SubscriptionManagement.cs:764
CDS.SubscriptionsForm.m_cmdRemove_Command(Object sender, CommandEventArgs e) in c:\inetpub\wwwroot\CDS\SubscriptionsForm.aspx.cs:736
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +110
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138
System.Web.UI.Page.ProcessRequestMain() +1277
Thanks is advance to anyone that can provide me some information in order to address this issue.
|
|
|
|
|
Sounds like a threading issue. A multithreaded app can perform fine on a single proc system, but if there is a threading problem it will not always make itself known. To truly test any application that uses several threads you should run it on a dual or more processor system.
|
|
|
|
|
Indeed, furhter investigations showed that is a threading issue. Although my application does not explicitely create any thread (this is what lead me into confusion), it also uses the delegation mechanism and I have understood that this mechanism creates background threads in order to implement the asynchronous notifications.
So I think the solution is to add some extra synchronizations on the DataSet/DataRow objects since these are the object that are shared between the various delegates.
|
|
|
|
|
Hi all
I have written a program which connects socket and send request to the server , gets the response. in this request i want to set the headers. then the response from the server must be .xml. i have done this by using httpwebrequest and httpwebresponse. now i am trying to do using sockets. if u have any idea on this please help me out.
Regards
Forum
|
|
|
|
|
|
Hi
Thanq for responding. but the thing is i am passing the all the information as a string. in this i concatenated my own headers. but it's not giving any values here. response is also like this
HTTP/1.1 200 OK\r\nServer: Microsoft-IIS/5.0\r\nDate: Mon, 07 Mar 2005 11:58:54 GMT\r\nX-Powered-By: ASP.NET\r\nConnection: close\r\nTransfer-Encoding: chunked\r\nCache-Control: private\r\nContent-Type: text/html; charset=utf-8\r\n\r\n43\r\nThe Action Engine Server is alive.3/7/2005 3:58:54 AM \r\n0\r\n\r\n
but i want xml file which comes from the server.
if u have an idea on this please do reply.
Thanks
Kavitha.
Forum
|
|
|
|
|
Being a newbee to the .NET stuff, I'm currently developing Web versions of my Company's apps and am having a very frustrating time with something that should be very easy.
I've created an app which uses OledbDataAdapters/DataSets which handle the data and display it in DataGrids.
When I originally created them, the data adapters were visible as Icons at the bottom of the Design View and all I had to do to modfy them was to right click and select properties, or whatever. However, now they are not visible any more and I need to modify them. How do I get the Icons back? Is it really obvious and I'm just being plain dumb? I don't ever remember deciding to hide them!
Thanks for your patience and any help that you can give.
code dope.
Life's like a sh*t sandwich - the more bread you got, the less sh*t you gotta eat!
|
|
|
|